Reputation: 313
<service
android:name="MyService"
android:launchMode="singleInstance"/>
Does android:launchMode in manifest have any effect for service or is only for Activities?
Upvotes: 3
Views: 1106
Reputation: 3798
Does launchMode in manifest have any effect for service?
No, Service
listen to the intent filter. Then having this Service
open your Activity
where launchMode
of activity will decide how to launch the Activity
on the screen.
Launchmode is concerned about the way Activity
is launched on the screen. And we can set it as property in activity tag
Detail about the Launch mode of Activity
Where as , Service itself is a tag that lack a visual user interface. They're used to implement long-running background operations or a rich communications API that can be called by other applications.
Upvotes: 1