Skip to content

Commit

Permalink
fix(android): Use app name for default channel
Browse files Browse the repository at this point in the history
  • Loading branch information
dertieran committed Oct 5, 2020
1 parent 0962b76 commit 8bdc013
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/android/com/adobe/phonegap/push/PushPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ private void createDefaultNotificationChannelIfNeeded (JSONObject options) {
}
try {
options.put(CHANNEL_ID, DEFAULT_CHANNEL_ID);
options.putOpt(CHANNEL_DESCRIPTION, "PhoneGap PushPlugin");
String appName = (String) this.cordova.getActivity().getPackageManager()
.getApplicationLabel(this.cordova.getActivity().getApplicationInfo());
options.putOpt(CHANNEL_DESCRIPTION, appName);
createChannel(options);
} catch (JSONException e) {
Log.e(LOG_TAG, "execute: Got JSON Exception " + e.getMessage());
Expand Down

0 comments on commit 8bdc013

Please sign in to comment.