react native 使用jpush-react-native设置statusBarDrawable为图标test不显示

android
react-native
标签: #<Tag:0x00007fb8475fdb68> #<Tag:0x00007fb8475fd528>

(jorli) #1
/**
 * 设置通知提示方式 - 基础属性
 */
@ReactMethod
public void setStyleBasic() {
    mContext = getCurrentActivity();
    BasicPushNotificationBuilder builder = new BasicPushNotificationBuilder(mContext);
    builder.statusBarDrawable = IdHelper.getDrawable(mContext, "test");
    builder.notificationFlags = Notification.FLAG_AUTO_CANCEL;  //设置为点击后自动消失
    builder.notificationDefaults = Notification.DEFAULT_SOUND;  //设置为铃声( Notification.DEFAULT_SOUND)或者震动( Notification.DEFAULT_VIBRATE)
    JPushInterface.setPushNotificationBuilder(1, builder);
    Logger.toast(mContext, "Basic Builder - 1");
}

#2

1、设置通知栏样式的文档
2、关于图标:

3、推送的消息的时候 通知栏编号(builder_id)需要填1才会在收到后用你定制的这个样式