我一直在阅读 BBM SDK 示例和开发指南。对于使用 BBM 平台服务的应用程序,它应该首先注册(这是对 RIM 服务器的调用以请求访问):
BBMPlatformManager.register(BBMPlatformApplication)
的实例BBMPlatformApplication
作为参数传递。在示例中,创建了一个实例,将 UUID 字符串参数传递给构造函数:
/**
* An UUID is used to uniquely identify the application in the test environment
* before the application is available in AppWorld. If the application exists in
* AppWorld, the UUID will not be used to identify the application.
*
* To run this app, you should generate a different UUID, because there is a
* limit to the number of users who can share the same UUID.
* Search for "UUID Generator" on the web for instructions to generate a UUID.
*
* For instance, browse to:
* http://www.uuidgenerator.com/
* and copy a UUID in the 8-4-4-4-12 format on the left side of the page.
*/
private static final String UUID = "";
/**
* BBMPlatformApplication serves to provide certain properties of the application
* to the BBM Social Platform. It is used as a parameter inBBMPlatformManager.register().
*
* If your application wants to be invoked in a non-default way, e.g. when
* you have multiple entry points, you need to subclass from BBMPlatformApplication
* and override certain methods.
*/
private final BBMPlatformApplication _bbmApp = new BBMPlatformApplication(UUID);
阅读评论,似乎只有在为“测试环境”编译时才需要 UUID(我猜这意味着并发用户数量有限)。但是,它没有解释如何为将要在 App World 中发布的应用程序实例化该类。
在在线开发指南示例中,BBMPlatformApplication
被扩展,并再次在构造函数中将 UUID 传递给 super:
private class MyBBMAppPlugin extends BBMPlatformApplication
{
public MyBBMAppPlugin()
{
super( "Insert your UUID here" );
}
}
App World 环境是否需要 UUID?如果有,提交应用后如何获取?
谢谢。