tags:

views:

129

answers:

1

How Good are broadcast intents in terms of say I wanted to fire broadcast intents 10times a second for half hour. Right now i have a service doing this and it runs perfectly well until the user rotates the screen, and then it gets all messed up and stupid and gives errors. However broadcast intents are short live objects and so how would these perform in my conditions?

+2  A: 

Broadcast Intents involve cross-process IPC; firing those that quickly for that long will eat quite a bit of battery life. Intents are not designed to be broadcast quite that often.

If your service is getting "messed up" because of a screen rotation, your activity is at fault, perhaps by stopping the service when it shouldn't. Services are not directly affected by screen rotations.

CommonsWare
yea thats what i meant, the activity is messing it up. I solved this problem by using this.getApplication().startService(). its looking good so far
Faisal Abid