Any one can suggest me how can I disable default notification in android through PushGCMIntentService class.

I am able to display my custom notification, but not able to disable default PushWoosh notification on message receive event.

Thanks in advance..:-) Sumeet.

asked 04 Jun '14, 10:27
sumeetguha's gravatar image


Hello Sumeet,

Actually, you can create a custom push intent service that extends PushGCMIntentService, that would receive all the main events, such as onRegistered, onUnregistered, onMessage, etc. You can re-define these methods in order to change your application's behaviour.

Please note that you would have to replace the following line in the Manifest

< service android:name="com.arellomobile.android.push.PushGCMIntentService" />


< service android:name=".CustomPushService" />
< meta-data android:name="PW_PUSH_SERVICE" android:value="PACKAGE_NAME.CustomPushService" />
permanent link
answered 05 Jun '14, 11:48
Dmitry%20%20Dyudeev's gravatar image

Dmitry Dyudeev

edited 05 Jun '14, 11:52

Thanks a lot Dmitry, your solution worked for me.

permanent link
answered 06 Jun '14, 12:02
sumeetguha's gravatar image


I'm trying to push message String in JSON format like {"modelName":"XVU-519"}. It's showing the JSON String value in notification/status bar but it's now how I wanted it to be. I tried this solution for me to disable showing of notification and code is below, for simplicity I comment it out not to invoke the overriden method.

public class CustomPushService extends PushGCMIntentService {

private final String TAG = CustomPushService.class.getSimpleName();

protected void onRegistered(Context context, String s) {
    super.onRegistered(context, s);

protected void onUnregistered(Context context, String s) {
    super.onUnregistered(context, s);

protected void onMessage(Context context, Intent intent) {
    //super.onMessage(context, intent);
    Log.d(TAG, "onMessage " + intent.getExtras().getString(PushManager.PUSH_RECEIVE_EVENT));


On my log message is null.

CustomPushService﹕ onMessage null

Any answer what's wrong with my implementation? It would be much helpful if a utility class have method of defining behavior to show or not to show the push message receive. Thanks! :)

permanent link
answered 11 Jun '14, 11:41
ellexy599's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 04 Jun '14, 10:27

question was seen: 2,422 times

last updated: 11 Jun '14, 11:41