I have created a app where you can download YouTube videos for android. Now, I want it so that if you play a video in the YouTube native app you can download it too. To do this, I need to know the Intent that the YouTube native app puts out in order to play the YouTube app.
I could do this easially if I had the YouTube program on my emulator, so my 1st question is:
1. Can I download the YouTube app for my emulator, or...
2. What is the intent used when the user selects a video for playback.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
You can use the Youtube Android player API to play the video if Youtube app is installed, otherwise just prompt the user to choose from the available web browsers.
This will work on a device but not the emulator per Lemmy's answer.
Try this:
Use my code .. I am able to play youtube video using this code ... you just need to provide youtube video id in the "videoId" variable ....
Replying to old question, just to inform you guys that package have changed, heres the update
This works very well, but when you call normal Intent with ACTION_VIEW with valid youtube URL user gets the Activity selector anyways.