0

Possible Duplicate:
How to start activity in another application?

My application schema is like that ;

SplashActivty ( <category android:name="android.intent.category.LAUNCHER" /> )
LoginActivity 
MainActivty 
    BanksActivity ( Gridview  of some banks ) 
      BankActivity ( Some detail information  about selected bank )
          Request loan 
          etc.
    HotelsActivty ( Gridview of some hotels ) 
          HotelActivty 
          etc. ( same hierarcy as banks...) 

Additional info: All activities/actions makes request an api call for retrieving informations and assets of that screen.

My scenario/question is that;

Is there anyway; can I start BanksActivty or one of other activity which is not launcher nor mainActivity directly from outside of my app ?

Does the question makes sense?

Community
  • 1
  • 1
Aren
  • 23
  • 4

1 Answers1

0

Yes you can. If you want to start it from home screen, just add the following to your AndroidManifest.xml (and remove the original line there for this activity):

    <activity android:name="MyHotelActivity"
              android:label="MyHotelActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

And your MyHotelActivity will have an icon in installed programs.

You can also start it in response to any other ´intent-filter` type that you may want to register.

Regards.

Luis
  • 11,978
  • 3
  • 27
  • 35