Create a background service in android wear

早过忘川 提交于 2019-12-08 02:49:09

问题


I have been trying to create an alarm application for my watch for past few days. And unable to find any clue that how we can create a background service for android wear. Even I didn't find anything in the developer guide for android wear.

But, I just want to create this application only for android wear and don't want to synchronize data from my cell phone.


回答1:


Android Wear is based on the same architecture as regular Android phones. So if you want to create a background service, you do it exactly the same as you would on a phone.

For example, here is a tutorial on creating a background service: http://developer.android.com/training/run-background-service/index.html

And a stackoverflow question about background services: Creating Background Service in Android

If you want an app to run on the wearable, you will still need to provide a minimal phone application to deliver it to phones via Google Play. More information about packaging is here: https://developer.android.com/training/wearables/apps/packaging.html



来源:https://stackoverflow.com/questions/31091402/create-a-background-service-in-android-wear

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!