Icon path for android device

Hi guys,

I’am currently implementing push notifications with game thrive in my app. But the problem is I don’t know how to use an icon for my notifications. According to the game thrive api documentation you should insert “small_icon” etc. to your parameters. The question is: Can I use icons wich are in my app folder or wich path is assumed here?

I tried the following but have no clue what to do here:

$fields = array( 'app\_id' =\> "xxxxxxxxxx", 'include\_player\_ids' =\> $playerIDs, 'isAndroid' =\> true, 'contents' =\> $content, 'data' =\> $data, 'small\_icon' =\> "assets/avatars/2.png" //this is the path I use in my app ); 

Thank you 

Markus

Hello Markus,

small_icon only works with resource names which means your icon has to live in a res/drawable-*/ directory in the APK itself. Since basic versions of Corona does not let you place files in this folder your options are more limited than Corona Enterprise. You have a few options if you want your notification small_icon to be different than your application icon:

  1. See Corona’s documentation to change your icon for all notifications.

  2. You can use a system drawable from Android’s drawble documentation.

Also note that the large_icon is more flexible as you can use a image URL to set it to anything you want. The large icon is the one that only displays to the left of the notification.

Thanks.

Hello Markus,

small_icon only works with resource names which means your icon has to live in a res/drawable-*/ directory in the APK itself. Since basic versions of Corona does not let you place files in this folder your options are more limited than Corona Enterprise. You have a few options if you want your notification small_icon to be different than your application icon:

  1. See Corona’s documentation to change your icon for all notifications.

  2. You can use a system drawable from Android’s drawble documentation.

Also note that the large_icon is more flexible as you can use a image URL to set it to anything you want. The large icon is the one that only displays to the left of the notification.

Thanks.