Unable to install application for wear

I tried to add a wear module to my existing application, tried many solutions, but I can’t understand why my application is not installed on my watch.

What I tried:

Firstly, manual packaging with my application: https://developer.android.com/training/wearables/apps/packaging.html

But I quickly decided not to go through this.

Then I decided to switch to gradle include, so in the build.gradle application I added the following to the end of the dependencies:

debugWearApp project(path:':wear', configuration: 'flavor1Debug') releaseWearApp project(path:':wear', configuration: 'flavor1Release') 

In build.gradle wear, I added the following to the beginning of the dependencies:

 wearApp project(':wear') 

Then, in the android{} wear section of build.gradle right after buildToolsVersion I added the following:

 publishNonDefault true 

What I saw:

  • There is no problem installing the wear app using Bluetooth debugging from wear.

Then, when I install the generated version of my application, I can see in raw form that the android_wear_micro_apk.apk file for res / raw was added, which is my watch application. I also saw the android_wear_micro_apk.xml file in res / xml, so that I assume between the hexadecimal codes, the description of the application to wear.

Then I compare the signatures:

 keytool -list -printcert -jarfile mobile_app.apk keytool -list -printcert -jarfile wear_app.apk 

Using a wearing app created in res / raw. They have exactly the same signature. Then I compared:

 aapt dump badging mobile_app.apk aapt dump badging wear_app.apk 

They have the same package names and version codes and names.

So from this:

  • Wear apk added correctly.
  • Wear apk works if it is set to wear using adb and debug debug
  • Both apk have the same version code, version name and package name
  • Wear does not require any rights.
  • The phone asks for the following permissions
    • android.permission.ACCESS_NETWORK_STATE
    • android.permission.INTERNET
    • com.android.vending.BILLING
    • com.google.android.c2dm.permission.RECEIVE
    • android.permission.VIBRATE
    • android.permission.WRITE_EXTERNAL_STORAGE
    • android.permission.BLUETOOTH
    • android.permission.BLUETOOTH_ADMIN
    • com.samsung.accessory.permission.ACCESSORY_FRAMEWORK
    • com.samsung.android.providers.context.permission.WRITE_USE_APP_FEATURE_SURVEY
    • com.samsung.WATCH_APP_TYPE.Companion
    • com.samsung.wmanager.ENABLE_NOTIFICATION

I really wonder what I could forget.

Thanks for any help

+7
android android wear
source share
3 answers

According to one of Google’s Android developers' Advogates, Android Wear 2.0 will require fully standalone apps for watches and phones and is abandoning the system used from the first version of Android Wear, which automatically installs Android Wear apps based on the apps you have on your device Phone. He directly speaks about this to another developer in the Android Wear Developers Google+ community (our emphasis):

A Wear 2.0 user must visit the Play Store on his watch to install the Program. There is no automatic installation, for example, on Wear 1.X. Wear 2.0 applications have full access to the network and can be installed completely separately from the handheld application, so the main focus is on standalone Wear applications than pocket-oriented 1.X Wear applications.

But what about apps built exclusively for your watch? Well, there the whole store is worth apps that go beyond simple notifications and live on the clock itself. Rather strange, they still need to be installed through your smartphone. So far, at least the new Android Wear 2.0 update will include features for stand-alone applications.

+1
source share

You might want to check the permissions declared in your application. As stated in the Android Wear Permission Request regarding inconsistency of permission models between downloadable and mobile apps,

If your mobile application starts using the Android 6.0 model (API level 23), but your downloadable application does not work, the system downloads the Wear application but does not install it. The first time the user starts the application, the system will prompt them to provide all pending permissions. Once they do, he installs the application. If your application, for example, the face of the watch, does not have a launcher, the system displays a flow notification asking you to provide the permissions necessary for the application.

The suggested solutions in these SO posts can also help:

  • Android Wear app not installed
  • Android Wear app does not install through the handset
0
source share

Forum

On the watch:

  • Settings, disconnect the phone. (An old AW release might say Factory reset.)

  • Do not set the clock yet.

By phone:

  • On Android Wear, use the Disconnect option ...

  • In Android Wear, use Settings, Device Settings and tap the watch name, Press FORGET WATCH.

  • Bluetooth settings. If you still see the watch, click "Forget" ... so that it no longer appears in the list of paired devices.

  • Settings, device, applications, select Google Play Services. Clear cache and Clear data. Remove updates.

  • Settings, device, applications, select the Google application. Clear cache and clear data. Also uninstall updates.

  • Settings, device, applications, select Android Wear. Clear cache and clear data. Also uninstall updates.

  • Play Store, Applications, My Applications, click the Update All button.

0
source share

All Articles