简体   繁体   中英

Open Android app from browser intent with custom campaign parameter

I am using IntentFilter to open app from browser and check if the app is installed or redirect to the Play Store if it is not.

My problem is, I don't know how to send ' utm_campaign parameter in second case. Is it possible to send it in Javascript when using intent like this

(intent://messagecenter/#Intent;____end;)

The easiest solution to achieve this is Firebase . Firebase's Dynamic Links are special links that can open the app if app is installed otherwise can take the user to PlayStore page. It is very easy to do and this feature is free as well.

If you don't want to do this, you have to DeepLink certain url or format into your app and there you can extract all the campaign tracking information.

In your target activity write this code getIntent().getData().toString() to get URL address.

However I would suggest to use First Approach as it is very easy and you get many more feature and deep insights about your app with minimal effort.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM