+ private Runnable reviveSelf = new Runnable() {
+ public void run() {
+ Log.v(TAG, "trying to revive self");
+ Intent intent = new Intent(Intent.ACTION_MAIN);
+ intent.addCategory(Intent.CATEGORY_LAUNCHER );
+ intent.setClass(context, WhereAmI.class);
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ intent.addFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
+ intent.addFlags(Intent.FLAG_FROM_BACKGROUND);
+ intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+ startActivity(intent);
+ }
+ };
+