jpush-client是否可以配置Android角标

用户2855263
2021-08-24 08:18 18 1

依赖版本

<dependency>
        <groupId>cn.jpush.api</groupId>
        <artifactId>jpush-client</artifactId>
        <version>3.4.7</version>
</dependency>

推送配置如下

PushPayload payload = PushPayload.newBuilder()
                .setPlatform(Platform.android_ios())
                .setAudience(Audience.all())
                .setNotification(Notification.newBuilder()
                        .addPlatformNotification(IosNotification.newBuilder()
                                .setAlert(alert)
                                .autoBadge()
                                .setSound("happy")
                                .addExtra(EXTRAS_KEY,json)
                                .build())
                        .addPlatformNotification(AndroidNotification.newBuilder()
                                .setAlert(body)
                                .setTitle(title)
                                .addExtras(extras)
                                .build())
                        .build())
                .setOptions(Options.newBuilder().setApnsProduction(true).build())
                .build();

疑问

类似iOS配置autoBadge实现app角标自增显示,是否支持Android版本角标显示?有的话,可以提供一下实例demo吗?

1个回答

热门排序
gptbots-widget