深度链接Android应用程序

时间:2016-03-21 13:11:25

标签: android indexing deep-linking

嘿我想在Android应用程序中使用深度链接/应用程序索引概念。例如,通过单击按钮,另一个应用程序可以打开我的自定义活动。我已经看过许多教程从Android应用程序打开网站,但我没有看到任何应用程序内容。

我试过这个小代码,但实际上并不是我想要的。



Intent intent = getPackageManager().getLaunchIntentForPackage(packageName);

                if (intent!=null) {
                    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                    startActivity(intent);
                }


                else {
                    //Log.d("NULL", "NULL");
                    Uri uri = Uri.parse("http://play.google.com/store/apps/details?    id=packageName");
                    Intent go = new Intent(Intent.ACTION_VIEW, uri);
                    startActivity(go);
                }




0 个答案:

没有答案
相关问题