我有以下要求: 我有2个具有相同符号键的应用程序。
<- HOW TO DO THIS
and none other app
。我正在阅读:https://developer.android.com/training/sharing/index.html,但找不到如何将数据从一个应用程序发送到特定应用程序。
我不希望选择器(https://stackoverflow.com/a/41185310/2139691)允许用户将令牌发送给其他任何应用。
答案 0 :(得分:2)
您可以尝试通过意图查找传递数据吗?
Intent launchIntent =
getPackageManager().getLaunchIntentForPackage("com.package.address");
launchIntent.putExtra("data", data);
startActivity(launchIntent);