Exemplo n.º 1
0
 /** 设置通知栏样式 - 定义通知栏Layout */
 private void setStyleCustom() {
   CustomPushNotificationBuilder builder =
       new CustomPushNotificationBuilder(
           PushSetActivity.this,
           R.layout.customer_notitfication_layout,
           R.id.icon,
           R.id.title,
           R.id.text);
   builder.layoutIconDrawable = R.drawable.ic_launcher;
   builder.developerArg0 = "developerArg2";
   JPushInterface.setPushNotificationBuilder(2, builder);
   Toast.makeText(PushSetActivity.this, "Custom Builder - 2", Toast.LENGTH_SHORT).show();
 }
 void setCustomPushNotificationBuilder(JSONArray data, CallbackContext callbackContext) {
   CustomPushNotificationBuilder builder =
       new CustomPushNotificationBuilder(
           this.cordova.getActivity(),
           R.layout.test_notification_layout,
           R.id.icon,
           R.id.title,
           R.id.text);
   builder.developerArg0 = "Custom Builder 1";
   builder.layoutIconDrawable = R.drawable.jpush_notification_icon;
   JPushInterface.setPushNotificationBuilder(2, builder);
   JSONObject obj = new JSONObject();
   try {
     obj.put("id", 2);
   } catch (JSONException e) {
     e.printStackTrace();
   }
   // callbackContext.success(obj);
 }