Android Question Using Adaptive Icons with Request Pin Shortcut

DawningTruth

Active Member
Licensed User
With reference to:

Adaptive Icons


And

Erel's Add Pinned Shortcut script


The Add Pinned Shortcut Script requires an Icon image as BitMap.

If you are using Adaptive Icons how do you access the correct icon image.

I assume it is something like:

B4X:
iconImage = LoadBitmap(...)

Any suggestions?
 

AnandGupta

Expert
Licensed User
Longtime User
Thx @Erel

If I wanted to pull the icon image from the Resources Drawable for consistency reasons with other apps on the device.

How would I do that?
Erel means, "you can also keep your adaptive icon file in assets folder and use it". No problem there.

Regards,

Anand
 
Upvote 0

DawningTruth

Active Member
Licensed User
Erel means, "you can also keep your adaptive icon file in assets folder and use it". No problem there.

Regards,

Anand
Thx Anand,

My concern is that the shape of my icon image on the home page may be different to the particular image shapes on the user's phone for instance:

I may choose an icon like this:

1582884771403.png


And the users phone may have icons like this:

1582884799665.png
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
As per I understand, the adaptive icon is for display on home screen of phone. The apps icon can be different from it, but must be consistent in all places like desktop, web, phone etc.

Check other apps in your phone, they follow this rule.

Regards,

Anand
 
Upvote 0

DawningTruth

Active Member
Licensed User
As per I understand, the adaptive icon is for display on home screen of phone. The apps icon can be different from it, but must be consistent in all places like desktop, web, phone etc.

Check other apps in your phone, they follow this rule.

Regards,

Anand
Thx Anand,

This is for creating an Add To Home button in the app.
 
Upvote 0

DawningTruth

Active Member
Licensed User
It looks like there is a way to do this, but it is quite involved. Essentially you have to convert a drawable to a bitmap. I therefore decided to keep it simple. I used the largest image generated by Android Studio and it added it to my home screen.

So did not use adaptive icons on my home.
 
Upvote 0
Top