0

Within my fragment, I am trying to start an intent to display a local image with a gallery app on my phone.

The three lines in question are

string path = String.Format ("content:/{0}.jpg", CacheController.Static.GetPath (m));
Android.Net.Uri uri = Android.Net.Uri.Parse(path);
StartActivity (new Intent (Intent.ActionView, uri));

the value of path is content://data/data/Appname.subname/files/cache/107.jpg.

I tried using file:/ at the beginning of the Uri but that didn't help.

Saphire
  • 1,812
  • 1
  • 18
  • 34

1 Answers1

1

You are trying to share an image that is in a folder private to your app. You first need to copy the image to a public folder and make an intent pointing to that image. Have a look here and here

Community
  • 1
  • 1
Bojan Kseneman
  • 15,488
  • 2
  • 54
  • 59