Android 正在播放画面自动命名
Android Auto naming on now playing screen
请看图片。
我不知道如何在 Android Auto 的 "now playing screen" 上添加我的应用名称。它只显示 "Unknown" 而不是我的应用程序名称。
是否需要更改清单中的任何标签?
请指教。
试试这个
将此写入您的 activity 文件
getSupportActionBar().setTitle("app name");
在你的 AndroidManifest.xml 中,添加 android:label="AppName" 申请标签如下:
<application
android:allowBackup="true"
android:icon="@mipmap/logo"
android:label="AppName"
android:theme="@style/AppTheme" >
或者如果您只想要特定 activity 的标签,您还可以添加 android:label="AppName"*在AndroidManifest.xml的activity标签中如下:
<activity
android:label="Activity Title Name"
android:name=".ActivityFileName" >
</activity>
Reference : https://developer.android.com/guide/topics/manifest/application-element.html
android:label : A user-readable label for the application as a whole,
and a default label for each of the application's components.
The label should be set as a reference to a string resource, so that
it can be localized like other strings in the user interface. However,
as a convenience while you're developing the application, it can also
be set as a raw string.
请看图片。
我不知道如何在 Android Auto 的 "now playing screen" 上添加我的应用名称。它只显示 "Unknown" 而不是我的应用程序名称。
是否需要更改清单中的任何标签?
请指教。
试试这个
将此写入您的 activity 文件
getSupportActionBar().setTitle("app name");
在你的 AndroidManifest.xml 中,添加 android:label="AppName" 申请标签如下:
<application
android:allowBackup="true"
android:icon="@mipmap/logo"
android:label="AppName"
android:theme="@style/AppTheme" >
或者如果您只想要特定 activity 的标签,您还可以添加 android:label="AppName"*在AndroidManifest.xml的activity标签中如下:
<activity
android:label="Activity Title Name"
android:name=".ActivityFileName" >
</activity>
Reference : https://developer.android.com/guide/topics/manifest/application-element.html android:label : A user-readable label for the application as a whole, and a default label for each of the application's components.
The label should be set as a reference to a string resource, so that it can be localized like other strings in the user interface. However, as a convenience while you're developing the application, it can also be set as a raw string.