08-09-2012 03:01 AM
Hi.
I'm developing an application which interacts with BBM, but it should also be usable in devices without BBM installed. The app is intended to be published on App World.
At some point in the BBM SDK samples, a new BBMPlatformApplication has to be instantiated in order to register it. The code in the samples shows how to create an instance of this class FOR TEST ENVIRONMENTS, and so it says in the comments:
/** * 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 = "<insert a valid UUID here>";
It says "If the application exists in AppWorld, the UUID will not be used to identify the application".
I was wondering how should this class be instantiated in order to perform the registration once the app is published in App World. In the online Development Guide example, it extends the class and intriguingly it also provides an UUID:
private class MyBBMAppPlugin extends BBMPlatformApplication
{
public MyBBMAppPlugin()
{
super( "Insert your UUID here" );
}
}
So the main question is, should I provide an UUID either for test or App World environments? If so, what would be the UUID in the AppWorld case?
My second problem is that I've followed the so called "Alternate Dependency Checker" approach, so I've a main app (UiApplication), which uses an interface library, and a second library (autorun on startup) implementing the interface library, which publishes itself in the RuntimeStore, and is the one actually depending on the BBM platform libraries. This second library shouldn't be deployed to all users, but only to the ones with BBM installed in the device (otherwise it will throw a Module Not Found error on every boot, isn't it?) So let's say I publish only the main app and the interface library on App World, and the second implementation library is offered via OTA download to the users once we know they have the BBM installed. In this case, as the second library, which will instantiate a BBMPlatformApplication, isn't on App World, am I stuck with test environment and so I'll have access only for a limited number of users?
Is there any other way to publish the three components in App World as a single "application bundle", and avoid the nasty "Module Not Found" error to the users that don't have BBM installed?
Thanks in advance.
Solved! Go to Solution.
08-09-2012 04:35 AM
08-09-2012 04:35 AM
As I understand it, the UUID you supply is only used until your app is added to App World. The BBM will use a UUID created by App World (which we in fact don't know) after that. But your app does exactly the same thing in both cases, I presume BBM checks App World for the app and if found, uses the App World generated UUID. If not, then your one.
I have not seen documented any indication of how BBM decides your app is the same as an App World App.
Regarding your second question, the module should be deployed to all users. The one run at start-up will fail on uses without an appropriate level of BBM installed. That is how it is designed to work.
To answer your last question, the bundle that you supply to App World will include all three components - this is treated as one application by App World.
Hope this clears things up.
08-09-2012 05:28 AM
Thanks both for your quick response.
If Peter is correct, then I guess there's no way for an app to run in App World environment unless it is published there. This seems to me a serious drawback. So If I were to develop for a corporate client, and they wanted to deploy via BES, the app would be running in test environment? BTW I couldn't find anywhere in the documentation what would be the implications of this.
I think I will publish the 3 modules. After all, my main app is targeted for OS 5.0, and for 5.0 the BBM app is included in the OS apps and cannot be uninstalled in a direct way, so most users will have it installed. There are workarounds to uninstall BBM, though. I did it, then installed the problematic module, and no exception or error is thrown. Seems that for 5.0, even if you uninstall the BBM app, some libraries remain.
After this test, I think I could even have included the BBM code directly in the main app, without needing to bother so much with two additional libraries.
08-09-2012 05:41 AM
"So If I were to develop for a corporate client, and they wanted to deploy via BES, ......"
Correct, RIM are aware of this and have some workarounds I think. But the short answer is that BBM integration requires applications distributed on App World atm.
I have also had a go at RIM about this. I think the idea of having a UUID is great, but we should be able to control it, but that leaves open the possibility of spoofing, so that one application can pretend to be another. So RIM has to supply the UUIDs and can't publish them.
"I did it, then installed the problematic module, and no exception or error is thrown. "
I think if you look very carefully at the start-up log you will see a verify error. The cod is not even loaded.
"I think I could even have included the BBM code directly in the main app, without needing to bother so much with two additional libraries."
I think you will find you are pleased you didn't. Personally, I find it a big pain to have to test my app in BBM enabled Simulators, so prefer to develop without the BBM requirement.
08-09-2012 06:31 AM - edited 08-09-2012 06:36 AM
peter_strange wrote:I think the idea of having a UUID is great, but we should be able to control it, but that leaves open the possibility of spoofing, so that one application can pretend to be another. So RIM has to supply the UUIDs and can't publish them.
Well, they could have checked the modules signatures, or provide an additional signature as they have done with NFC secure element.
peter_strange wrote:
I think if you look very carefully at the start-up log you will see a verify error. The cod is not even loaded.
I double checked it. No message appears in Event Log nor in pop-ups. Only tested in one device, so the test is not conclusive at all.
UPDATE: tested in simulator. An entry with severity "always logged" is shown in event logger. But it doesn't bother the user with pop-ups, so I'm fine with it.
peter_strange wrote:
I think you will find you are pleased you didn't. Personally, I find it a big pain to have to test my app in BBM enabled Simulators, so prefer to develop without the BBM requirement.
Yeah, good point. That alone is a good reason.
08-09-2012 07:08 AM
Thanks for the update - what is left to answer now?
08-09-2012 08:57 AM
I'd like someone to confirm the UUID thing. I'll test it too when the app gets published, but it will take some time.
Thanks again.
08-09-2012 09:14 AM
"I'd like someone to confirm the UUID thing"
What specifically? And when you say someone, do you mean someone from RIM or will another developer do?
08-10-2012 02:32 AM