1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    714
    Answers
    41
    Vote Rating
    42
    ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about

      0  

    Default Unanswered: [2.1b3] problems when using the native Device or Connection classes (in Android)

    Unanswered: [2.1b3] problems when using the native Device or Connection classes (in Android)


    I tried several ways of including the required modules. But whatever I do, it works on my PC in the Chrome browser (no errors or warnings) but not on the Device (Galaxy Nexus). I always get errors in alogcat like
    Code:
    Web Console(28965): Uncaught TypeError: Cannot read property 'Connection' of undefined at file:///android_asset/app.js:1
    D/
    Is this supposed to work with this version and if so, how can I fix this?

  2. #2
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Berne, Switzerland
    Posts
    714
    Answers
    41
    Vote Rating
    42
    ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about ingo.hefti has a spectacular aura about

      0  

    Default


    I tried with last night's build - still not working - what am I doing wrong?

    Code:
    Ext.require('Ext.device.Connection');
    
    
    Ext.application({
    ...
        launch: function() {
            // Destroy the #appLoadingIndicator element
            Ext.fly('appLoadingIndicator').destroy();
    	console.log(Ext.device.Connection.isOnline() ? 'online' : 'offline');
        },
    ...
    
    });