BlackBerry Messenger平台中的注册应用程序
我使用简单的方法在BlackBerry Messenger平台上创建并注册自己的应用程序。我将屏幕推送命令放在set listener部分之后,因此我有以下代码: setListener(platformContextListener); 这个.pushScreen(新应用程序屏幕(platformContext)) 其中ApplicationScreen是我自己的屏幕类: 公共类应用程序屏幕扩展主屏幕{BlackBerry Messenger平台中的注册应用程序,blackberry,sdk,Blackberry,Sdk,我使用简单的方法在BlackBerry Messenger平台上创建并注册自己的应用程序。我将屏幕推送命令放在set listener部分之后,因此我有以下代码: setListener(platformContextListener); 这个.pushScreen(新应用程序屏幕(platformContext)) 其中ApplicationScreen是我自己的屏幕类: 公共类应用程序屏幕扩展主屏幕{ public ApplicationScreen(BBMPlatformContext p
public ApplicationScreen(BBMPlatformContext platformContext){
super(DEFAULT_MENU | DEFAULT_CLOSE);
setTitle("BBM application");
this.add(new LabelField("Screen of BBM application"));
if (platformContext.isAccessAllowed()){
platformContext.getUIService().startBBMChat("Let's chat!");
} else {
int error = platformContext.getAccessErrorCode();
this.add(new LabelField("AccessAllowed: no"));
this.add(new LabelField(translateAccessStatus(error)));
}
}
private static String translateAccessStatus(int status) {
switch (status) {
case BBMPlatformContext.ACCESS_ALLOWED: return "Allowed";
case BBMPlatformContext.ACCESS_PENDING_REGISTRATION: return "Registration Pending";
case BBMPlatformContext.ACCESS_BLOCKED_BY_SERVER: return "Blocked by Server";
case BBMPlatformContext.ACCESS_BLOCKED_BY_USER: return "Blocked by User";
case BBMPlatformContext.ACCESS_BLOCKED_DUPLICATE_INSTANCE: return "Blocked duplicate instance";
default: return "Unknown";
}
}
}
但我总是只能说:不;注册待定。这是什么意思?我没有纠正的是什么?我只需要简单的测试应用程序,它可以注册在BBM,并为我提供接口到它。现在我不知道我错在哪里了。+1我被困在同一个地方。帮助任何人?这是一个例外还是它总是进入“其他”部分?