Is it possible to send an intent only to one service when this one is running?
I’m aware of the functions startService() and onStartCommand() but I don’t want “start” the service, in my case it was already started.
So I would like to know if it is possible to target only one brodcast receiver or if it exits something else to send only to one service/activity?
My tries with intent.setClass() before the sendBroadcast(intent) were not concluents.
startService()merely delivers a message to an existing running copy of the service, viaonStartCommand(), if there is such a copy. It will create such a copy (thereby triggering a call toonCreate()) if there is no running copy of the service.Use
startService(), please.