1

I created a simple app with Sencha Architect and pack it to .apk. When I test it on my device, i notice that I couldn't switch to browser and open a web page from the app.
(e.g. the app show a yes-no dialog, when user press the yes button it should switch to browser and open certain url)

Here is the code that I use:

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
        );

It working when I tested it in a browser, but not working when I packed it to apk with sencha cmd. Does anyone can help me with this? Thanks in advance.

Andrew L.
  • 170
  • 2
  • 10

2 Answers2

1

It has some issues in the version 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

Link to Forum

1Mayur
  • 3,419
  • 5
  • 40
  • 64
0

I think that mistake is there: If (btn = = = yes), there is not === but == . Try it..