0

I have one application but two different manifests which are altered at compile time depending on the ide configurations (xamarin studio in this instance).

Each script alters the manifest no problem however the displayed application name on the device seems to have the previous application label.

Is there a signature stored that I need to change for each install?

This happens on release as well as debug.

Thanks.

<?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"  android:installLocation="auto" package="com.company.example" android:versionCode="2" android:versionName="2.4.3:62512">
<uses-sdk android:targetSdkVersion="23" android:minSdkVersion="16" />
<application android:label="App Name" android:icon="@drawable/mm_icon" android:theme="@style/Theme.Choobi" android:hardwareAccelerated="true" android:largeHeap="true">
    <provider android:name="android.support.v4.content.FileProvider" android:authorities="com.company.example.fileprovider" android:exported="false" android:grantUriPermissions="true">
        <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
    </provider>
</application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.BATTERY_STATS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_LOGS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>
starkshang
  • 8,228
  • 6
  • 41
  • 52
  • Try changing the app_name in strings.xml. By default this is where the label reads from. – ZengoTim Mar 14 '16 at 12:19
  • Ok this actually worked. I always thought `` was where the app name was set. I also looked for references to `@string/ApplicationName` (which is what mine is set as) but didn't find any. Is this internally handled then? And if the app name is derived from here then what is the label for? – Alex Robęrts Mar 14 '16 at 13:17
  • Well, Google is a little unclear on this really. According to their documentation, "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." However in my experiments it always uses the strings.xml resource once compiled to any APK, including a debug. – ZengoTim Mar 14 '16 at 13:51
  • What was actually happening was my first activity was setting its label to @string/ApplicationName. According to [this answer](http://stackoverflow.com/questions/2444040/naming-my-application-in-android#answer-23155350) Android uses the first activity label as the application name if it is set. – Alex Robęrts Mar 14 '16 at 14:25
  • Ah nice work. The Android documentation says, "A user-readable label for the application as a whole, and a default label for each of the application's components." So the inference would be that what is displayed really is the activity label, and if no activity label is supplied then the application label is used as a default value. – ZengoTim Mar 14 '16 at 14:40

0 Answers0