【发布时间】:2015-12-28 21:42:35
【问题描述】:
我是代号一的初学者;我不知道如何发送推送通知并显示主题。我正在使用此代码:
public class PushDemo implements PushCallback {
private Form current;
public void init(Object context) {
}
public void start() {
if(current != null){
current.show();
return;
}
new StateMachine("/theme");
}
public void stop() {
current = Display.getInstance().getCurrent();
}
public void destroy() {
}
public void push(String value) {
Dialog.show("Push Received", value, "OK", null);
}
public void registeredForPush(String deviceId) {
Dialog.show("Push Registered", "Device ID: " + deviceId + "\nDevice Key: " +Push.getDeviceKey() , "OK", null);
}
public void pushRegistrationError(String error, int errorCode) {
Dialog.show("Registration Error", "Error " + errorCode + "\n" + error, "OK", null);
}
}
【问题讨论】:
-
为语法高亮添加了 Java 标签
-
你看过这个视频了吗? codenameone.com/…
标签: java notifications push-notification codenameone