0

So, the widget is already added on the screen, I'm wondering if there is a way to go/launch the widget from an activity? Thanks.

lorraine batol
  • 6,001
  • 16
  • 55
  • 114
  • Launch the widget from an activity? What? The widget is on the homescreen, how would you launch that? You could... close your app, that would show the home screen... – Cat Sep 26 '12 at 03:01

1 Answers1

0

easy, destroy your activity by call :

finish();

=========

EDIT

so basically you need a function behave like home button. your application will put in background and show the home screen.

moveTastToBack(true);

or

Intent i = new Intent();
i.setAction(Intent.ACTION_MAIN);
i.addCategory(Intent.CATEGORY_HOME);
this.startActivity(i);
HelmiB
  • 12,303
  • 5
  • 41
  • 68
  • But there are still a lot of activities in the background, doing that will just close the current activity and it will then display the previous displayed activity. – lorraine batol Sep 26 '12 at 04:39