android application icon launcher strange behaviiour - android

i created an application using android studio and referenced to the app name and app icon with dynamic reference to String file and drawable files and when i tried to change the app name and app icon with new one the application is installed with the old name and old icon and if i clicked uninstall the app uninstall confirmation dialog appears with the new icon and new name
my manifest application tag
<application
android:name="main.app.misc.MainApplication"
android:allowBackup="false"
android:hardwareAccelerated="false"
android:icon="#drawable/launcher_demo"
android:label="#string/demo_appName"
android:largeHeap="true"
android:theme="#style/Theme.CustomTheme" >
and my launcher activity
<activity
android:name="main.app.welcome.Splash"
android:configChanges="locale|orientation|screenSize"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
can any one help me

Related

Show App Icon in View with Opened Apps on Android

i created a new Project with Android Studio, created a new Image Asset of the App Icon. The Icons have been saved in the mipmap folders, not as i'm used to in the drawables.
Now ia can use the App Icon as my Icon in the ActionBar etc. but when i open the view on my Smartphone which shows all running programs (dont know how this View is called) it uses the standars Android Icon, not the Icon i set.
How can i make sure that it uses my App Icon everywhere?
My AndroidManifest:
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label=" Pentle" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Make sure you set the new icon in your Manifest in the <Applicaton> tag.
It should be something like this
<Application
android:icon="#drawable/your_image"
.... />

Change icon of activity in my application specific to share

I implement an app in which is one Activity designed for sharing text. Everything works fine, text is sharing etc. But if I would like to share some text, executing share action offered some applications which can handle sharing text. There is my application but shown icon is not equal of default ic_launcher. How can I change icon of my app when system offers me apps which can handle sharing text?
thanks.
you can change your app in manifest file..
<application
android:icon="#drawable/ic_launcher" //---- here--put your new icon in drawable folders and change it here
android:label="#string/app_name" // same thing.. change your app name in string.xml file.. then, here app name will change automatically....
android:theme="#style/AppTheme" >
<activity
android:name=".ui.MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
try this..
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

App taking splash as the app name

Can anyone tell me how to change the app name? My app is taking splash as the app name on the Emulator since my first activity is splash.
EDIT:
It takes "splash" as the app name before the app is launched. Once it is launched the right name is displayed.
Manifest:
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.sanginfo.temperatureconvertor.SplashActivity"
android:label="#string/title_activity_splash" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.sanginfo.temperatureconvertor.LoginActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.LoginActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
In your manifest file under application tag change this tag with whatever you want as a app name..android:label="#string/app_name"
use the name attribute on application node as describe in :
http://developer.android.com/guide/topics/manifest/application-element.html
#stylojack_10
Go to the File name String.xml (Project->res->values->string.xml)
change the value of the tag name app_name.
you can even make your own tag there and make change in Android Manifest file under tag find android:label="#string/"your custom app name""
Hope this will resolve your problem
Solution 1: (this solution works most of the time)
Go to res -> values -> strings.xml -> appname, change name of the app there.
No go to Android Manifest and check if it looks like this:
<application
android:label="#string/app_name"
.......................
>
If android:label="#string/app_name" is changed to android:label="MyApp", than change it to one shown above. Your problem should be solved.
Solution 2:
there was a file called OldAppName.launch
it is located in workspace/.metadata/.plugins/org.eclipse.debug.core/.launches
also stuff on:
/User/workspace/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings
also a glitch in Eclipse to show old app name instead of changing the name.

Activity label appears on home screen instead of app name

In AndroidManifest.xml, the application tag has:
android:label="#string/app_name"
and app_name in res/values/strings.xml reads "My App".
But after running or debugging on both the emulator and an attached device, the app icon on the home screen displays the main activity's label instead of the app label. Is this expected behavior, and if not why might it be happening?
Yes it is Expected behavior. The app name will be seen in the applications tab in settings. The main screen displays the launcher activity's label.
If you want to display the app_name property as the label of your application below the launcher icon you can specify the android:label property in the application tag of your android manifest file.
For example:
<application
android:name=".MyApp"
android:icon="#drawable/myIcon"
android:label="#string/app_name">
A workaround for this behaviour:
In manifest:
<application
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
In MainActivity's onCreate:
getSupportActionBar().setTitle(R.string.activity_name);
By doing this, the app name will appear on home screen, and you can still have a different title for your launcher activity.
People see here, I got the same issue and finally resolve it.
Launcher show only the mainActivity because activity label is preferred for Phone Launcher.
So one want show Application labe rather than MainActivity's, he should delete the line:
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter android:label="#string/app_name" >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
delete this:
android:label="#string/title_activity_main"

Android Marketplace icon

This is probably a dumb question but I can't find it anywhere... Which icon is used in your marketplace listing? Is it always the application android:icon="#drawable/icon" setting from your manifest file or can you have a launch icon different from your marketplace listing?
Android Market uses application icon, but you can have different launch icon if you assign another one to your default (starting) activity.
https://developer.android.com/guide/topics/manifest/application-element.html#icon
https://developer.android.com/guide/topics/manifest/activity-element.html#icon
I think an example will do:
// app-wide, incl. Android Market
<application
android:icon="#drawable/icon"
android:label="#string/app_name"
>
// launcher only
<activity android:name=".activity.Launcher"
android:label="#string/launcher_title"
android:icon="#drawable/launcher_icon"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

Categories

Resources