0

I want to launch home when user is in some other app from my code.

i tried this post but this does not work in 4.0.3 facing same problem as reported here

Intent intent= new Intent(Intent.ACTION_MAIN);
    intent.addCategory(Intent.CATEGORY_HOME);
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(intent);

it is working when home launched from my app but its not working while user is in some other app.

Community
  • 1
  • 1
nishi
  • 1,245
  • 3
  • 13
  • 22
  • tried this link http://stackoverflow.com/questions/9679677/can-not-launch-home-from-android-4-0 but having the same problem reported by owner here http://stackoverflow.com/questions/9766043/android-4-0-issue-with-activity-stack-and-task-stack please help – nishi Mar 19 '12 at 08:59

1 Answers1

1

It is not good to launch Home when the user is working on Some other App. He may get irritated.

Sadeshkumar Periyasamy
  • 4,848
  • 1
  • 26
  • 31
  • I know that but my app will not be launching the home haphazard manner.Actually I am developing an app which will launch home when any other tries to access users safety data for that i have triggered listeners which will launch home. so the problem is that home is not launched when any other app such as custom contacts accesses phone book entries home will be launched. this works fine on android 2.3 and lower but fails on android ics 4.0 I hope u get what i want to achieve ..! – nishi Mar 20 '12 at 07:15