Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Android icon support #45

Closed
wants to merge 9 commits into from
Closed

Conversation

ashconnell
Copy link
Contributor

This PR fixes the android lollipop issue displaying blank icons in issue #20 in a similar manner to what @macdonst mentioned

It adds support for both small-icon and large-icon, and gracefully falls back to how the plugin works prior to this PR if you don't set the android options

Small Icons:

  • add the icon key to your android options which should be a string name of the resource to use (in res/drawables etc)
  • if no android option is set, it falls back to what it currently does without this PR
  • you can also override the android option key from the server by sending an icon key to GCM

Large Icons:

  • add the largeIcon key to your android options which should be a string name of the resource to use (in res/drawables etc)
  • if no android option is set, it does nothing
  • you can also override the android option key from the server by sending a largeIcon key to GCM

@ashconnell
Copy link
Contributor Author

Unfortunately i based the branch of the head of my fork master, so fixes to previous issues are also in here. Not sure what i can do about it?

@ashconnell
Copy link
Contributor Author

Ideally we just need the last commit 9bf8ff6

@ashconnell ashconnell closed this Jul 16, 2015
@ashconnell
Copy link
Contributor Author

Closed as it has contains other issue branch's. I'll re-create the PR

@ashconnell ashconnell deleted the android-icons branch July 16, 2015 04:06
@Muji86
Copy link

Muji86 commented Jan 3, 2016

So how do I specify the icon? do I just add an icon attribute like below?
What is the relative path to this? is it the project www/res folder?

onDeviceReady: function () {
var push = PushNotification.init({
"android": {
"senderID": "1234567890987654321",
"icon": "res/drawables/icon.png"
},
"ios": {"alert": "true", "badge": "true", "sound": "true"},
"windows": {}
});

Thanks

@lock
Copy link

lock bot commented Jun 3, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants