Results 1 to 3 of 3

Thread: Application updates not working on Android

  1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    65
    Answers
    8
    Vote Rating
    1
      0  

    Default Application updates not working on Android

    hi,

    I have a small WebApp I created using Sencha Touch 2.0.1.

    I'm using a Manifest file to update the users device.

    While the updates are working perfectly on my iPhone the Android device will not update.
    I load my new App to the server and the iPhone displays the "New version available ..." message and update the application but the Android device displays the old version and does not display the message.

    I tried to:
    * Delete and reopen it on the browser.
    * Delete the phone's Cash and reload it.
    * Delete the App from the home screen and reinstall
    ....

    nothing seams to makesAndroid update the App

    Anyone has an idea why that mite happen ?

    I'm using Sencha Touch 2.0.1
    I'm building it by "sencha app build production"
    And my manifest is a PHP file :
    Code:
    <?php
    
    
    header('Content-Type: text/cache-manifest');
    
    
    echo "CACHE MANIFEST\n";
    
    
    $hashes = "";
    
    
    $dir = new RecursiveDirectoryIterator(".");
    foreach(new RecursiveIteratorIterator($dir) as $file) {
        if ($file->IsFile() && $file != "./manifest.php" && substr($file->getFilename(), 0, 1) != "."){
            echo $file . "\n";
            $hashes .= md5_file($file);
        }
    }
    echo "# Hash: " . md5($hashes) . "\n";
    
    
    echo "\n";
    echo "FALLBACK:\n";
    
    
    echo "\n";
    echo "NETWORK:\n";
    echo "*";
    
    
    ?>
    Thanks

    Erez

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3932
    Vote Rating
    1272
      0  

    Default

    The new update available message is for the microloader loading delta updates. The cache manifest is something different. When the app is refreshed from the new update available message means that the delta update was downloaded and applied to localstorage. The cache manifest tells the browser to cache the files. The cache manifest would require a browser refresh because the files are downloaded the first time, then the browser can tell which files are new, the new files are then downloaded again to be cached.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    May 2012
    Posts
    65
    Answers
    8
    Vote Rating
    1
      0  

    Default

    Hi,

    So if I understand correctly to get the APP updated I should should:
    1) Load the new files in to the server
    2) Update the manifest (which in my case happens by itself)
    3) Open the APP on my mobile

    The APP then :
    1) Detects using the manifest that new versions of the files are available
    2) Display a message "New updates ..." message
    3) Load the new version of the files into the local storage
    4) Reload the APP using the new version of the files.

    The above process does work on my iPhone but on the Android device it does not.
    On the Android I need to manually clear the device History, Cash and cookies to that the APP to load the new version of the files.

    Am I doing something wrong ?

    Erez

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •