Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Android Starting an Intent (PDF view)

$
0
0

I have an injected service that is trying to start an Intenet to show a PDF. I am stuck at the part where I call the Intent.

Ideas????

 [assembly: Dependency(typeof (MyAndroid.Dependencies.FileHelper))]

namespace MyAndroid.Dependencies
{
    internal class FileHelper : IFileHelper
    {
        public Task OpenFileIn3RdPartyApp(string filename)
        {
           Uri uri = new Uri("file:///" + PathToFile(filename));
          Intent intent = new Intent(Intent.ActionView);
          intent.SetDataAndType(uri, "application/pdf");
          intent.SetFlags(ActivityFlags.ClearTop);
          ????? Android.MainActivity. ???????
       }
   }
}

Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>