This is my first question on StackOverflow, so please bear with me if I fail to articulate my question.
I am working on an Android app that targets Android O, and I want the launcher to NOT show the icon adapted i.e. remove the white background.
I tried to use adaptive icons and they work, but the problem is that they change the icon itself making it rouned, square, squircle and tear-shaped.
At first I thought it's out of my hands, but some other apps (facebook, whatsapp and snapchat for example) have their icons unchanged.
tl;dr: How can I force an icon to be used by the launcher on Android O?
The other apps you mention (Facebook, Whatsapp, and Snapchat) don't yet target Android O. Once they do, they'll also be forced to have an adaptive icon as well.
Just remove the targetSdkVersion property from your app level build.gradle file. It will work.
Related
I have recently pushed a React Native app to playstore and used an Icon to represent in playstore.When Dark Mode is enabled my app's playstore Icon's background turns black which makes Icon ugly. Now my doubt is
Do I have to use white background for Icon for all the future apps?
OR
Is there any way to make our Icon to be flexible in both Normal Mode and Dark Mode?
regarding your first question if the issue is only inside of playstore I think light background will not hurt. I dont think google play store offers a way to make this adaptive on their website.
regarding the second one, yes! inside your android project you can place alternative versions of your launcher icon inside of /res/mipmap-night-** resource folder btw it is possible you will need to create it. And also I recommend you actually create /res/mipmap-night-hdpi, /res/mipmap-night-xhdpi etc. to take into account the different screen resolutions. Since you are developing with react you would have to dive into your android project to find the res folder, or alternatively open your project in android studio and you will see it right away. this should change how your app looks on your users home screen
UPDATE
by mistake I had pointed to the drawable-night-** folders in my answer but Launcher icons in android are actually saved in the mipmap folders. I have now corrected this. I also tryed it out and it works (however I had to restart my device for it to take effect. asuming your users dont switch constantly between day and night mode they will always se the right icon for them)
Play Store icon it is a different image that you upload.
Make a complete white (or whatever) background to that image. In the official guidelines, Google says that you shouldn't make a partial background.
There is no "dark" icon in the Google Play Store; if you leave it transparent, it will display the default background color for each state (normal-dark).
This is my first question on StackOverflow, so please bear with me if I fail to articulate my question.
I am working on an Android app that targets Android O, and I want the launcher to NOT show the icon adapted i.e. remove the white background.
I tried to use adaptive icons and they work, but the problem is that they change the icon itself making it rouned, square, squircle and tear-shaped.
At first I thought it's out of my hands, but some other apps (facebook, whatsapp and snapchat for example) have their icons unchanged.
tl;dr: How can I force an icon to be used by the launcher on Android O?
The other apps you mention (Facebook, Whatsapp, and Snapchat) don't yet target Android O. Once they do, they'll also be forced to have an adaptive icon as well.
Just remove the targetSdkVersion property from your app level build.gradle file. It will work.
I would like create app with custom badge number in app icon, like in facebook app: App icon in home screen shows pending/unread notifications. How to set custom badge number programatically in android. I've seen similar questions in stack with answers like it "doesn't support in stock android". Seen many answers and were old. I think they were for old versions. Is it possible in newer versions of android? If possible how to add customized badge number ? If the option is still doesn't support by android ignore this question and please let me know it. I'm developing kind of confidential app, so that i couldn't use third part libs. Is there any inbuilt methods to handle badges or possible to create badge?
There is popular github that works app icon badges for most Android devices. Sure still some platform, some devices didn't support that. But those libraries almost cover all of the devices that support app icon badges.
https://github.com/leolin310148/ShortcutBadger
So to your question, No.
Because Android framework didn't define the app notification badges before.(I am not sure if Android default framework have it now. I've been search the keyword of BADGE_COUNT_UPDATE in the ASOP android7 and nothing found) So all those custom badges are made by device manufacturer framework developer.
You can check how they setup badges numbers for each manufacturer here
https://github.com/leolin310148/ShortcutBadger/tree/master/ShortcutBadger/src/main/java/me/leolin/shortcutbadger/impl
To another question. I use keyword badge to search the ASOP source code and didn't find any noticeable part about app icon badges. And even there is one inbuilt framework method about this after certain version of android. The framework still cannot cover all the devices before the certain version. So not quite sure what do you mean by confidential app, but using libraries is the first choice to cover most android devices based on the real situation like this.
I've successfully implemented dynamic Android launcher icon switching functionality in my app using multiple activity-aliases with different icons and labels associated with them as detailed in this Chainfire blog post on the topic:
http://www.chainfire.eu/articles/133/_TUT_Supporting_multiple_icons_in_your_app/
And in this StackOverflow answer:
https://stackoverflow.com/a/15249542/1007714
This solution, however, only works for the launcher icon found in the app tray and on the homescreen. The problem I now have is that the icon used at the OS level (such as for multi-tasking, the uninstall popup, or the Application Manager listing) remains the original or becomes the default generic Android icon if you haven't set one at the application level in the manifest.
Has anyone found a solution to this, or does everyone who uses this solution just tolerate a mismatch (or absence) in the icon at the OS level?
I found a badge on my Android device today and I'm wondering how they did this.
Look at the "Email" icon next to "Camera" and "Talk". How are they getting the number 2 on the corner of that icon?
Android doesn't support updating the app icon natively. I'm not familiar with TouchWiz, but I'm pretty sure Samsung didn't implement this either.
However you could create an AppWidget, that looks like an icon. This would give you the ability to dynamically update the icon.