Question

Our customer asked us to let our Worklight 6.1-based application automatically install an icon on the launcher of the Android OS.

I found this Stack Overflow solution: How can I place app icon on launcher home screen?

But, Worklight manages the changes to the AndroidManifest.xml file itself, and therefore I prefer not to mess around with this file myself if not needed. And if I have to modify this file, how would I register the java code included in the solution to be executed during or after installation of the app?

Was it helpful?

Solution

What makes you think Worklight manages anything in AndroidManifest.xml?

It is the opposite - Worklight only generates this file for the application (inside the android\native folder) when you add the Android environment to your application via Worklight Studio, but this file is considered a "user file". You have the control over it and you can and should edit it to add this functionality.

Just like you would add to this file an activity when using the WL.NativePage API Worklight provides, then similarly if in Android the way to add an icon to the Android launcher is via a setting in AndroidManifest.xml, then do so.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top