android - Bring task to front on widget click -
i sent task (activity) with: @override protected void onactivityresult(int requestcode, int resultcode, intent data) { super.onactivityresult(requestcode, resultcode, data); movetasktoback(true); } but need bring front setonclickpendingintent in widget. just start main (root) activity of application this: intent intent = new intent(context, mainactivity.class); intent.addflags(intent.flag_activity_new_task); context.startactivity(intent); if activity running in task, bring task foreground (without creating new instances of activity). if activity not running, start new task activity @ root.