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 は必要ですか? もしそうなら、アプリが提出されたらどうすれば入手できますか?
ありがとう。