Используйте Сервис для этого
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
this.getApplicationContext().startActivity(intent);
ниже - некоторый код`
public class HomepopupDataService extends Service {
private static final String TAG = "HomepopupDataService";
@Override
public void onCreate() {
Log.i(TAG, "Service onCreate");
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
// TODO Auto-generated method stub
Log.i(TAG, "Service onStartCommand");
CountDownTimer dlgCountDown;
Log.e("---------------", "onHandleIntent");
dlgCountDown = new CountDownTimer(10000, 1000) {
public void onTick(long millisUntilFinished) {
Log.e("---------------", "onHandleIntent++");
}
public void onFinish() {
Intent i = new Intent(getApplicationContext(),
DialogActivity.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getApplicationContext().startActivity(i);
}
}.start();
return super.onStartCommand(intent, flags, startId);
}
@Override
public IBinder onBind(Intent arg0) {
// TODO Auto-generated method stub
Log.i(TAG, "Service onBind");
return null;
}
@Override
public void onDestroy() {
Log.i(TAG, "Service onDestroy");
}
}