android/src/com/pubnub/api/Pubnub.java
/**
     * @param channels
     *             Channels for which to disable push notifications
     * @param gcmRegistrationId
     *             Google Cloud Messaging registration id
     * @param callback
     *             Callback object
     */
@param channels
Channels for which to disable push notifications
@param gcmRegistrationId
Google Cloud Messaging registration id
@param callback
Callback object
@param channels Channels for which to disable push notifications @param gcmRegistrationId Google Cloud Messaging registration id @param callback Callback object
public void disablePushNotificationsOnChannels(final String[] channels, String gcmRegistrationId, final Callback callback) {
        final Callback cb = getWrappedCallback(callback);
        Hashtable parameters = PubnubUtil.hashtableClone(params);
        String[] urlargs = null;
        urlargs = new String[]{ getPubnubUrl(), "v1", "push", "sub-key",
                this.SUBSCRIBE_KEY, "devices", gcmRegistrationId
        };
        parameters.put("type", "gcm");
        parameters.put("remove", PubnubUtil.joinString(channels, ","));
        HttpRequest hreq = new HttpRequest(urlargs, parameters,
                new ResponseHandler() {
            public void handleResponse(HttpRequest hreq, String response) {
                JSONArray jsarr;
                try {
                    jsarr = new JSONArray(response);
                } catch (JSONException e) {
                    handleError(hreq,
                            PubnubError.getErrorObject(PubnubError.PNERROBJ_INVALID_JSON, 1, response));
                    return;
                }
                cb.successCallback("", jsarr);
            }
            public void handleError(HttpRequest hreq, PubnubError error) {
                cb.errorCallback("", error);
                return;
            }
        });
        _request(hreq, nonSubscribeManager);
    }
public void disablePushNotificationsOnChannels ( final String [ ] channels , String gcmRegistrationId , final Callback callback ) { final Callback cb = getWrappedCallback ( callback ) ; Hashtable parameters = PubnubUtil . hashtableClone ( params ) ; String [ ] urlargs = null ; urlargs = new String [ ] { getPubnubUrl ( ) , "v1" , "push" , "sub-key" , this . SUBSCRIBE_KEY , "devices" , gcmRegistrationId } ; parameters . put ( "type" , "gcm" ) ; parameters . put ( "remove" , PubnubUtil . joinString ( channels , "," ) ) ; HttpRequest hreq = new HttpRequest ( urlargs , parameters , new ResponseHandler ( ) { public void handleResponse ( HttpRequest hreq , String response ) { JSONArray jsarr ; try { jsarr = new JSONArray ( response ) ; } catch ( JSONException e ) { handleError ( hreq , PubnubError . getErrorObject ( PubnubError . PNERROBJ_INVALID_JSON , 1 , response ) ) ; return ; } cb . successCallback ( "" , jsarr ) ; } public void handleError ( HttpRequest hreq , PubnubError error ) { cb . errorCallback ( "" , error ) ; return ; } } ) ; _request ( hreq , nonSubscribeManager ) ; }
@param channels
             Channels for which to disable push notifications
 @param gcmRegistrationId
             Google Cloud Messaging registration id
 @param callback
             Callback object
@param channels Channels for which to disable push notifications @param gcmRegistrationId Google Cloud Messaging registration id @param callback Callback object