1

In my application it contain activity A,B,C,D. Now, I want to enter in to my application with two different entry point. That means i want to enter from activity A as well as activity C. If I give intent filter like:

<intent-filter>                                                 
    <action android:name="android.intent.action.MAIN" 
    <category android:name="android.intent.category.LAUNCHER"      
<intent-filter>

for both activity A and C two icons will create in application launcher,but both are work same that means if I click any icon it start from beginning, but my requirement is one icon as to start from beginning(Activity A) and other from Activity C.

How to achieve this?

Shaihi
  • 3,952
  • 4
  • 27
  • 47
VKJ
  • 417
  • 2
  • 8
  • 17
  • 3
    Does this help? http://stackoverflow.com/questions/3270409/how-do-i-get-multiple-icons-to-launch-different-activities-in-one-application – Joris Wit Aug 25 '11 at 14:42

1 Answers1

4

Have a preliminary Activity run as your main entry point which does nothing except decide which Activity to load, then loads it. The Activity can simply read a preference, for example, of which entry point to run, then will load the corresponding activity.

You can also make the Activity run without displaying a screen with the following property in your manifest:

android:theme="@android:style/Theme.NoDisplay"
John Leehey
  • 22,052
  • 8
  • 61
  • 88
  • Thanks for all your valuable response, but i found out the solution. just by setting attributes like this...:) >android:taskAffinity="string1" for activity A and >android:taskAffinity="string2" for activity C – VKJ Aug 27 '11 at 06:26