0

I am getting the exception as:

Android.Content.ActivityNotFoundException: No Activity found to handle Intent.

var video = Android.Net.Uri.Parse(@"android.resource://" + 
Forms.Context.PackageName + "/Raw/" + Resource.Raw.sampleVideo);
Intent intent = new Intent(Intent.ActionView, video);
intent.SetDataAndType(video,"video/*");
Forms.Context.StartActivity(intent); 
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

2 Answers2

0

Chech whether you have declared your intent in AndroidManifest file. For playing video you can check this url https://stackoverflow.com/a/16020402/5376678

Nandha Kumar
  • 131
  • 3
  • 13
  • I have tried this way also, but getting the same exception.If anyone knows how to get the uri from raw folder in xamarin.android, would be most helpful. – Shalini Ravi Nov 14 '17 at 11:47
0

get the uri from raw folder in xamarin.android

Here is what you what :

string rawPath = "android.resource://" + PackageName + "/" + Resource.Raw.audio;
Android.Net.Uri uri = Android.Net.Uri.Parse((rawPath));
Diana Li
  • 70
  • 9