简体   繁体   English

使用自定义广告系列参数从浏览器意图打开 Android 应用

[英]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.我正在使用IntentFilter从浏览器打开应用程序并检查该应用程序是否已安装或重定向到 Play 商店(如果未安装)。

My problem is, I don't know how to send ' utm_campaign parameter in second case.我的问题是,我不知道如何在第二种情况下发送 ' utm_campaign参数。 Is it possible to send it in Javascript when using intent like this使用这样的意图时,是否可以在 Javascript 中发送它

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

The easiest solution to achieve this is Firebase .实现这一目标的最简单解决方案是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. Firebase 的动态链接是特殊链接,如果安装了应用程序,则可以打开应用程序,否则可以将用户带到PlayStore页面。 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.如果您不想这样做,您必须将特定 url 或格式DeepLink链接到您的应用程序中,然后您就可以提取所有活动跟踪信息。

In your target activity write this code getIntent().getData().toString() to get URL address.在您的target activity编写此代码getIntent().getData().toString()以获取 URL 地址。

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.但是,我建议使用 First Approach,因为它非常简单,而且您只需付出最少的努力就可以获得更多的功能和有关您的应用程序的深入见解。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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