facebook

Auto update of native android app?

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #336842 Reply

    anser
    Member

    Hi support and everyone
    I wonder if anyone can help me to figure out this scenario my question is a native android app built with mobi1 and host it on third party site [not on Google market] is there a way to build the app that it will notify users automatically of the application’s available update?
    For example a pizza joint has their store app hosted on third party site and already has numerous old app users the joint would offer new discount coupons let say biweekly or in any intervals so with the automatic update request all users would get the news in time. I have no clue how this can be done if this is possible at all would somebody please help me and give me an example? Thanks in advance
    – Regards

    #336887 Reply

    Brandon
    Member

    My first thought would be to use a simple text file or something with the latest date in it. You could then check this with a saved date on the app. Using local storage to write the latest date so it can change itself.

    There might be another, perhaps better way, but this is something that just came to mind.

    #336902 Reply

    anser
    Member

    CincyPlanet thank you very much for your advise however I’m still a very beginner in mobi1 is it possible that you give me a sample code and direction where to place that code in the app? I checked your cheat sheet site but could not find any related code. Thank you in advance for your help

    #336906 Reply

    Brandon
    Member

    This is a sample off the top of my head, but I havent had time to test it, or really check it at all but it should give you an idea of what you need.
    You will need to use a local storage like: localStorage.setItem(‘lastUpdate’) which will keep the last updated time in it.

    
    //create a variable for the update date
    var myDate;
    
    //////////////The url below would be the file with the date in it
    jQuery.get('http://yourwebsite/foo.txt', function(data) {
    
        myDate = data; //myDate now holds the information for the latest update
    
    //check the local storage for a date, or if null - meaning there is none
    if (localStorage.getItem('lastUpdate') < myDate || localStorage.getItem('lastUpdate') == null )
    {
    
    alert("You need to update your files");//tell them to update or create an update procedure 
    
    }
    
    });
    
    #336907 Reply

    Paul_paul
    Participant

    I have the same problem with self hosted Android apps but I used the easy way out, I just put a pop up message in the app reminding people to update the app regularly to get the latest money saving special offers, not fool proof but it seems to work ok.

    #336909 Reply

    anser
    Member

    Thank you CincyPlanet and stickleback I’ll test your advice Cincy and let you know how its turn out. Hopefully yours or stickleback’s idea will work. Anyway I sure appreciate your help guys. By the way stickleback how do you adjust the time interval for the pop up to appear? thanks

    #336934 Reply

    Paul_paul
    Participant

    There is no time interval it’s just a pop up alert assigned to a button, the user taps to see the latest special offers and the reminder to update is there.

    #336935 Reply

    anser
    Member

    Ok now I got it, thanks stickleback

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Auto update of native android app?

You must be logged in to post in the forum log in