1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    65
    Answers
    8
    Vote Rating
    0
    ehboym is on a distinguished road

      0  

    Default Unanswered: Application updates not working on Android

    Unanswered: 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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,073
    Answers
    3500
    Vote Rating
    854
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      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 @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    May 2012
    Posts
    65
    Answers
    8
    Vote Rating
    0
    ehboym is on a distinguished road

      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

Thread Participants: 1

Tags for this Thread