When we start a service like following :
Intent in = new Intent();
in.setAction("com.android.myAction");
startService(in);
It gives an error : Service Intent must be explicit.
Why is this so. Why android requires service intent to be explicit?
When you start a service with implicit intent unlike Activity, no user interface is involved. When multiple Services can handle an Intent, Android selects one at random; the user is not prompted to select a Service.
In case the malicious Service is bound to the calling application, then the attacker can return arbitrary malicious data or simply return a successful result without taking the requested action. The malicious Service can steal data and lie about completing requested actions.
"To ensure your app is secure, always use an explicit intent when starting or binding your Service and do not declare intent filters for the service."(From Android developer) It must be because without it other apps will can start your service and etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With