Deploying Custom Configuration with My Android App

by Kostya Vasilyev » Wed, 04 Aug 2010 02:52:30 GMT

Sponsored Links
  can think of a few solutions.

1 - Discover the web service automatically. For example, through UPnP
(don't know if there is a client library for Java). Or - this is a hack
- set up your server at a known address, relative to the client's
network. That is, network is xxx.yyy.zzz.0/24 -> look for your server at

2 - Bootstrap configuration with another server, that just points to the
real one. This could be a separate machine, running a web server, and a
Wifi access point daemon. It would be configured by the client just once
to give out your real web server address.

Then, with a new phone, a network technician installs your program on
the phone, starts it, and enables Wiif. That's it - your service
discovers Wifi connectivity, connects to the bootstrap server (since its
signal is strongest - assume it physically sits right next to the
technician) and gets initial configuration from there. At this point
your app would know the real server.

3 - Create a separate .apk with configuration, build pre-defined ones
for your clients. The main app would request the configuration by
broadcasting an intent and receiving the server name back also by using
an intent.

4 - Use a simple configuration file, stored in a well-known location on
the memory card.

-- Kostya

03.08.2010 22:30, droidbm :


Customer purchases hundreds of licenses for software app (and
accompanying back end). This client software is highly customizable as
to what, when, and where it reports and to the customers liking
(literally hundreds of settings and tweaks). The client software polls
for config changes through a web service call. However, customers are
asking for a way to have their sys admins deploy the app apk and
config for their environment(s) with out having to install the app, go
to a settings page, and type in the config web services URL on
hundreds of devices. Essentialy, they want a way (like we have on our
other platforms) to deploy a customizable initial config with all the
right communication settings. Since there isn't a file manager or .Net
XML config files or anything similar to help facilitate this in
android, I looked at embedding a raw resource, but that has to be done
at development time by the developer. I then saw that one could (from
a package name) find the installation apk file on the device and open
it as a ZipFile, but adding a file to the apk also fails the signing
check if done post development. Since the app has no UI, there isn't a
place to have a PreferencesActivity, and it doesn't fix the real
problem of giving the sys admin the ability to have a turn-key install
of the apk. I hope this clarifies what I'm trying to accomplish.

On Aug 3, 12:53 pm, TreKing<> wrote:

On Tue, Aug 3, 2010 at 10:53 AM, droidbm<> wrote:

I have no way of knowing customer environment settings at apk build
time so SharedPrefere

Other Threads

1. :textAlign


          "textAlign" this  property is removed in SDK0.9....  is
there any other Property to get Text Alignement..

           Thanks in Advance for any Replays....!!!


2. How to change icon in Alert Dialog box?


I want to change the default icon that appears on Alert Dialog box.
Here is my code:

 public void onClick(View view) {
                Drawable d = Drawable.createFromPath("/data/local/tmp/images");
                        new AlertDialog.Builder(this)
                .setMessage("Some Message")
                .setNeutralButton("Close", new
DialogInterface.OnClickListener() {
                   public void onClick(DialogInterface dlg, int sumthin) {


I have pushed .png image.

No errors but i don;t see the change.



3. Mock Location Provider [SOLVED+IMPROVED]

4. No Bluetooth API in 0.9 or 1.0 SDK?!?!?

5. NumberPicker not accessible

6. ListPreference with int values

7. ListPreferency with int values