相关疑难解决方法(0)

Android深层链接:为应用和Play商店使用相同的链接

我有一个网站,使用户可以进行搜索查询.查询可能需要一些时间才能完成(几分钟到几天),我希望用户能够通过发送带有用户链接的电子邮件来下载Android应用并在那里收到答案.

无论用户是否安装了应用程序,我都希望这种机制能够运行; 换一种说法:

  • 如果用户有应用程序,则应使用包含标识符参数的深层链接打开它.
  • 如果用户没有它,它应该在应用程序页面上打开游戏商店(例如https://play.google.com/store/apps/details?id=com.bar.foo&referrer=BlahBlah),让用户安装它,并使用identifier参数打开应用程序.

在此输入图像描述

有没有办法形成一个链接,打开一个带有参数的Android应用程序,无论是否安装该应用程序都可以使用?

android deep-linking

52
推荐指数
3
解决办法
4万
查看次数

Firebase动态链接无法打开应用

我在我的设备上本地开发了一个Android应用程序(app尚未在Android Play商店中).我有以下逻辑来在MainActivity中获得深层链接.

GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this)
            .enableAutoManage(this, null)
            .addApi(AppInvite.API)
            .build();

    // Check if this app was launched from a deep link. Setting autoLaunchDeepLink to true
    // would automatically launch the deep link if one is found.
    boolean autoLaunchDeepLink = false;
    AppInvite.AppInviteApi.getInvitation(mGoogleApiClient, this, autoLaunchDeepLink)
            .setResultCallback(
                    new ResultCallback<AppInviteInvitationResult>() {
                        @Override
                        public void onResult(@NonNull AppInviteInvitationResult result) {
                            if (result.getStatus().isSuccess()) {
                                // Extract deep link from Intent
                                Intent intent = result.getInvitationIntent();
                                String deepLink = AppInviteReferral.getDeepLink(intent);

                                Toast.makeText(getApplicationContext(), deepLink, Toast.LENGTH_LONG).show();
                                // Handle the deep link. …
Run Code Online (Sandbox Code Playgroud)

android firebase firebase-dynamic-links

12
推荐指数
2
解决办法
1万
查看次数