Starting Android service already running?

I’m afraid that that the second call to startservice can create a new service in order to have two different process executing at same time.

No, on multiple counts:

  • No, it will not create a new service. If the service is already running, it will be called with onStartCommand() again, to deliver the new Intent, but a second copy is not created.

  • No, it will not “have two different process executing at same time”, because a service runs in the same process as the rest of your app, by default.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)