在Firebase动态链接中发送参数

时间:2018-04-29 22:26:03

标签: java android firebase firebase-dynamic-links

手动创建firebase动态链接时,我希望链接包含一个变量作为参数,以便在单击链接时处理它,我尝试这样做:

StringBuilder link= new StringBuilder("https://qn937.app.goo.gl/?link=https://www.teblya.com/&apn=com.example.abdo.foodproject");

link.append("/?token="+itemٍ.getId()+"/");
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);

shareIntent.putExtra(Intent.EXTRA_TEXT, link.toString());
shareIntent.setType("text/plain");
startActivity(Intent.createChooser(shareIntent, getResources().getText(R.string.app_name)));

但问题是它会在浏览器中打开深层链接而不是我的应用。 有没有人知道我可以用链接发送这个item.getId()参数的任何方法?提前谢谢。

0 个答案:

没有答案