Android Question Updating apps after publication

prestondocks

Member
Licensed User
Longtime User
Hi, I am about to start work on a project that we will be using Basic 4 Android for. We will have a lot of customers who will want there own app. We know that customers being customers that they will want changes to the app after it has been published and since there could be a lot of individual customers we want to make this as easy as possible. Our thought is to create a app template that has stored in it a unique code for the customer. Then certain text and images used in the app is stored on a web server. When the app is downloaded it should query the web server with the customers code and get their specific data. Each time the app is opened it will check a version code and if this has changed it will again refresh the text and media.

The apps are inherently web based anyway so requiring an internet connection to get config is not a problem for us.

I am wondering about what is and is not possible to change in an app after it has been published. Are we correct in thinking that we can download and replace app images?
 

DouglasNYoung

Active Member
Licensed User
Longtime User
prestondocks,
Rather than have everybody's text in one app, why not have the app downloaded with a generic text, and as each user configures their unique code the app looks up the server and downloads the appropriate texts for them. Updates would be easily handled by a date/time stamp on the database and when the any text is newer it just downloads the required record(s).
This would seem a lot easier than having to republish the app for everyone if one little bit of text changes!
Douglas
 
Upvote 0

prestondocks

Member
Licensed User
Longtime User
Hi Douglas, your suggestion is what I explained we want to do in my post. The question at the end was can anyone suggestion how we do it and is it possible to replace images in the app without re publishing?
 
Upvote 0

MotoMusher

Active Member
Licensed User
Longtime User
You can use the same code base, and look in dirrootexternal/yourfoldername/. Always call "myimage.jpg" and "mytext.txt" as a map or raf. dirassets is read only so you can't put it there.

I have not personally worked on downloading files, but there are lots of examples on here I have seen. Just save to that folder and you are good to go. I do the same thing, but store them all in dirassets, and pull the necessary version out into dirrootexternal based on the setup. I do have to republish though if new assets are needed, but I don't mind that in my situation.

When main launches, look for the existence of both files. If missing, download proper files to that folder, else continue.
 
Upvote 0

DouglasNYoung

Active Member
Licensed User
Longtime User
Sorry prestondocks,
I gave to much importance to the thread title and thought you wanted to update the app each time!

Anyway, as MotoMusher says, you can easily download the required data - I use a php page which uses a SQLite query on the server to determine if an update is required. Once the app gets a response indicating an update is required, I use an httputils.download to get the appropriate data file off the server (see httputils2 library).
Douglas
 
Upvote 0
Top