Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Register Android service in source code instead in Android Manifest

Does anyone know that is it possible to register (add) declaration of service in source code instead in AndroidManifest.xml if yes... how?

Thanks for any suggestions or help.

like image 748
Robert Avatar asked Jan 25 '26 07:01

Robert


2 Answers

It's not possible. You have to have your Service registered in AndroidManifest.xml.

like image 72
inazaruk Avatar answered Jan 27 '26 20:01

inazaruk


As stated here:

Like activities (and other components), you must declare all services in your application's manifest file.

So you will allways have to list your Service in the manifest file.

like image 43
kaspermoerch Avatar answered Jan 27 '26 19:01

kaspermoerch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!