How to set app icon using an API in android studio - android

I am trying to change app icon dynamically from backend, i don't know if that is possible or not but since we are able to use activity-alias to change icon, this looks feasible.

Related

How do I can customise every app icon using java?

I want to customize my android device with custom icons for every app. I have downloaded whicons, but they don't cover all apps, so Now I want to make my own icons for the apps that whicons doesn't cover in android studio. In conclusion I want to make app that can change other apps icons.
I haven't done anything yet, because I'm like new in java programming. I don't know much about android api.

Change App Icon by downloading from server at runtime

I want to change the app icons at runtime. I went through the below article:
https://blog.jakelee.co.uk/programmatically-changing-app-icon/
, which talks about using <activity-alias> to change the app icon at run time. I tried it and it works. But I want to change the app icon by downloading it from the server. I know, it is not possible to do using <activity-alias> as this needs to be set in the manifest. I searched, if there is an alternative for this, but couldn't find it. So I want to know whether it is possible to change the app icon, by downloading the icons from the server?

How to disable adaptive icon in my project? [duplicate]

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.

Android: get a handler to the app's icon from an SDK

I am building an Android SDK which sometimes need to display notifications to the user in the notification drawer:
Naturally, I would like to use the app icon when setting the setSmallIcon() property of the NotificationCompat.Builder. The problem is that an SDK does not know in advance what is the icon of its embracing app.
Is there a way to get a reference to the app icon asset programatically, in run time?

How to correct Android icon mismatch when using activity-alias to dynamically change launcher icon?

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?

Categories

Resources