Reputation: 9
I want to perform some custom operation while installing the APK. These operation include copying of shared object(.so) to /system/lib ,creating some shared preferences so my application can directly use it.( Like in windows we can create registry entry while Installing the application.) Do we can execute any script while installing APK which can perform those operation ?
Upvotes: 0
Views: 453
Reputation: 35661
You cannot do this. App installation is not something you can "hook" into.
With shared Preferences you would supply a default value to be used in the case of a preference not having been created yet.
If you wish to share objects between apps, you would need to use external storage\SD Card or run both apps in the same process.
You would need to copy your shared object to external storage when the app runs. It could not be done during installation.
Upvotes: 3