开发者

Android, start activity from service?

Trying to start activity from service started at BOO开发者_StackOverflowT, but log shows how application dies (don't know why exactly) and restarts and tries again and again..

I've tried differents ways of starting activity, like

Intent newUserForm = new Intent(_context, NewUserForm.class);
newUserForm.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK );
_context.startActivity(newUserForm);

Why is my app dying (and restarting) and I'm not able to start activity from service? Thank you!!!!!!


Broadcast one Intent from service and make sure you'll receive that Intent from your application side (broadcast receiver).


Set up a broadcast receiver, and start the service from there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜