public void unsubscribe(Installation installation, String categoryToUnsubscribe) {

        String url = "";
        try {
            url = IID_URL + installation.getDeviceToken() + "/rel/topics/" + URLEncoder.encode(categoryToUnsubscribe, StandardCharsets.UTF_8.toString());
        } catch (UnsupportedEncodingException e1) {
            //
        }

        try {
            delete(url);
        } catch (IOException e) {
            logger.debug("Unregistering device from topic was unsuccessfull");
        }
    }
public void unsubscribe ( Installation installation , String categoryToUnsubscribe ) { String url = "" ; try { url = IID_URL + installation . getDeviceToken ( ) + "/rel/topics/" + URLEncoder . encode ( categoryToUnsubscribe , StandardCharsets . UTF_8 . toString ( ) ) ; } catch ( UnsupportedEncodingException e1 ) { } try { delete ( url ) ; } catch ( IOException e ) { logger . debug ( "Unregistering device from topic was unsuccessfull" ) ; } }
Unsubscribes device from single category(topic)

@param installation Installation object containing correct variant property of AndroidVariant class
@param categoryToUnsubscribe category(topic) that device should be unsubscribed from