0

Please see the picture.

No name on page

I don't know how to add my app name on "now playing screen" of Android Auto. It shows just "Unknown" instead of my app name.

Does it require to change any label in manifest?
Please advise.

Mahendra Gunawardena
  • 1,956
  • 5
  • 26
  • 45

2 Answers2

1

In your AndroidManifest.xml, add android:label="AppName" in the application tag as follows:

<application
    android:allowBackup="true"
    android:icon="@mipmap/logo"
    android:label="AppName"
    android:theme="@style/AppTheme" >

Or if you want the label only for a specific activity, you can also add the android:label="AppName"* in the activity tag of AndroidManifest.xml as follows:

<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.

Sumaiya A
  • 137
  • 1
  • 14
0

try this

write this in your activity file

        getSupportActionBar().setTitle("app name");
AskNilesh
  • 67,701
  • 16
  • 123
  • 163
  • **From review queue:** May I request you to please add some more context around your answer. Code-only answers are difficult to understand. It will help the asker and future readers both if you can add more information in your post. – help-info.de May 20 '17 at 09:14