Is there any standard approach how to configure android application with custom settings before or during instalaltion?
Our users will not use Android market to install our application. They will download apk file from some local site in local network.
Our android application should communicate with server side application.
Different clients(corporate clients) will use different URLs for server side applications.
We need to setup correct URL for server side application before or during installation of apk file on user's phone/tablet.
It should be done automatically without interaction with user.
User should install apk file and after installation application should work with correct server side application.
How to do it?
One approach - create different apk files for different clients and set somewhere in application resources correct URL for server side application.
I do not like it. Actually client could change location of server side. In this case we will need to create new apk files.
- Create apk file.
- Install/store apk file as part of web application deployed on client's server.
- During installation of web application unpack apk file and put correct URL into some resource file.
- Pack apk again.
- Sign apk file.
- Call zipalign for this file. Is this step optional or required?
- Now user can open this web application in browser, download configured apk file and install it on phone/tablet
As result we will have custom apk file with correct URL for server side application inside.
User will install such apk on phone/tablet and application will connect to correct server side without any interaction with user.
Is the second approach correct?
Is it allowed to re-pack apk files at all?