On Wed, Aug 11, 2010 at 9:50 AM, Markus Feuerstein
wrote:
> Thanks for your quick answer.
> If I understand right, I could solve it like this:
>
> @Override
> public void onStart( Intent intent, int startId ){
> super.onStart( intent, startId );
> if( !mServiceRunning ) {
>
Markus,
You should match up calls to bindService() and unbindService().
If you bind to the service in your Activity's onStart(), call
unbindService in onStop().
Next time your activity is started, it will call bindService() again.
Service lifecycle is managed by Android, and the service will
Thanks for your quick answer.
If I understand right, I could solve it like this:
@Override
public void onStart( Intent intent, int startId ){
super.onStart( intent, startId );
if( !mServiceRunning ) {
mServiceHandler = new Handler();
mServiceHandler.
On Wed, Aug 11, 2010 at 9:19 AM, maecky wrote:
> How do I know if the service has already been started (therefore i
> would only need to bind to the service again) or not (then I would
> need to call startService() first and then bind to the service)?
You don't know.
> What would happen, if I ca
Hi,
I have implemented a RemoteService which will increment a countere
( just for testing purposes ). Therefore I have a Task class which
implements Runnable and the method run() where a infinite while loop
increments the variable.
>From the client side, I start the RemoteService with startServic
5 matches
Mail list logo