Search in sources :

Example 1 with PushContent

use of com.codename1.push.PushContent in project CodenameOne by codenameone.

the class WebPushTest method push.

@Override
public void push(String value) {
    PushContent data = PushContent.get();
    if (data != null) {
        System.out.println("Image URL: " + data.getImageUrl());
        System.out.println("Category: " + data.getCategory());
        System.out.println("Action: " + data.getActionId());
        System.out.println("Text Response: " + data.getTextResponse());
    } else {
        System.out.println("PushContent is null");
    }
    System.out.println("Push " + value);
    Display.getInstance().callSerially(() -> {
        Dialog.show("Push received", value, "OK", null);
    });
}
Also used : PushContent(com.codename1.push.PushContent)

Aggregations

PushContent (com.codename1.push.PushContent)1