Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update doesn't work on Android (check and download is ok) [ionic] #96

Open
przygrubyu5 opened this issue May 11, 2016 · 3 comments
Open
Labels

Comments

@przygrubyu5
Copy link

Hi @markmarijnissen

  1. Android devices -HTC One X
  2. Chrome is working, but had error, I understand
    image

3.Android check and download ok, but not update

[ionic] code in loginController
$scope.checkUpdate = function () {
var fs = new CordovaPromiseFS({
persistent: typeof $window.cordova !== 'undefined',
Promise: $q
});

// Initialize a CordovaAppLoader
var loader = new CordovaAppLoader({
    fs: fs,
    serverRoot: $rootScope.baseSourceUrl + '/pcberpapp/www/',
    localRoot: 'app',
    cacheBuster: true, // make sure we're not downloading cached files.
    checkTimeout: 10000 // timeout for the "check" function - when you loose internet connection
});

loader.check().then(function (updateAvailable) {        
    if (updateAvailable)
    {              
        loader.download(onProgress)
        .then(
          function (manifest)
          {
              console.log(manifest);
              loader.update();
              $scope.doLogin();
          },
          function (failedDownloadUrlArray)
          {
              console.log(failedDownloadUrlArray);
          }
        )
    }else {
      $scope.doLogin();
    }
});

};

img_0761

img_0760

  1. login.html in manifest.json
  2. I change login.js and update manifest on serve

Please hele me!

@markmarijnissen
Copy link
Owner

Strange. I need console logs of the device to debug the error.

Connect your device in debugging mode, install a debug-version of the app, and then goto chrome://inspect to checkout your logs.

Or if you use an IDE for android apps, you could see logs there.

I would check:

  • After reload, is manifest.json updated? Particulary, is the Manifest.root configured?

@przygrubyu5
Copy link
Author

przygrubyu5 commented May 13, 2016

use ionic and google Chrome and Sublime, not use IDE.

@przygrubyu5
Copy link
Author

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants