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);
});
}
Aggregations