モバイルブラウザにURLを入力すると、ユーザーをPlayストアのアプリケーションページにリダイレクトします。私は次のコードを試しましたが、AndroidストアのPlayストアアプリの代わりに店舗のウェブサイトをリダイレクトしています。Playストアにリダイレクト
<script type="text/javascript">
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
if (/android/i.test(userAgent)) {
window.location = "http://play.google.com/store/apps/details?id=com.example";
}
</script>
Googleで検索すると、市場のURLを使用する必要があることがわかりました。以下のようにコードを変更しました。しかし、まだ運がありません。このコードはどこにもリダイレクトされません。
<script type="text/javascript">
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
if (/android/i.test(userAgent)) {
window.location = "market://details?id=com.example";
}
</script>
誰も私がこれで逃したものを特定するのを助けることができますか?
次の質問をチェックアウトすることができます。http://stackoverflow.com/questions/2958701/launch-custom-android-application-from-android-browser –
@SailaLopa、私はhttp:// www .whatsapp.com/dl。私のアプリケーションをウェブサイトから宣伝する。 –
これはおそらくあなたに役立ちます:https://play.google.com/intl/en_us/badges/ – QueryLars