I have Implemented my own Push receiver class. But I am getting two push notification. One is my and the other one is default with the messages which I am sending from OneSignal.
I have declared my Receiver in the manifest.
Please help.

To keep our SDK from displaying a notification you will need to omit 'contents' from the notification.
Thanks.
Can I turn off notifications that arrive through the sdk and pocesar all notifications through BroadcastReceiver?
Thanks
Hey Aronmoles,
You can not turn off notification that arrive through the SDK. If you want to turn off then you need to send push notification from OneSingal without Content.
Then, the content you want to send you need to put that content in the additional field.
Below is the example for the same.
Just put your json in the Value filed with a key.
Then use below mentioned code to parse that JSON in your broadcast receiver.
Bundle dataBundle = intent.getBundleExtra("data");
String alert = dataBundle.getString("custom");
JSONObject obj = new JSONObject(alert);
if (obj.has("a")) {
JSONObject o1 = obj.getJSONObject("a");
JSONObject o = new JSONObject(o1.getString("custom"));
}
I am assuming 'custom' is the key in the additional data field.
Also check background data enabled.
Hope this help.
Thanks.
Junaid
@aronmoles
junaidstalkbylove's suggestion above will work. If need to have contents set on your notification we are working on adding a broadcast receiver option.
https://github.com/one-signal/OneSignal-Android-SDK/pull/32#issuecomment-215533646
I also faced that issue in my android 6.0
@Ghayyas There are only two causes that could create duplicated notifications for Android.
cordova plugin list to list them.@jkasten2 Thanks. The issue was multiple push plugins in my file. So Just Remove all Plugins and Platform folder and make build again and it works.
@jkasten2 dude.. you saved a ton of time for me!! cheers.
Most helpful comment
@Ghayyas There are only two causes that could create duplicated notifications for Android.
cordova plugin listto list them.