Closed somefakeuser closed 9 years ago
To set the "smallIcon" (Android only) you need to put your images in the "drawable" folder (required) and provide the PNG image file name always without extension.
To set the "largeIcon" (Android only) you can use an external url to a PNG image... or need to put your PNG image in assets folder (not at drawable folder) and you need to provide the image file name always with extension.
Try to send the following JSON payload data from Parse.com:
Large icon from URL and small icon with default app icon:
{
"alert" : "Hello world!",
"largeIcon" : "http://rocketdock.com/images/screenshots/supermario.png"
}
Large icon from assets folder ("/app/assets/android" for alloy or "/Resources/android" for classic):
{
"alert" : "Hello world!",
"largeIcon" : "mario.png"
}
Custom small icon from resources (required do put png image in "/platform/android/res/drawable"):
{
"alert" : "Hello world!",
"smallIcon" : "mario"
}
Combined small icon and large icon:
{
"alert" : "Hello world!",
"smallIcon" : "mario",
"largeIcon" : "http://rocketdock.com/images/screenshots/supermario.png"
}
That's all.
Success to your project!
Regards,
Arley
Hi there Arley,
Just to say thanks very much for this - it’s now working.
Thanks again for the module, it’s saved me a lot of time.
All the best with your own projects,
Hi there,
I’ve paid for and am using your Titanium module PushClient for an App for both iOS and Android. I’m using it with Parse and generally it’s working well.
I want to specify a different icon that appears as part of the notifications other than my main app icon so that it conforms with the Android style guidelines (it’s black and white and smaller)
Your change notes imply there is a way to specify a different notification icon for Android but there doesn’t seem to be a mention of it in your documentation and I can’t figure out how to do it. Would you be able to point me in the right direction please?
Thanks in advance,