All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.taimos.dvalin.notification.push.GCMDataMessage Maven / Gradle / Ivy

There is a newer version: 1.35
Show newest version
package de.taimos.dvalin.notification.push;

import java.util.HashMap;
import java.util.Map;

public class GCMDataMessage extends PushMessage {
    
    private final Map data = new HashMap<>();
    
    public GCMDataMessage(String message) {
        this.data.put("message", message);
    }
    
    public void addCustomData(String key, String value) {
        this.data.put(key, value);
    }
    
    @Override
    protected Map getPayload() {
        Map map = new HashMap<>();
        map.put("data", this.data);
        return map;
    }
    
    @Override
    public String getType() {
        return "GCM";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy