18 Feb 2013

Activity Launch Mode in Android.

Launch mode allows you to define how a new instance or the existing instance of an activity is associated with the current task. The activity launch mode has four valid values:

<activity android:launchMode = ["standard" | "singleTop" | "singleTask" | "singleInstance"] ../>

The default mode is "standard".

1. standard VS singleTop 
The modes fall into two groups. standard and singleTop comes in one side and singleTask and singleInstance comes in another side. 

The main difference between standard and singleTop is in standard, every time a new intent for standard activity, a new instance is created. In case of singleTop too, a new instance is created but an instance of the activity is already in top of the stack, it wont create a new instance. 

Example:
Actually, the issue comes , when we download an application from a server and launch it and open it from there itself. After launching the application, press home button. Then click the all programs and select the icon of the application from home screen. Then another activity will be created in the case of standard, but in singleTop , no new instance will be created.

2. singleTask VS singleInstance.
The "singleTask" and "singleInstance" modes also differ from each other in only one respect: A "singleTask" activity allows other activities to be part of its task. It's at the root of the activity stack, but other activities (necessarily "standard" and "singleTop" activities) can be launched into the same task. A "singleInstance" activity, on the other hand, permits no other activities to be part of its task. It's the only activity in the task. If it starts another activity, that activity is assigned to a different task — as if FLAG_ACTIVITY_NEW_TASK was in the intent.


i will be happy if you will provide your feedback or follow this blog. Any suggesion and help will be appreciated.
Thank you :)

14 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.

    angularjs Training in chennai
    angularjs Training in chennai

    angularjs-Training in tambaram

    angularjs-Training in sholinganallur

    angularjs-Training in velachery

    ReplyDelete
  3. Thank you so much for a well written, easy to understand article on this. It can get really confusing when trying to explain it – but you did a great job. Thank you!
    python training Course in chennai | python training in Bangalore | Python training institute in kalyan nagar

    ReplyDelete
  4. It would have been the happiest moment for you,I mean if we have been waiting for something to happen and when it happens we forgot all hardwork and wait for getting that happened.

    Java training in Tambaram | Java training in Velachery

    Java training in Omr | Oracle training in Chennai

    ReplyDelete
  5. From your discussion I have understood that which will be better for me and which is easy to use. Really, I have liked your brilliant discussion. I will comThis is great helping material for every one visitor. You have done a great responsible person. i want to say thanks owner of this blog.
    Data Science Course in Indira nagar | Data Science Course in Electronic city

    Python course in Kalyan nagar | Data Science course in Indira nagar

    Data Science Course in Marathahalli | Data Science Course in BTM Layout

    ReplyDelete
  6. This is ansuperior writing service point that doesn't always sink in within the context of the classroom. In the first superior writing service paragraph you either hook the reader's interest or lose it. Of course your teacher, who's getting paid to teach you how to write an good essay, 
    Data Science Course in Indira nagar | Data Science Course in Electronic city

    Python course in Kalyan nagar | Data Science course in Indira nagar

    Data Science Course in Marathahalli | Data Science Course in BTM Layout

    ReplyDelete
  7. This information is impressive. I am inspired with your post writing style & how continuously you describe this topic. Eagerly waiting for your new blog keep doing more.
    AWS Training in Chennai
    aws training in bangalore
    AWS Course in Chennai
    aws course in bangalore
    AWS Training centers in Chennai

    ReplyDelete
  8. Tutorial is just awesome..It is really helpful for a newbie like me..Awesome post with lots of data and I have bookmarked this page for my reference. Share more ideas frequently.
    AWS training in chennai | AWS training in annanagar | AWS training in omr | AWS training in porur | AWS training in tambaram | AWS training in velachery

    ReplyDelete
  9. 나는이 기사를 읽었다. 이 기사를 만들기 위해 많은 노력을 기울인 것 같습니다. 저는 당신의 작품을 소중히 여기며, 당신이 아주 짧은 시간에 제공하는 탁월한 설교 목록에 영감을 받았습니다.
    감사!
    내 사이트를 방문하십시오.파워볼사이트
    많은 정보를 얻을 수 있습니다.

    ReplyDelete