在BroadcastReceiver中启动一个Service 可以运行的,,,在AndroidManifest.xml中配置Services 和 Broadcast, 不知道你的错误是什么。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Intent sIntent = new Intent(***.this, Service.class); 楼主是跳转不成功吧?中间加入一句:dateTimeIntent .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 即Intent dateTimeIntent = new Intent(context, DateTimeSyncService.class);dateTimeIntent .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startService(dateTimeIntent);这样就可以成功跳转,但这个setFlags的作用,我到现在还不是特别明白,还望高人指点 问个应该属于编码问题的问题。 高分悬赏!!!android按键分发问题 android 调用web 引用问题 写的android例子程序报错:the application has stopped ListView.setupChild报错的问题 Android CPU优化 求大华视频监控 Android版 SDK android应用开发怎么转型到底层 请教Android TCP连接PC 客户端与伺服器资料同步问题 高手指点,关于SQLite的问题。谢谢! OnCreate中 setTheme(R.style.xxx)为什么不行?
dateTimeIntent .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
即
Intent dateTimeIntent = new Intent(context, DateTimeSyncService.class);
dateTimeIntent .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startService(dateTimeIntent);这样就可以成功跳转,但这个setFlags的作用,我到现在还不是特别明白,还望高人指点