Vicky
Vicky

Reputation: 941

How to open app from browser link in c# Xamarin android?

Well i tried some samples in my code to open app on clicking on an link in the browser but still i can't able to do what i want in my app. I want trough these links xamarin and this. Can anyone suggest me what to do, the right way to get the soultion for my question, advance thanks.

My Code:

[IntentFilter (new[]{Intent.ActionView}, 
 Categories = new [] {Intent.CategoryDefault}, 
 DataScheme = "superduperapp",
 DataHost = "something")]

link is for example: "superduperapp://my_code_is_here"

Upvotes: 1

Views: 2485

Answers (1)

Eugen Timm
Eugen Timm

Reputation: 744

You might be missing CategoryBrowsable. Try this:

[IntentFilter ( 
    new [] { Intent.ActionView }, 
    Categories = new [] { Intent.CategoryDefault, 
    Intent.CategoryBrowsable }, 
    DataScheme = "superduperapp", 
    DataHost = "my_code_is_here")]

Also, remember that you can easily test your intents via adb:

adb shell am start -a android.intent.action.VIEW -d superduperapp://my_code_is_here

Upvotes: 4

Related Questions