Hi,
I notice that when I register my service directly via the ServiceManager (i.e. ServiceManager.addService(..) ), that it is only accessible if the client calls ServiceManager.getService(...). So, if a client tries to invoke the usual Context.bindService(...), it will not return correctly.
However, if I register my service in the AndroidManifest.xml file using the <service> tags, then client's can bind to it properly using the Context.bindService call.
My question, is whether there are any benefits to using one over the other? It seems that adding my service via the ServiceManager directly seems safer since it is not exposed to normal apps and therefore, they cannot invoke "startService" or "stopService" on it. Is this accurate? My service is a system service and I am trying to make it secure.
thanks!
J