Kodi Community Forum

Full Version: Is there intent API available for developer?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am an Android developer and I want to use XBMC as a player for my movie app. Is there API available?

For example, I have this for MX Player (API definition here: https://sites.google.com/site/mxvpen/api)

Code:
Intent intent = new Intent(Intent.ACTION_VIEW);
Uri videoUri = Uri.parse("http://host:port/playlist.m3u8");
intent.setDataAndType( videoUri, "application/x-mpegURL" );
intent.setPackage( "com.mxtech.videoplayer.pro" );
startActivity( intent );

Do we have anything like that in XBMC?

Thanks a lot.
Try posting in the development forum and describe what you want to achieve, not how.
Same standard intent.
Just substitute "com.mxtech.videoplayer.pro" for "org.xbmc.kodi" to force the intent to be handled by kodi, or don't specify the "setPackage" to have a chooser.
Not sure that will work specifically for m3u8, though...
(2014-12-05, 12:32)Koying Wrote: [ -> ]Same standard intent.
Just substitute "com.mxtech.videoplayer.pro" for "org.xbmc.kodi" to force the intent to be handled by kodi, or don't specify the "setPackage" to have a chooser.
Not sure that will work specifically for m3u8, though...

Thank you very much for your information, but I still wonder if there is API document for that? What if I need to display subtitle in the video, what extra do I need to put on? Or how do I receive callbacks when the video is finished? ...etc
Intents are standard android stuff. Nothing specific to Kodi.
If you want fine control over Kodi, use the JSON-RPC_API (wiki)