I have an application with the following lines in AndroidManifest:
<category android:name="android.intent.category.HOME" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.MONKEY"/>
My question is: is it possible to set these parameters programmatically? I mean, some users will be able to enable or disable the above options.
What this means is to save the application as a launch.
So, is it possible to put a condition on this so that I can do it depending on the user?
EDITION: I edited this question to add a Rawr sentence.
Here's what I do before calling my core business:
Intent myIntent = new Intent(v.getContext(), MainActivity.class); myIntent.addCategory(Intent.CATEGORY_HOME); myIntent.addCategory(Intent.CATEGORY_DEFAULT); myIntent.addCategory(Intent.CATEGORY_MONKEY); startActivity(myIntent);
If I use these commands inside my manifest, they work. I canβt leave my application by clicking the home button. Adding categories manually as described above does not work.
Any suggestions?
Thank you in advance!
android android-intent
Carlos Pereira
source share