Android Question what is the best icon size for android 5 devices ?

Addo

Well-Known Member
Licensed User
Longtime User
after many trys and fails i am trying to show an icon in notification with b4a as mentioned in this thread

https://www.b4x.com/android/forum/threads/calling-notifcation-from-service.91623/

i am trying to use the built in notification that comes with the ide

sizes that i have tried and fail

16x16 / 24x24 / 36x36 / 72x72

all of them fail to show instead showing a blue circle i have tried with different ide and the notifcation icon shows normally on the android 5 version but the other ide use an old sdk i assume the new sdk version that google force us to use is the problem ? any one else stuck with this issue with android 5 or only me ?
 

Attachments

  • Screenshot_2018-04-12-15-43-23.png
    Screenshot_2018-04-12-15-43-23.png
    62.1 KB · Views: 274

Addo

Well-Known Member
Licensed User
Longtime User
@Peter Simpson are you targeting android 5 devices ?

if so which sdk version you use in b4a 26 ?

because no matter which icon i use it does not show in the big icon only the small icon showing as in the image a blue circle

all other android version works just fine the problem is only with android 5 versions
 
Upvote 0

Addo

Well-Known Member
Licensed User
Longtime User
this problem happened when i set

B4X:
android:targetSdkVersion="26"

if i remove it from manifest the icon show very normally

and I have to target sdk 26 to following the google rules
 
Last edited:
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
I'm currently targeting 27 and it's working perfectly fine for me.

I've just put this together in 5 minutes, it's working perfectly fine for me target 27, my current phone is running Android 8.1.0. Below is a screen shot of a shirt as a notification icon

Shirt icon left of 'Service Notifocation'.
Screenshot_20180414-201843.png



If you get completely lost with the built-in NB, then I strongly suggest that you use the link below and try Erel's new updated NB6, I previously tried it and it works great, but the screen shot above is just using the normal built-in NB.

https://www.b4x.com/android/forum/threads/nb6-notifications-builder-class-2018.91819/

Enjoy...
 
Last edited:
Upvote 0
Top