如何从Android应用程序启动vimeo intent。 我累了使用以下链接......
http://player.vimeo.com/video/VIDEO_ID
但它正在从Vimeo应用程序崩溃,出现以下错误:
11-28 17:46:12.076: E/Vimeo(4144): **uncaught exception**
11-28 17:46:12.076: E/Vimeo(4144): **java.lang.ClassNotFoundException: com.vimeo.android.lib.ui.player.LaunchFullScreenVideoPlayerFullScreenVideoPlayer**
11-28 17:46:12.076: E/Vimeo(4144): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
11-28 17:46:12.076: E/Vimeo(4144): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
11-28 17:46:12.076: E/Vimeo(4144): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
11-28 17:46:12.076: E/Vimeo(4144): at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
11-28 17:46:12.076: E/Vimeo(4144): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
11-28 17:46:12.076: E/Vimeo(4144): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
11-28 17:46:12.076: E/Vimeo(4144): at android.app.ActivityThread.access$600(ActivityThread.java:130)
11-28 17:46:12.076: E/Vimeo(4144): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
11-28 17:46:12.076: E/Vimeo(4144): at android.os.Handler.dispatchMessage(Handler.java:99)
11-28 17:46:12.076: E/Vimeo(4144): at android.os.Looper.loop(Looper.java:137)
11-28 17:46:12.076: E/Vimeo(4144): at android.app.ActivityThread.main(ActivityThread.java:4745)
11-28 17:46:12.076: E/Vimeo(4144): at java.lang.reflect.Method.invokeNative(Native Method)
11-28 17:46:12.076: E/Vimeo(4144): at java.lang.reflect.Method.invoke(Method.java:511)
11-28 17:46:12.076: E/Vimeo(4144): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
11-28 17:46:12.076: E/Vimeo(4144): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
11-28 17:46:12.076: E/Vimeo(4144): at dalvik.system.NativeStart.main(Native Method)
请建议我...... 在此先感谢... :)
答案 0 :(得分:1)
此问题非常陈旧,根据最近更新的Vimeo Android应用程序(2015年12月重新推出)添加了新的答案。您现在可以深入链接到官方的Vimeo Android应用程序。您可以手动或使用vimeo-deeplink库执行此操作。即使您不使用该库,也请查看其README文件,以获取Vimeo应用程序的deeplink API的说明。
您可能也对Vimeo Android SDK感兴趣。
注意:我在Vimeo工作
答案 1 :(得分:0)
试试这个它会导航到Vimeo应用。
try{
Intent browserIntent = null;
PackageManager pmi = getPackageManager();
browserIntent = pmi.getLaunchIntentForPackage("com.vimeo.android.videoapp");
browserIntent.setAction(Intent.ACTION_VIEW);
// browserIntent.setData(Uri.parse("http://player.vimeo.com/video/83178705"));
startActivity(browserIntent);
}
catch(Exception e){
// App is not Installed
//Navigate to Play Store or display message
Toast.makeText(MainActivity.this, "In Catch Block", Toast.LENGTH_SHORT).show();
}