Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android wear : how to support existing app to Android wear

Tags:

I have installed new android wear SDK. Also have downloaded Android wear app from play store on my phone. I am able to connect my phone with Android wear simulator.

Now I want to give android wear support to an exisitng app. How do I achieve this?

Thanks in advance.

like image 765
Bhavana Avatar asked Jul 04 '14 11:07

Bhavana


People also ask

How do I add existing apps to Android Wear?

Run your mobile app in a device connected to your wear device. The wear app is automatically going to be pushed to your wear device when you install (run) the app in your mobile device. The connection is going to be established between wear and mobile. Both wear and mobile devices can communicate between them.

Do all Android apps work on Wear OS?

What apps from Google Play can I use on my watch? Not all apps which work with Android phones also work on Wear OS devices. When you browse or search for apps on your Wear OS device, all the apps you see will work on Wear OS. When you use Google Play on the web, not all apps will work on your watch.

Can you install APKS on Wear OS?

While Wear OS is rich in features, it's not as polished as watchOS on the Apple Watch. However, just like all Android phones, it's customizable. And along with the apps on the Play Store, you can also sideload APK files just like you can on a smartphone.

Is Android Wear the same as Wear OS?

Wear OS (also known simply as Wear and formerly Android Wear) is a version of Google's Android operating system designed for smartwatches and other wearables.


Video Answer


2 Answers

You need to import an Android Wear module. Right click on the your project and select "Open Module Settings" Then click the "plus" button which should bring up a wizard to add a Wear Module.

like image 128
Marty Miller Avatar answered Sep 21 '22 15:09

Marty Miller


There are two parts to adding a wear module to existing android app. 1. Adding the module itself 2. Packaging it with existing android module

Marty has already explained the 1st part let me add details of the 2nd one -

  1. Include all the permissions declared in the manifest file of the wearable app module in the manifest file of the handheld app module.
  2. Ensure that both the wearable and handheld app modules have the same package name and version number.
  3. Declare a Gradle dependency in the handheld app's build.gradle file that points to the wearable app module:

dependencies { compile 'com.google.android.gms:play-services:5.0.+@aar' compile 'com.android.support:support-v4:20.0.+'' wearApp project(':wearable') }

References

  1. https://developer.android.com/studio/projects/add-app-module.html
  2. https://developer.android.com/training/wearables/apps/packaging.html
like image 24
Aniket Thakur Avatar answered Sep 19 '22 15:09

Aniket Thakur