本文整理汇总了Java中com.codename1.push.Push类的典型用法代码示例。如果您正苦于以下问题:Java Push类的具体用法?Java Push怎么用?Java Push使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Push类属于com.codename1.push包,在下文中一共展示了Push类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onMain_SendPushAction
import com.codename1.push.Push; //导入依赖的package包/类
@Override
protected void onMain_SendPushAction(Component c, ActionEvent event) {
String dest = findDestinationDevice(c).getText();
if(dest.equals("")) {
dest = null;
}
boolean prod = findProductionEnvironement(c).isSelected();
String googleServerKey = findGoogleServerKey(c).getText();
String iOSCertURL = findIosCert(c).getText();
String iOSCertPassword = findIosPassword(c).getText();
String bbPushURL = findBbPushURL(c).getText();
String bbAppId = findBbAppId(c).getText();
String bbPassword = findBbPassword(c).getText();
String bbPort = findBbPort(c).getText();
Push.sendPushMessage(TOKEN, findPushMessage(c).getText(), dest, prod, googleServerKey, iOSCertURL, iOSCertPassword, bbPushURL, bbAppId, bbPassword, bbPort);
}
示例2: start
import com.codename1.push.Push; //导入依赖的package包/类
public void start() {
if(current != null){
current.show();
return;
}
showLoginForm();
// let the login form show before we register the push so the permission screen doesn't appear on a white
// background
Display.getInstance().callSerially(() -> {
// registering for push after the UI appears
Hashtable args = new Hashtable();
args.put(com.codename1.push.Push.GOOGLE_PUSH_KEY, GCM_SENDER_ID);
Display.getInstance().registerPush(args, true);
});
}
示例3: onMain_SendPushAction
import com.codename1.push.Push; //导入依赖的package包/类
@Override
protected void onMain_SendPushAction(Component c, ActionEvent event) {
String dest = findDestinationDevice(c).getText();
if(dest.equals("")) {
dest = null;
}
boolean prod = findProductionEnvironement(c).isSelected();
String googleServerKey = findGoogleServerKey(c).getText();
String iOSCertURL = findIosCert(c).getText();
String iOSCertPassword = findIosPassword(c).getText();
String bbPushURL = findBbPushURL(c).getText();
String bbAppId = findBbAppId(c).getText();
String bbPassword = findBbPassword(c).getText();
String bbPort = findBbPort(c).getText();
Push.sendPushMessage(findPushMessage(c).getText(), dest, prod, googleServerKey, iOSCertURL, iOSCertPassword, bbPushURL, bbAppId, bbPassword, bbPort);
}
示例4: registerForPush
import com.codename1.push.Push; //导入依赖的package包/类
public void registerForPush()
{
Hashtable meta = new Hashtable();
meta.put(com.codename1.push.Push.GOOGLE_PUSH_KEY, "49326842176");
Display.getInstance().registerPush(meta, true);
Log.p("Push: Register");
}
示例5: registeredForPush
import com.codename1.push.Push; //导入依赖的package包/类
public void registeredForPush(String deviceId) {
Dialog.show("Push Registered", "Device ID: " + deviceId + "\nDevice Key: " + Push.getPushKey(), "OK", null);
String k = Push.getPushKey();
if(k != null) {
s.findDeviceKey().setText("Device Key: " + k);
}
Message m = new Message(Push.getPushKey());
Display.getInstance().sendMessage(new String[] {"[email protected]"}, "Push key", m);
}
示例6: beforeMain
import com.codename1.push.Push; //导入依赖的package包/类
@Override
protected void beforeMain(Form f) {
String k = Push.getPushKey();
if(k != null) {
findDeviceKey(f).setText("Device Key: " + k);
}
}
示例7: registeredForPush
import com.codename1.push.Push; //导入依赖的package包/类
public void registeredForPush(String deviceId) {
Dialog.show("Push Registered", "Device ID: " + deviceId + "\nDevice Key: " + Push.getDeviceKey() , "OK", null);
String k = Push.getDeviceKey();
if(k != null) {
s.findDeviceKey().setText("Device Key: " + k);
}
}
示例8: beforeMain
import com.codename1.push.Push; //导入依赖的package包/类
@Override
protected void beforeMain(Form f) {
String k = Push.getDeviceKey();
if(k != null) {
findDeviceKey(f).setText("Device Key: " + k);
}
}
示例9: registeredForPush
import com.codename1.push.Push; //导入依赖的package包/类
public void registeredForPush(String deviceId) {
Dialog.show("Push Registered", "Device ID: " + deviceId + "\nDevice Key: " + Push.getDeviceKey() , "OK", null);
Log.p("Push: Registered " + deviceId);
}
示例10: onMain_RegisterForPushAction
import com.codename1.push.Push; //导入依赖的package包/类
@Override
protected void onMain_RegisterForPushAction(Component c, ActionEvent event) {
Hashtable meta = new Hashtable();
meta.put(com.codename1.push.Push.GOOGLE_PUSH_KEY, findGoogleProjectId(c).getText());
Display.getInstance().registerPush(meta, true);
}
示例11: onMain_RegisterForPushAction
import com.codename1.push.Push; //导入依赖的package包/类
@Override
protected void onMain_RegisterForPushAction(Component c, ActionEvent event) {
Hashtable meta = new Hashtable();
meta.put(com.codename1.push.Push.GOOGLE_PUSH_KEY, findGoogleProjectId(c));
Display.getInstance().registerPush(meta, true);
}