当前位置: 首页>>代码示例>>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;未经允许,请勿转载。