DoctorWho
DoctorWho

Reputation: 1116

App doesn't show up in the apps menu on Huawei Watch 2

I'm implementing an application in Android Studio. I'm running into a problem using my Huawei Watch 2. The app works fine, but I don't understand why it doesn't show up in the apps menu on the watch.

Going to Settings -> Apps and notifications -> Info app, I see my app.

What is happening, and how can I fix it?

Here is my Manifest.xml file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.prova._poc">

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

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

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@android:style/Theme.DeviceDefault"
        tools:ignore="GoogleAppIndexingWarning"
        tools:targetApi="ice_cream_sandwich">

        <service
            android:name=".MyfirebaseMessagingService" android:exported="false" >
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT"/>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            </intent-filter>
        </service>

        <service
            android:name=".MyFirebaseInstanceIDService" android:exported="false">
            <intent-filter>
                <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
            </intent-filter>
        </service>

        <uses-library
            android:name="com.google.android.wearable"
            android:required="true" />
        <!--
               Set to true if your app is Standalone, that is, it does not require the handheld
               app to run.
        -->
        <meta-data
            android:name="com.google.android.wearable.standalone"
            android:value="true" />

        <!-- [START fcm_default_channel] -->
        <!-- [START fcm_default_channel] -->
        <meta-data
            android:name="com.google.firebase.messaging.default_notification_channel_id"
            android:value="@string/default_notification_channel_id" />

        <activity
            android:name=".MainActivity"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data
                    android:host="gizmos"
                    android:scheme="example" />
            </intent-filter>
        </activity>
        <activity android:name=".Splash">

            <intent-filter>
                <action android:name="Splash" />
                    <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

    </application>

</manifest>

Upvotes: 0

Views: 266

Answers (2)

Sterling
Sterling

Reputation: 6635

Your main Activity's manifest entry is wrong. Specifically, for it to appear in the app launcher on any Android device, it needs an <intent-filter> element that looks like this:

<intent-filter>
    <action android:name="android.intent.action.MAIN"/>
    <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>

I'm not sure why you have all the other stuff in there, but if you need it, create a second <intent-filter> element for it. You can have several intent-filters for a given <activity>, matching different intents - but the one for the launcher should only contain the action and category shown here.

More info here: https://developer.android.com/guide/components/intents-filters.html

Upvotes: 1

Enrico Valdinosi
Enrico Valdinosi

Reputation: 19

Having apps on your phone doesn't automatically install them on your watch as well. If you go to the Play Store app, then scroll down from the front screen, you'll see a heading marked Apps on your phone: these are all the apps on your phone that have Wear OS companion apps, which you can install by tapping on any of the buttons on the right.

Upvotes: 0

Related Questions