Skip to content Skip to sidebar Skip to footer

Open Vimeo Application Via URL

This code takes me to the browser, I have the vimeo application, how can it go to the vimeo application? vimeo1.setOnClickListener(new OnClickListener() { @Override

Solution 1:

With the official Vimeo app you can do this:

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://player.vimeo.com/video/83178705")));

While this looks almost identical to your code, aside from lack of a ?, on my Android phone it works fine (opens the Vimeo app).


Solution 2:

We actually recently made a vimeo-deeplink-android library which should help you achieve exactly what you're looking to do.

You could include it with gradle:

compile 'com.vimeo.android.deeplink:vimeo-deeplink:1.0.0'

And then deeplink to your video with this method:

boolean handled = VimeoDeeplink.showVideoWithUri(Context context, String videoUri)

Where videoUri is equal to /videos/83178705.


Solution 3:

Try this, set package name while Re-directing.

catch block will be called if no app is installed related to that package.

try{
     Intent browserIntent = new Intent(Intent.ACTION_VIEW,
     Uri.parse("http://player.vimeo.com/video/83178705"));
     browserIntent.setPackage("com.vimeo.android.videoapp");
     startActivity(browserIntent);
  }
catch(Exception e){
    // App is not Installed
    //Navigate to Play Store or display message                         
}

Edit

I have checked this and you were right its not working. I changed into my code. Now its opening Application but video is not running, I don't know why. Check this updated code.

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();
}

Post a Comment for "Open Vimeo Application Via URL"