1

I have an Android application that needs to read some custom parameters at startup (e.g. an URL). Those parameters are different from customer to customer.

What I'm expected to do is:

  • "broadcast" the APK
  • give specific parameter file to each customer (in an extern, separate file called custom_par.xml) to be read at startup

I don't want to have a config file inside the app project: if I need to give the app to a new customer, I'll only need to write a new custom_par.xml for him, and pack it together with the standard "common" APK.

Is it possible?

Amarjit
  • 4,327
  • 2
  • 34
  • 51
Stefano
  • 156
  • 3
  • 14
  • 1
    Yes? As soon as the app starts, find and parse the config file. Customer would just have to put your xml in a specific directory. Or you could distribute the config file as a second, lightweight, UI-less APK, and then have the two APK communicate. – natario Jul 01 '15 at 12:04
  • @mvai I'll use your suggestion to develop a super-light APP with shared preferences. please answer my original question so I can accept it as the correct solution – Stefano Jul 01 '15 at 12:39

1 Answers1

2

I see two way of dealing with it:

  • Tell your customer to place the config file in a specific directory, and have your APK read and parse the xml at startup. It is not difficult but requires bothering the customer about storing the config file;

  • Create a second, lightweight application with just the parameters you would put into the config file. You could then distribute the second APK along with your main app, and have these two apps communicate.

natario
  • 24,954
  • 17
  • 88
  • 158