简体   繁体   中英

Wearable not installing app (Android Wear functionality criteria)

I've a Moto 360 and I can't install the wearable app (which is distributed as a beta testing app alongside with a mobile app in the Play Store) in it.

While developing both apps I had no trouble installing it, debugging over bluetooth etc... But when I install the mobile app in my phone through the Play Store the watch doesn't install the wearable app.

Wearable gradle:

apply plugin: 'com.android.application'   
android {
    compileSdkVersion 24
    buildToolsVersion "24.0.3"

    dataBinding{
        enabled = true
    }

    defaultConfig {
        applicationId "my.app"
        minSdkVersion 21
        targetSdkVersion 24
        versionCode 56
        versionName "1.0.0"
    }

    ...

    productFlavors {  
        dev {
            applicationId "my.app.dev"
        }
    }

    dependencies {
        compile project(':shared')

        compile 'com.google.android.support:wearable:2.0.0-alpha2'
        compile 'com.google.android.gms:play-services-wearable:9.6.1'
    }
}

Wearable manifest:

...
<uses-feature android:name="android.hardware.type.watch"/>

<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.CALL_PHONE" />
...

Mobile gradle:

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "my.app"
        minSdkVersion 15
        targetSdkVersion 24
        versionCode 56
        versionName "1.0.0"
    }

    ...

    productFlavors {   
        dev {
            applicationId "my.app.dev"
        }
    }
}

...

dependencies {
    compile project(':shared')
    ...
    wearApp project(':wear')
    compile 'com.google.android.gms:play-services-wearable:9.6.1'
}

Mobile manifest:

...
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>

<!--GCM-->
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE"/>
...

What could it be?

EDIT: Today I've found through the Google Play Console that my wearable app was rejected, but the error message isn't quite specific. I'm following this functionality criteria and this is the email I've received:

Eligibility issues:

-Your app does not have Android Wear functionality that's visible to the user.

If you're adding wearable features to notifications, make sure they're triggering when appropriate.

You can review this checklist to make sure your wearable app is packaged correctly:

  • Include all the permissions declared in the manifest file of the wearable app in the manifest file of the mobile app. For example, if you specify the VIBRATE permission for the wearable app, you must also add that permission to the mobile app.
  • Ensure that both the wearable and mobile APKs have the same package name and version number.
  • Sign your app.
  • Test your app on a variety of different Android Wear devices and configurations.

So, what's: WR-VF - App has Wear functionality that is visible to the user. ?

Thanks.

Your Gradle files don't show any signing details. You must sign both the mobile and wearable apps with the same certificate.

I ended up finding the solution but forgot to share:

dependencies {
    wearApp project(path: ':wear', configuration: 'productionRelease')
    ...
}

Where 'productionRelease' = productFlavor+buildType

EDIT: gradle-plugin-3-0-0-migration

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM