Panache
Panache

Reputation: 987

How to change application icon dynamically for mobile apps?

I am designing an app for various platforms, in which the user is able to select his choice from list of XYZ items and the server responds me the details of the selected item along with the icon image. Now is this possible to change the icon image dynamically in standard, released signed application?

I want to implement this approach in Android, iPhone, BlackBerry Apps. Is there a way to achieve this approach?

Thanks, Panache

Upvotes: 1

Views: 4715

Answers (6)

dave
dave

Reputation: 1

Try this code on the onCreate method:

requestWindowFeature(Window.FEATURE_LEFT_ICON);
setContentView(R.layout.main);
setFeatureDrawableResource(Window.FEATURE_LEFT_ICON,R.drawable.ic_launcher);

-Change "R.layout.main" with your layout source. -Change "R.drawable.ic_launcher" with your icon source.

Upvotes: 0

user2467000
user2467000

Reputation: 15

On iphone is POSSIBLE. Please down load and take a look at "OneTap" or "onetap" App it is free and you will see it is possible for you to do that.

Upvotes: 0

Ashraf Bashir
Ashraf Bashir

Reputation: 9804

For Blackberry:

     HomeScreen.updateIcon(Bitmap.getBitmapResource("icon.png"));
     HomeScreen.setRolloverIcon(Bitmap.getBitmapResource("rollover_icon.png"));

Upvotes: 0

Kiran Kuppa
Kiran Kuppa

Reputation: 1457

  1. As the poster said , on iPhone it is not possible
  2. In Blackberry, check net.rim.blackberry.api.homescreen.HomeScreen. It is possible to update an Icon from running application.
  3. On Android it doesn't seem to be possible. Check here, a similar question has been addressed

Upvotes: 6

muffinmad
muffinmad

Reputation: 641

On Android you can't change application icon. But you can make widget for home screen that will looks like application icon and than update it.

Upvotes: 0

Robin
Robin

Reputation: 10011

I am not sure for other platforms but in iPhone its not possible.

Basically you cannot edit any resources that are included in your app bundle. So that means you cannot edit your splash screen, icons or images and sound files that you have included for notification purpose.

May be you can do that in android as it is more open platform than iphone, but if the icon file is copied some place else where you cannot get access to or don't know how to access then you will not be able to do anything about it.

Upvotes: 0

Related Questions