我刚刚实现了OneSignal SDK,但工作正常,但是我开始收到重复的通知,在我的代码中,我改写了NotificationReceivedHandler
以使其成为静默模式,但是过了一会儿,我再次收到了相同的消息
public class NotificationExtenderBare extends NotificationExtenderService {
@Override
protected boolean onNotificationProcessing(OSNotificationReceivedResult receivedResult) {
OverrideSettings overrideSettings = new OverrideSettings();
JSONObject obj = receivedResult.payload.toJSONObject();
try {
String body = obj.getString("body");
String title = obj.getString("title");
Log.d("body",body);
} catch (JSONException e) {
e.printStackTrace();
}
return true;
}
}