Software Archive
Read-only legacy content

Ionic events?

Steve_L_
Beginner
751 Views

I have 2 projects build with (external) ionicframework and Cordova. Both projects are succesfully deployed to the app-store and play-store. All went well. Now i want to make some changes and this goes well in the emulation-tab, but when i build the app (even when i revert the changes) and test this on a device it never receive an event. here is a code snippet (remember, this code is now working on my production app):

function loadTheApp() {

// Boot AngularJS

alert('deviceready event is fired');

angular.bootstrap(document, ['zretailApp']);
}

angular.element(document).ready(function() {
    if (window.cordova) {
        document.addEventListener("deviceready", loadTheApp, false);
    } else {
        loadTheApp();
    }
});

I decided to test without the deviceready event, but then it will never fire the ionicPlatform.ready event:

    $ionicPlatform.ready(function() { 

.... (code)

});

I have read you experience some problem with the ionic template, but i don't use that. I have created a blank template and added all the code/css/javascript myself. I have also tried to go back to version 1826, but that helped nothing. I think the buildserver is messing around with his own implementation of ionic and events. I tested it on Android and on Ios.

I hope my problem is somewhat clear. Could you help me.

Regards Steve

0 Kudos
1 Solution
Steve_L_
Beginner
751 Views

I figured it out. An update of the SQLLitePlugin of Triarc (com.triarc.sqliteplugin) is the problem. I included the 'old' version 1.0.3 and suddenly all worked :-).

 

Thanks for your time! Maybe someone else will also run in this problem and this is the solution.

Add plugin as com.triarc.sqliteplugin@1.0.3

Regards Steve

View solution in original post

0 Kudos
2 Replies
Rakshith_K_Intel
Employee
751 Views

Have you added the Cordova device plugin?

can u share more than the snippet of code posted? (index.html + js code to reproduce the issue)

0 Kudos
Steve_L_
Beginner
752 Views

I figured it out. An update of the SQLLitePlugin of Triarc (com.triarc.sqliteplugin) is the problem. I included the 'old' version 1.0.3 and suddenly all worked :-).

 

Thanks for your time! Maybe someone else will also run in this problem and this is the solution.

Add plugin as com.triarc.sqliteplugin@1.0.3

Regards Steve

0 Kudos
Reply