1

Sencha Architectで簡単なアプリを作成し、.apkにパックしました。デバイスでテストすると、ブラウザに切り替えてアプリからWebページを開くことができなかったことがわかりました。
(たとえば、アプリはyes-noダイアログを表示します。ユーザーがyesボタンを押すと、ブラウザーに切り替わり、特定のURLを開く必要があります)

これが私が使用するコードです:

Ext.Msg.confirm(
        "Confirmation", // Title
        "Please tap yes to google in web browser.", // Message
        function (btn) {
            if (btn === 'yes') {
                //Ext.Msg.alert("You have selected Yes", "");
                // This should opening the web page on that can be used to connect to facebook from server //
                Ext.device.Device.openURL('http://www.google.com');
            }
            else {
                //Ext.Msg.alert("NO", "You have selected NO");
            }
        },
        this
        );

ブラウザでテストした場合は機能しましたが、senchacmdを使用してapkにパックした場合は機能しませんでした。誰かがこれで私を助けることができますか?前もって感謝します。

4

2 に答える 2

1

バージョン 2.1B2 にはいくつかの問題があります。

This will work with the next version of the Native Packager which is going in with Beta 3.    -
Jamie Avins  
Sencha - Sencha Touch Dev Team

フォーラムへのリンク

于 2013-02-28T14:20:27.227 に答える
0

間違いがあると思います: If (btn = = = yes), there is not === but == . それを試してみてください..

于 2013-10-08T06:46:20.107 に答える