hi
how can i launch application from browser when pay complete.
hi
how can i launch application from browser when pay complete.
Hello,
Do you want to click the hyper link in the HTML page, then invoke your application? Am I right?
If yes.
For Android, you can use IntentFilter and set DataScheme to achieve it. For example, my android package name is com.companyname.app24, I add a IntentFilter above MainActivity like following code. Set the package name to DataScheme, set Categories for CategoryBrowsable, it means that Activities that can be safely invoked from a browser
[IntentFilter(new[] { Android.Content.Intent.ActionView },
Categories = new[] { Android.Content.Intent.CategoryDefault, Android.Content.Intent.CategoryBrowsable },
DataScheme = "com.companyname.app24")]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
Then you can add a hyper link set the href property in your html page like following code.
href="com.companyname.app24://host/"
For iOS, you can try to set Custom URL Scheme , it could achieve the same result.
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
@shhamidi-2358 May I know if you have got any chance to check my answer? I am glad to help if you have any other questions
9 people are following this question.