【问题标题】:DM101 Smart Watch Android Application - Issue with application not filling the screenDM101 智能手表 Android 应用程序 - 应用程序无法填满屏幕的问题
【发布时间】:2021-10-08 00:03:43
【问题描述】:

当我将应用程序部署到设备进行测试时,应用程序没有填满屏幕。 仅供参考:DM101 智能手表不支持 Wear OS,它使用 Android 7.1.1 (API 25)

如果你想看看它的样子 link to watch

我正在使用 Android Studio 并将清单设置为与设备兼容:


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

    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!--    <uses-feature android:name="android.hardware.type.watch" />-->

    <application
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="false"
        android:resizeableActivity="true"
        android:theme="@android:style/Theme.DeviceDefault"
        >
<!--       <uses-library-->
<!--            android:name="com.android." "com.google.android.wearable"-->
<!--            android:required="false" />-->

<!--        <meta-data-->
<!--            android:name="com.google.android.wearable.standalone"-->
<!--            android:value="true" />-->
        <meta-data
            android:name="android.max_aspect"
            android:value="2"/>
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:label="@string/app_name"
            android:configChanges="orientation"
            android:screenOrientation="landscape">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

问题视觉

picture of the actual issue on watch with app running

【问题讨论】:

    标签: android-studio wear-os wearables


    【解决方案1】:

    我在研究了将近一周后找到了答案。 部分嵌入了我的问题; DM101 不支持 Wear OS,因此我应该开始一个新的 android studio 项目,目标是移动应用程序。

    我的第一个错误是尝试调整 Wear OS 模板清单。

    第二:DM101智能手表在开发者选项下,可以让第三方应用全屏显示;使用适配的 Wear OS Manifest 模板时不起作用。

    【讨论】:

      猜你喜欢
      • 2014-11-13
      • 2014-11-27
      • 1970-01-01
      • 2016-05-10
      • 1970-01-01
      • 2020-10-18
      • 2021-12-09
      • 2011-01-04
      • 1970-01-01
      相关资源
      最近更新 更多