Launching android player from kivy -


I am trying to launch a media player to play an HLS link from the Kiwi + Android environment. I am able to launch the default media player using sample code found from the Net (given below). But I have established a better media player () which I want to start with URL. Any ideas how can I move on this? Is it possible to make Kiwi intention? (Note: I am using Kiwi Launcher and I am not an APK (Builder) Time Import From Jenos Import Autoclave to Sleep

  # Media Player Get Java Class MediaPlayer = autoclass ('android. Media.MediaPlayer ') #Mediaplayer = AutoCLus (' veg.network.mediaplayer ') #Our PlayerMeplayer = Media Player () Create mPlayer.setDataSource (' http://www.nasa.gov/multimedia/nasatv/NTV-Public- IPS.m3u8 ') MPlayer.prepare () # Game Print' Duration: ', mPlayer.getDuration () mPlayer.start () Print' Current Status: ', mPlayer.getCurrentPosition () Sleep (50) # Then play After: mPlayer.release ()  

thx, gl

< P> Yes, you can create intents from Kivy in the same way you can use other Java classes. Probably something like this:

  Python activity = autoclus ('org.renpy.android.PythonActivity') intent = autoclus ('android.content.Intent') URI = autoclass ('android.net. Uri ') media_intent = intent (Intent.ACTION_VIEW) uri = Uri.parse (' http://www.nasa.gov/multimedia/nasatv/NTV-Public-IPS.m3u8 ') media_intent.setDataAndType (Yuri,' Video / * ') PythonActivity.mActivity.startActivity (media_intent)  

Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

c# - WPF Expander overlay used in ItemsControl -

android - how to get distance of 2 beacons and make a condtion base on that distance -