I need to show a Vimeo video in my app, I tried it opening the url in a webview, the url appears, but when I link the play button, the player doesn't work. So I want to try it opening the video with the Vimeo app, but I don't know how to call to Vimeo app from my app. Can Anybody help me please? Thank you!
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
To launch video in fullscreen with official Vimeo app com.vimeo.android.videoapp
:
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://player.vimeo.com/video/"+ADD_VIDEO_ID_HERE)));
回答2:
Possible duplicate: How to send a link to Vimeo?
We've built a simple library that can take care of this for you. Here is the open source github.
compile 'com.vimeo.android.deeplink:vimeo-deeplink:1.0.0'
The README will go into more detail, but this is what you'll want to use:
boolean handled = VimeoDeeplink.showVideoWithUri(Context context, String videoUri)