Add API setBadgeNumber for Android

This commit is contained in:
1060420895@qq.com 2020-04-10 15:56:06 +08:00
parent e140dc3b77
commit e0db803818

View File

@ -637,6 +637,11 @@ public class JPushPlugin extends CordovaPlugin {
JPushInterface.setMaxGeofenceNumber(mContext, maxNumber);
}
void setBadgeNumber(JSONArray data, CallbackContext callbackContext) throws JSONException {
int badgeNumb = data.getInt(0);
JPushInterface.setBadgeNumber(mContext, badgeNumb);
}
private boolean isValidHour(int hour) {
return !(hour < 0 || hour > 23);
}