當前位置: 首頁>>代碼示例>>Java>>正文


Java JPushInterface.setPushNotificationBuilder方法代碼示例

本文整理匯總了Java中cn.jpush.android.api.JPushInterface.setPushNotificationBuilder方法的典型用法代碼示例。如果您正苦於以下問題:Java JPushInterface.setPushNotificationBuilder方法的具體用法?Java JPushInterface.setPushNotificationBuilder怎麽用?Java JPushInterface.setPushNotificationBuilder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在cn.jpush.android.api.JPushInterface的用法示例。


在下文中一共展示了JPushInterface.setPushNotificationBuilder方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setStyleBasic

import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
/**
 * 設置通知提示方式 - 基礎屬性
 */
private void setStyleBasic() {
	BasicPushNotificationBuilder builder = new BasicPushNotificationBuilder(PushSetActivity.this);
	builder.statusBarDrawable = R.drawable.ic_launcher;
	builder.notificationFlags = Notification.FLAG_AUTO_CANCEL;  //設置為點擊後自動消失
	builder.notificationDefaults = Notification.DEFAULT_SOUND;  //設置為鈴聲( Notification.DEFAULT_SOUND)或者震動( Notification.DEFAULT_VIBRATE)
	JPushInterface.setPushNotificationBuilder(1, builder);
	Toast.makeText(PushSetActivity.this, "Basic Builder - 1", Toast.LENGTH_SHORT).show();
}
 
開發者ID:LuoLuo0101,項目名稱:JPush,代碼行數:12,代碼來源:PushSetActivity.java

示例2: setStyleCustom

import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
/**
 * 設置通知欄樣式 - 定義通知欄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();
}
 
開發者ID:LuoLuo0101,項目名稱:JPush,代碼行數:11,代碼來源:PushSetActivity.java

示例3: setAddActionsStyle

import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
private void setAddActionsStyle() {
	MultiActionsNotificationBuilder builder = new MultiActionsNotificationBuilder(PushSetActivity.this);
	builder.addJPushAction(R.drawable.jpush_ic_richpush_actionbar_back, "first", "my_extra1");
	builder.addJPushAction(R.drawable.jpush_ic_richpush_actionbar_back, "second", "my_extra2");
	builder.addJPushAction(R.drawable.jpush_ic_richpush_actionbar_back, "third", "my_extra3");
	JPushInterface.setPushNotificationBuilder(10, builder);

	Toast.makeText(PushSetActivity.this, "AddActions Builder - 10", Toast.LENGTH_SHORT).show();
}
 
開發者ID:LuoLuo0101,項目名稱:JPush,代碼行數:10,代碼來源:PushSetActivity.java

示例4: setBasicPushNotificationBuilder

import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
/**
 * 自定義通知行為,聲音、震動、呼吸燈等。
 */
public static void setBasicPushNotificationBuilder(JSONArray data,
                                                   CallbackContext callbackContext) {
  BasicPushNotificationBuilder builder = new BasicPushNotificationBuilder(NXTPushPlugin.getActivity());
  builder.developerArg0 = "Basic builder 1";
  JPushInterface.setPushNotificationBuilder(1, builder);
  JSONObject obj = new JSONObject();
  try {
    obj.put("id", 1);
  } catch (JSONException e) {
    e.printStackTrace();
  }
}
 
開發者ID:pengkobe,項目名稱:nxtpush-cordova-plugin,代碼行數:16,代碼來源:JPushUtil.java

示例5: setStyleBasic

import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
/**
 *設置通知提示方式 - 基礎屬性
 */
private void setStyleBasic(){
	BasicPushNotificationBuilder builder = new BasicPushNotificationBuilder(PushSetActivity.this);
	builder.statusBarDrawable = R.drawable.ic_launcher;
	builder.notificationFlags = Notification.FLAG_AUTO_CANCEL;  //設置為點擊後自動消失
	builder.notificationDefaults = Notification.DEFAULT_SOUND;  //設置為鈴聲( Notification.DEFAULT_SOUND)或者震動( Notification.DEFAULT_VIBRATE)  
	JPushInterface.setPushNotificationBuilder(1, builder);
	Toast.makeText(PushSetActivity.this, "Basic Builder - 1", Toast.LENGTH_SHORT).show();
}
 
開發者ID:xujiaji,項目名稱:HaiNaBaiChuan,代碼行數:12,代碼來源:PushSetActivity.java

示例6: setStyleCustom

import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
/**
 *設置通知欄樣式 - 定義通知欄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();
}
 
開發者ID:xujiaji,項目名稱:HaiNaBaiChuan,代碼行數:11,代碼來源:PushSetActivity.java

示例7: init

import cn.jpush.android.api.JPushInterface; //導入方法依賴的package包/類
/**
 * @param isDebug
 */
public void init(boolean isDebug) {
    JPushInterface.setDebugMode(isDebug);
    JPushInterface.init(mContext);
    JPushInterface.setLatestNotifactionNumber(mContext, LASTEST_NOTIFICATION_NUMBER);
    BasicPushNotificationBuilder builder = new BasicPushNotificationBuilder(mContext);
    builder.notificationFlags = Notification.FLAG_AUTO_CANCEL;
    builder.notificationDefaults = Notification.DEFAULT_SOUND | Notification.DEFAULT_VIBRATE;
    builder.developerArg0 = "data";
    JPushInterface.setPushNotificationBuilder(1, builder);
}
 
開發者ID:RincLiu,項目名稱:Roid-Library,代碼行數:14,代碼來源:RLPushHelper.java


注:本文中的cn.jpush.android.api.JPushInterface.setPushNotificationBuilder方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。