通过AlarmManager+Service+广播实现定时任务。并解决8.0之后service无法启动的问题
先说遇到的问题,就是service无法启动在receiver里面添加这样的判断@OverridepublicvoidonReceive(Contextcontext,Intentintent){Log.d("AlarmReceiver","haha");Intenti=newIntent(context,LongRunningService.class);if(Build.VERSION.SDK_