MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / getPushKey

Method getPushKey

CodenameOne/src/com/codename1/push/Push.java:239–252  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

237 ///
238 /// the device key that can be used to push to this specific device.
239 public static String getPushKey() {
240 String key = Preferences.get("push_key", null);
241 if (key != null) {
242 if (!key.startsWith("cn1-")) {
243 String pushPrefix = Display.getInstance().getProperty("cn1_push_prefix", null);
244 if (pushPrefix != null) {
245 return "cn1-" + pushPrefix + "-" + key;
246 }
247 } else {
248 return key;
249 }
250 }
251 return null;
252 }
253
254 /// Subscribes this device to a push topic. Topics are a fan-out mechanism: a single
255 /// server-side push to a topic is delivered to every device subscribed to it, without

Callers 2

invokeStatic0Method · 0.80

Calls 4

getMethod · 0.95
startsWithMethod · 0.95
getInstanceMethod · 0.95
getPropertyMethod · 0.65

Tested by 1