Question
How can I change the badge icon image in ios4? I would like it to look like this:
You can't. iOS puts the new ribbon there. The developer cannot control that.
Related
I tried making the small icon exactly 16x16, gray-scaled, nothing but gray and white (the gray color being hex value 616161), to create a silhouette of my application icon.
Yet no matter what it just shows up as a white/gray square in the notifications. What am I doing wrong?
(My min api is 21, assuming it is relevant)
Follow this link
First let’s understand the Android documentation which is as follows
“Update or remove assets that involve color. The system ignores all
non-alpha channels in action icons and in the main notification icon.
You should assume that these icons will be alpha-only. The system
draws notification icons in white and action icons in dark gray.”
Now this is easy to miss and I have seen many apps that are live in the app store with thousands of users who haven’t followed the mentioned guidelines.
So let me explain in detail how you can convert your notification icon to an Android friendly one with a few clicks.
In your favourite image editor open up your icon file. Convert all parts of the image that you don’t want to show to transparent pixels. All colors and non transparent pixels are displayed in white. Let us go through an example.
EDITED: Thanks #Andrey Patseiko for the tool
For notification you have to use different icons for different versions of android:
Notification notification = new Notification.Builder(context)
.setAutoCancel(true)
.setContentTitle("My notification")
.setContentText("Look, white in Lollipop, else color!")
.setSmallIcon(getNotificationIcon())
.build();
return notification;
Get notification icon on the basis of version
private int getNotificationIcon() {
boolean useWhiteIcon = (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP);
return useWhiteIcon ? R.drawable.icon_silhouette : R.drawable.ic_launcher;
}
Along with new features and capabilities, Android 5.0 includes a variety of system changes and API behavior changes. See the notification behavior changes.
Notifications are drawn with dark text atop white (or very light)
backgrounds to match the new material design widgets. Make sure that
all your notifications look right with the new color scheme. If your
notifications look wrong, fix them:
Use setColor() to set an accent color in a circle behind your icon image.
Update or remove assets that involve color. The system ignores all non-alpha channels in action icons and in the main notification icon.
You should assume that these icons will be alpha-only. The system
draws notification icons in white and action icons in dark gray.
So, basically you have to use silhouette icons as notification icon for API Level 21+
For the iOS8 application, the AppStore have to upload the preview. With the Yosemite, I use the newset iMovie(10.0.6) to make the application preview. I just want to add some title or text over the video, but i find something dispointed. There is no way to set title background color transparent, that is impossible.!
![]
This may be a foolish question. But I'm asking it because of my curiosity. Is there is any possible way to customize an iOS application icon badge image(as below:)..?
Thanks in advance...
Not possible at all. You have to use Default. After the app launch you can show custom badge icon of the UITabbar.
All the best !!!
If you mean the badge number that can be shown on an app icon, in white text over a red circle, then no, it cannot be set to a custom image. You can only control the number that is shown. It is set using the -[UIApplication setApplicationIconBadgeNumber:] method, i.e., the applicationIconBadgeNumber property on UIApplication:
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:99];
I have a possible solution, instead of using the OS to add a badge, what if you programmatically replace the app icon with a version that has the badge built into it.
You can use libraries such as:
https://github.com/skb1129/react-native-change-icon
The only question is, does anyone know if Apple would have any objections?
I'm trying to replace the blue bullet icon in the notification center for my app.
I thought that alertLaunchImage would allow me to do this. I have tried doing something like
not.alertLaunchImage = #"customBullet";
but it keeps the default blue bullet. Is the bullet customizable at all?
Update
In the screenshot below, i'm trying to customize the blue bullet on the left. I know already how to customize the main image (in this case the gmail icon)
Nope. It just means "new message" and it's managed by the system, not the apps.
I know the trick to localize the application title for a windows phone 7 application:
http://patrickgetzmann.wordpress.com/wp7-localize/#comment-249
http://msdn.microsoft.com/en-us/library/ff967550%28v=vs.92%29.aspx
Is there a (maybe similar) way to localize the application icon (I need a different icon for each language) and default tile icon (called "background image" in project settings)?
You can modify the image of the tile icon when the app first starts using ShellTile.ActiveTiles.First().Update(...). Don't know about application icon or changing things before you start, but perhaps the sample code from that msdn article would also work for additional resources, so when they ask to define resources like this one:
AppTileString, 200, "The English (United States) name of your application to be displayed in the application Tile when pinned to Start."
-that is later used in the manifest file as:
#AppResLib.dll,-200
-maybe you could also define something like
AppTileIconPath, 300, "The name of the tile icon file"
Then try using it like:
<BackgroundImageURI IsRelative="true" IsResource="false">#AppResLib.dll,-300</BackgroundImageURI>
This might not work really, but it's worth a shot if you really want to localize your icons.
You can localize the app tile as described here. The app icon can't be updated as far as I know. The title icon can be changed per code (ShellTile.ActiveTiles.First().Update).
You can delete the SplashScreenImage.jpg file - this resulsts that you will be navigated to the first page immediately. On the page you can display the localized content while doing your init stuff. After you are done with initialization you can navigate to your second page. To satisfy the certification requirements you'll need to remove the navigation entry for your splash screen page (NavigationService.RemoveBackEntry() - Mango only API).