Skip to content

Commit

Permalink
Change the notification small icon to launcher icon. #237
Browse files Browse the repository at this point in the history
  • Loading branch information
seanwu1105 committed Nov 26, 2020
1 parent 66edb65 commit 3dc1b58
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions android/app/src/main/assets/capacitor.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"SplashScreen": {
"androidScaleType": "CENTER_CROP",
"launchAutoHide": false
},
"LocalNotifications": {
"smallIcon": "ic_capture_lite",
"iconColor": "#564dfc"
}
},
"cordova": {},
Expand Down
5 changes: 5 additions & 0 deletions android/app/src/main/res/drawable/ic_capture_lite.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="53dp" android:viewportHeight="52.98"
android:viewportWidth="47.52" android:width="47.537937dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#fff" android:pathData="M47.44,8.08l-5.16,6.44A20.45,20.45 0,0 0,27.69 7.86a18.45,18.45 0,1 0,0 36.89,21.64 21.64,0 0,0 14.59,-6.21l5.24,5.84A29.76,29.76 0,0 1,27.24 53C11.9,53 0,41.38 0,26.34 0,11.45 12.05,0 27.54,0A28.9,28.9 0,0 1,47.44 8.08Z"/>
<path android:fillColor="#6ee4d3" android:pathData="M17.74,26.42a10.23,9.98 0,1 0,20.46 0a10.23,9.98 0,1 0,-20.46 0z"/>
</vector>
4 changes: 4 additions & 0 deletions capacitor.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"SplashScreen": {
"androidScaleType": "CENTER_CROP",
"launchAutoHide": false
},
"LocalNotifications": {
"smallIcon": "ic_capture_lite",
"iconColor": "#564dfc"
}
},
"cordova": {},
Expand Down
2 changes: 0 additions & 2 deletions src/app/services/notification/notification.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ export class NotificationService {
return this.currentId;
}

// TODO: Add on-going configurations when this PR got merged and released:
// https://github.com/ionic-team/capacitor/pull/3165
notify(id: number, title: string, body: string) {
console.log(`${title}: ${body}`);
subscribeInBackground(defer(() => LocalNotifications.schedule({
Expand Down

0 comments on commit 3dc1b58

Please sign in to comment.