Set a DefaultSharedPreference

M
MarkPi
Chiltern Railways Ltd

Hi, I'm a newcomer to mobicontrol and APK packaging. A supplier has given us an APK file, but there is a requirement to set a specific URL for the App when it is installed, and the supplier is reluctant to add the URL as part of the APK without additional cost (big surprise).

Apparently the preferences for the app are stored in "DefaultSharedPreferences", and the preference is called "connection_url"

 

We use MobiControl - Package Studio to create the package from the APK. Can someone let me know how I would use this program to set the desired preference at the time of installation please? The help file doesn't help in this regard.

 

Many thanks

 

Mark

7 years ago
Android
ANSWERS
MD
Matt Dermody Diamond Contributor
7 years ago

I may be confusing the two concepts but if you want to be able to remotely manage the app configuration with EMM it would need to either reference an external config file that you could also distribute to the devices or support Managed Configurations. To leverage Managed Configurations, both the app would have to be written to support them and you'd have to distribute the app to AE managed devices via an App Catalog rule and not a Package. My understanding is that the SharedPreferences approach would require either the APK to be recompiled with the specific value or manual intervention would be required to manually configure that value within the app itself if that is exposed.