gpt4 book ai didi

java - BlackBerry Messenger 集成 : UUID for production environment

转载 作者:行者123 更新时间:2023-11-30 04:42:43 24 4
gpt4 key购买 nike

我一直在阅读 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 中发布的应用程序实例化该类。

online development guide exampleBBMPlatformApplication 被扩展,并且再次在构造函数中将 UUID 传递给 super:

private class MyBBMAppPlugin extends BBMPlatformApplication
{
public MyBBMAppPlugin()
{
super( "Insert your UUID here" );
}
}

App World 环境需要 UUID 吗?如果是这样,提交应用后如何获取它?

谢谢。

最佳答案

UUID 用于唯一标识测试/预生产环境中的应用程序。一旦您将应用程序上传到 BlackBerry App World,它就不再被使用。更改您的 UUID 允许您独立地执行应用程序测试。

此信息来自http://devblog.blackberry.com/2012/05/bbm-uuid/

关于java - BlackBerry Messenger 集成 : UUID for production environment,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11879413/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com