- This topic has 7 replies, 3 voices, and was last updated 11 years, 8 months ago by anser.
-
AuthorPosts
-
anserMemberHi 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
BrandonMemberMy 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.
anserMemberCincyPlanet 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
BrandonMemberThis 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 } });
Paul_paulParticipantI 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.
anserMemberThank 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
Paul_paulParticipantThere 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.
anserMemberOk now I got it, thanks stickleback
-
AuthorPosts