I am working on a widget and code is working fine on pre Lollipop devices but when I run my code on Lollipop, it gives me error Service Intent must be explicit: Intent { a
Instantiating an Intent with only an action creates what is referred to as an implicit Intent, since any component registered to handle that action will be started in order to do so. As of Lollipop, Services can no longer be started with implicit Intents due to security concerns. You merely need to be specific about the class the Intent is meant for; i.e., use an explicit Intent.
context.startService(new Intent(context, UpdateService.class));
You should also remove the <intent-filter>
element from the Service in the manifest, as that is what allows your Service to be started with an implicit Intent, which is no longer allowed.