Reputation: 8101
I need to choose between two starting (Main) activities based on some stored data. Logic I am trying to achieve is something look like:
if (data == something) showActivity1();
else showActivity2();
Is there a way to declare something like this in manifest? Multiple
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> tags?
Or is there a point in application where this code would be suitable? I was thinking of creating one activity, and then just set them different content views and handle logic accordingly, but these two activities are very very different, so it would result in a lot of unconnected code in one file. Thanx in advance.
Upvotes: 2
Views: 918
Reputation: 2616
If you set multiple MAIN & LAUNCHER tag, multiple activities appear in your application list. So, that's not what you want.
My recommendation is like this...
Upvotes: 2