Is instantiating an AsyncTask from a WakefulBroadcastReceiver recommended?
问题 I can instantiate an AsyncTask from WakefulBroadcastReceiver (see my motivation for favouring AsyncTask over Service), e.g., public abstract class AlarmReceiver extends WakefulBroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { new AsyncTask<Void,Void,Void>(){ @Override protected Void doInBackground(Void... v) { while (true) { SystemClock.sleep(7000); Log.w("", "alive"); } } }.execute(); } } But is this recommendable? In particular, are there life cycle