Notification icon on Android

Hi All,

I have a question regarding the notification icon in Android.

Now, when we use [ush notification in Android, we get the default triangle hazard icon. We read in this post: https://developer.coronalabs.com/forum/2013/01/16/custom-android-push-notification-status-bar-icon that we need to put the png icon somewhere in the res directory.

So we created “res” directory in the root project directory and created a “drawable” directories (also -ldpi, -mdpi, -ldpi) and can not see the icon when the notification happens.

We also name the icon file: corona_statusbar_icon_default.png in each directory.

So my question is:
Why can’t we see the Icon, do we put the icons in the right place? [import]uid: 156140 topic_id: 35830 reply_id: 335830[/import]

Hi @lior63,
I believe that Joshua has detailed the steps in this forum post. Hopefully this sets you on the correct path. :slight_smile:
http://developer.coronalabs.com/forum/2012/12/05/custom-icon-local-notifications-android

Best regards,
Brent [import]uid: 200026 topic_id: 35830 reply_id: 142539[/import]

Hi Brent,

Thanks for the list, but this is the same post i have seen.

After putting all the icons there, i still can’t see the my icon in the notification, i still see the default triangle hazard.

Any ideas why?
[import]uid: 156140 topic_id: 35830 reply_id: 142982[/import]

Hi @lior63,
I believe that Joshua has detailed the steps in this forum post. Hopefully this sets you on the correct path. :slight_smile:
http://developer.coronalabs.com/forum/2012/12/05/custom-icon-local-notifications-android

Best regards,
Brent [import]uid: 200026 topic_id: 35830 reply_id: 142539[/import]

Hi Brent,

Thanks for the list, but this is the same post i have seen.

After putting all the icons there, i still can’t see the my icon in the notification, i still see the default triangle hazard.

Any ideas why?
[import]uid: 156140 topic_id: 35830 reply_id: 142982[/import]

Hi Brent,

Thanks for the list, but this is the same post i have seen.

After putting all the icons there, i still can’t see the my icon in the notification, i still see the default triangle hazard.

Any ideas why?
[import]uid: 156140 topic_id: 35830 reply_id: 142982[/import]

Hi Brent,

Thanks for the list, but this is the same post i have seen.

After putting all the icons there, i still can’t see the my icon in the notification, i still see the default triangle hazard.

Any ideas why?
[import]uid: 156140 topic_id: 35830 reply_id: 142982[/import]

Get rid of the “res” directory.  That only applies to developers who do native Android development.  The procedure on how to set up custom notification icons between native builds and Corona Simulator builds is completely different.

Brent was correct.  For Corona Simulator builds, you need to follow the procedure that I’ve posted here…

   http://forums.coronalabs.com/topic/28087-custom-icon-for-local-notifications-in-android/?p=151402

You must add all of those icons to the root directory of your Corona project.  The file names are also case sensitive.  So, double check your casing… or copy and past the file names that I’ve listed in the above link to your file names.

I’ve re-tested this with daily build #1095 and verified that I can still display custom icons as described in the above link.  So there’s hope! :slight_smile:

hi 

   i am using the corona version of Version 2013.1076 (2013.4.3) .  I want to have local notifications for my app on android . i tried the sample code of the corona Notfiications/LocalNotifications project .That’s not working on the android mobile when i tried but works fine on the simulator .can anyone please help me with this issue. 

  2) We are facing one more issue that the app is getting reopened when i click on the icon of my app (if previously the app is in suspended ) .Is there anything  that i need to do in build settings  as the app .

       thanks in advance

Get rid of the “res” directory.  That only applies to developers who do native Android development.  The procedure on how to set up custom notification icons between native builds and Corona Simulator builds is completely different.

Brent was correct.  For Corona Simulator builds, you need to follow the procedure that I’ve posted here…

   http://forums.coronalabs.com/topic/28087-custom-icon-for-local-notifications-in-android/?p=151402

You must add all of those icons to the root directory of your Corona project.  The file names are also case sensitive.  So, double check your casing… or copy and past the file names that I’ve listed in the above link to your file names.

I’ve re-tested this with daily build #1095 and verified that I can still display custom icons as described in the above link.  So there’s hope! :slight_smile:

hi 

   i am using the corona version of Version 2013.1076 (2013.4.3) .  I want to have local notifications for my app on android . i tried the sample code of the corona Notfiications/LocalNotifications project .That’s not working on the android mobile when i tried but works fine on the simulator .can anyone please help me with this issue. 

  2) We are facing one more issue that the app is getting reopened when i click on the icon of my app (if previously the app is in suspended ) .Is there anything  that i need to do in build settings  as the app .

       thanks in advance