Skip to content

Commit 90344f4

Browse files
Merge pull request #25 from JoaoCaixinha/master
set default app icon for notification
2 parents 241a2f6 + 5942733 commit 90344f4

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cordovapush",
3-
"version": "0.1.27",
3+
"version": "0.1.28",
44
"description": "This Cordova plugin should be used with the iOS/Android platforms together with the Realtime Messaging library (ORTC) for Push Notifications support.",
55
"main": "index.js",
66
"scripts": {

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
33
id="co.realtime.plugins.CordovaPush"
4-
version="0.1.27">
4+
version="0.1.28">
55

66
<name>cordovapush</name>
77
<author>Reatime</author>

src/android/GcmReceiver.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ private static int getIcon(Context context, String name){
114114
int imageResource;
115115
String uri = "drawable/" + name;
116116
imageResource = context.getResources().getIdentifier(uri, null, context.getPackageName());
117+
118+
if (imageResource == 0){
119+
imageResource = context.getApplicationInfo().icon;
120+
}
117121
return imageResource;
118122
}
119123

0 commit comments

Comments
 (0)