Add Android Wear Module To My App

China☆狼群 提交于 2019-12-10 17:07:55

问题


I want to make an Android Wear that will be installed when you install the Phone's app from the play store.

I looked around and found that the way to do this is to create new Android Wear Module and build it there.

But, I have a problem with that. Because the phone module minimum SDK is 13 and the Wear Minimum SDK must be 20 (4.4W), I can't install the app itself on my phone, Only on the watch.

How can I fix this to work? Thanks (And sorry about my not-so-good english).


回答1:


The phone minSdkVersion should stay the same (as it was - 13 in your case). The Wearable "part" of app should have minSdkVersion set to 20, but this is not a problem - Wearable app won't be installed on your phone (only on watch).

Phone apk just holds the wearable apk inside, but wearable apk doesn't affect phone app in any way. The only constraint that wearable app adds (to the existing phone app) is that phone app manifest should include all permissions declared in wearable app manifest. That is because user have to agree for using all permissions (by "both" apps) at once.



来源:https://stackoverflow.com/questions/25082055/add-android-wear-module-to-my-app

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