WearableListenerService STICKY Vs NOT_STICKY

2019-08-31 14:32发布

I am trying to find the difference between having the WearableListenerService sticky or not sticky. This is because of the nature of the WearableListenerService that it does not run constantly. So is there any advantages of having it Sticky or not sticky? According to my testing, in both cases the behaviour of the service is the same. Service is created when phone reboots or when app launches. Even when it is not sticky, the wear is capable of connecting at any time, etc. Thanks!

1条回答
Deceive 欺骗
2楼-- · 2019-08-31 15:08

In most normal cases, that service is started through binding and not explicitly by calling startService, so sticky or not doesn't make any difference. If there is a particular use case that you have in mind, feel free to share that with us to help you further.

查看更多
登录 后发表回答