是否可以通过电子邮件或文本向Android设备发送链接,以打开包含参数的自定义应用程序?
我真的不能给这个标题增加太多了。我想通过直接打开我的应用程序的链接向用户发送警报是否可以通过电子邮件或文本向Android设备发送链接,以打开包含参数的自定义应用程序?,android,Android,我真的不能给这个标题增加太多了。我想通过直接打开我的应用程序的链接向用户发送警报 这可能吗?如果可能,如何实现?我通过使用谷歌Adwords知道,确实可以将用户发送到应用程序中的特定深度链接位置。作为将用户发送到特定产品页面的示例,您可以使用诸如android之类的URL-app://com.example.android/exampleapp/productid_1234 阅读更多-通过使用谷歌Adwords,我知道确实可以将用户发送到应用程序中的特定深度链接位置。作为将用户发送到特定产品页面
这可能吗?如果可能,如何实现?我通过使用谷歌Adwords知道,确实可以将用户发送到应用程序中的特定深度链接位置。作为将用户发送到特定产品页面的示例,您可以使用诸如
android之类的URL-app://com.example.android/exampleapp/productid_1234
阅读更多-通过使用谷歌Adwords,我知道确实可以将用户发送到应用程序中的特定深度链接位置。作为将用户发送到特定产品页面的示例,您可以使用诸如
android之类的URL-app://com.example.android/exampleapp/productid_1234
阅读更多-是的,您只需添加发送数据的意图就可以做到这一点。 我正在分享一个代码示例,只要实现它,您就会得到您想要的:
Intent share = new Intent(android.content.Intent.ACTION_SEND);
share.setType("text/plain");
share.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
// Add data to the intent, the receiving app will decide
// what to do with it.
share.putExtra(Intent.EXTRA_REFERRER_NAME,"example");
// share.putExtra(Intent.EXTRA_SUBJECT, "your text");
share.putExtra(Intent.EXTRA_TEXT, "click on com.example.yourApp");
startActivity(Intent.createChooser(share, ""));
只需在
com.example.yourApp
上放置你的应用程序全名和软件包名即可。是的,你只需添加发送数据的意图即可。
我正在分享一个代码示例,只要实现它,您就会得到您想要的:
Intent share = new Intent(android.content.Intent.ACTION_SEND);
share.setType("text/plain");
share.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
// Add data to the intent, the receiving app will decide
// what to do with it.
share.putExtra(Intent.EXTRA_REFERRER_NAME,"example");
// share.putExtra(Intent.EXTRA_SUBJECT, "your text");
share.putExtra(Intent.EXTRA_TEXT, "click on com.example.yourApp");
startActivity(Intent.createChooser(share, ""));
只需在com.example.yourApp