Monday, 15 March 2010

android - Ext.device.Connection.isOnline() and Ext.browser.is.WebView not working on Sencha Touch 2.0.1 -



android - Ext.device.Connection.isOnline() and Ext.browser.is.WebView not working on Sencha Touch 2.0.1 -

i working on android app sencha touch, ext.device.connection.gettype() returning unknown me. have found work around navigator.online function (from determine if net connection available). little alarmed basic functionality not working documented (http://docs.sencha.com/touch/2-0/#!/api/ext.device.connection). looking source code (http://docs.sencha.com/touch/2-0/source/connection2.html#ext-device-connection) saw connection constructor checks ext.browser.is.webview , got curious. running next line logs lot of seemingly wrong information:

for (prop in ext.browser.is) { console.log('ext.browser.is.' + prop + ': ' + ext.browser.is[prop]); }

for example:

ext.browser.is.safari: true ext.browser.is.webview: false ext.browser.is.webview: false

are these ext.browser.is properties wrong? seems ext.browser.is properties cause lot of other issues in app , connection.isonline symptom of deeper issue. there specific technique or code getting ext.device.connection.isonline() work?

if got 'ext.device.device' & 'ext.device.connection' in apps' requirements , next permissions in androidmanifest.xml:

<uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_network_state" /> <uses-permission android:name="android.permission.read_phone_state" />

i using sencha touch 2.0.1 (with phonegap/cordova 2.2.0) & testing device samsung stratosphere (with android 2.3.6)

android cordova sencha-touch-2 cordova-2.0.0 android-2.3-gingerbread

No comments:

Post a Comment