1

So I'm looking for the best way to open an app within another app on Xamarin forms when the app is install.. Currently I have an external link to the playstore (which loads up the app on play store) but, when the app is installed I'd like to link directly to this.. How would i go about doing this with Xamarin forms? Cheers

Here's how I went about fixing this issue :

Setting up app linking in Xamarin

This is possible but we need to change the code to the app we are linking to.

"App from" (in our case) changes :

To link to another app the change made to the main app is minimal: 1) Create a new URI. E.g. (URI AppLink = new Uri("http://appto/load");) 2) Set up the link with Device.OpenURI(AppLink);

"App to" (in our case) changes :

Android:

In main activity we need to add an intent filter, here is an example of what this looks like: [IntentFilter(new [] {Android.Content.Intent.ActionView }, DataScheme="appto", DataHost="load", Categories=new [] { Android.Content.Intent.CategoryDefault })]

The DataScheme and DataHost correspond to the uri link above.

iOS:

Within the info.plist file in the advanced tab we need to create a new "url type" I added an identifier of “com.appto.test” and URL scheme of “appto” (corresponds with uri link) After these changes are done, the app should link. Atleast with the example it worked.

Cœur
  • 32,421
  • 21
  • 173
  • 232

0 Answers0