Android发送带有链接并打开应用程序的短信

问题描述 投票:2回答:1

问题:我可以使用我的应用程序通过短信发送链接。当用户单击链接时,如何使我的应用程序启动。如果未安装我的应用程序,我希望将用户重定向到google play

我发送短信为

sms.sendTextMessage(phoneNumber, null, "https://play.google.com/store/apps/details?id=com.my.application", smsSent, smsDelivered);

带有链接的消息正在传递。

我的Android清单文件是

 <activity
        android:name="com.my.app.HomeActivity"
        android:label="@string/app_name"
        android:launchMode="singleTask" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <data
                android:host="https://play.google.com/store/apps/details?id=com.my.app"
                android:scheme="https" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

当用户单击链接时,即使我的应用程序已安装在该手机中,浏览器和Google Play的选项也会出现。该应用程序已经在应用商店中了

android telephonymanager
1个回答
0
投票

您的网址中有用户其他市场。

您正在使用**https://play.google.com/store/apps/** details?id = com.my.application,但您已经使用** market:// details?id = ** com.my.application

Market://是corret.....错了

© www.soinside.com 2019 - 2024. All rights reserved.