Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

BlackBerry Analytics Service

Reply
Developer
pfiffi78
Posts: 241
Registered: 01-29-2009

Will it work with more than one app?

[ Edited ]

I am not sure if it will work with more than one app. What I mean is that you basically bundle the Analytics COD with your app. In that cod the Analytic classes are defined. 

 

Now as we all know, if you have two applications that have a class with the same name and package name in their CODs, they won't run because each class can only be defined in one application's cod files. 

 

This is why, when you sign up for the Advertising SDK, you will get a customized SDK, that has your unique appID in the package name of the classes that are in the code, hence making the package name unique. That's also why the Advertising documentation says you will need to get another SDK package if you intend to integrate with a second, third etc app of yours.

 

So can somebody please clarify how the Analytics SDK / libraries are going to work with more than one application? I don't want to end up having it integrated with my app and then when a user downloads it, it wont work becaue she / he may have another app that has it integrated as well.

 

 

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 269
Registered: 07-15-2008
My Carrier: Bell

Re: Will it work with more than one app?

The Analytics SDK is able to do things even cleaner than the Ad SDK, due to lower level implementation details.

 

If you follow the Analytics SDK setup instructions you are actually adding the classes into your application so they are built inside your modules. That means you won't have an Analytics cod file to install in addition to your own modules, which means you aren't going to have the problem of duplicate modules with the same classes inside.

 

Note that if the module name is different, then the classes inside can have the same fully qualified name.

 

To make sure I am not telling tales, I've taken a sample app that I was using with the Analytics SDK and copied it to a new project only changing the name of the project. I then built it and signed it and installed to the same device that had the original app installed. Both work fine.

Tim Windsor
Application Development Consultant
Please use plain text.
Developer
pfiffi78
Posts: 241
Registered: 01-29-2009

Re: Will it work with more than one app?

Hello Tim,

 

Thank you for the clarification. That clears up a few mysteries :-)

 

Now I have follow up question: I am using bb-ant tools to build my apps for several OS versions in one go. The Eclipse Plugin isn't providing this and it's quite a bit of an effort to always do everything manually and swtich JRE versions to build for the next OS versione etc.

 

When I add the Analytics SDK jar there to the import for rapc.exe I get this 

 

[rapc]

..\extLibs\5.0.0\AnalyticsServicev0.9Beta.jar(WebtrendsRIMClientLib1.1.0.100.cod): Warning!: Import file is marked non-parseable

 

How can you 'overwrite' it so that the rapc picks it up? The Eclipse plugin must be doing it somehow because I can see in the Windows process monitor that it also just launches rapc.exe unter the hood.

 

 

Thank you.

 

Regards,

Daniel

 

 

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 269
Registered: 07-15-2008
My Carrier: Bell

Re: Will it work with more than one app?

What does your rapc command line look like?

 

Tim Windsor
Application Development Consultant
Please use plain text.
Developer
pfiffi78
Posts: 241
Registered: 01-29-2009

Re: Will it work with more than one app?

The BB Ant Tools lunch it like this:

 

 

   'C:\Program Files (x86)\Java\jdk1.6.0_22\lib\tools.jar;C:\Development\eclipse_3.5\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components\bin\rapc.jar'
'net.rim.tools.compiler.Compiler'
'-verbose'
'-nodebug'
'-define=PREPROCESSOR;BlackBerrySDK5.0.0;VERSION_4_6_HIGHER'
'import=C:\Development\workspace_3.5\MyApp\extLibs\5.0.0\AnalyticsServicev0.9Beta.jar;C:\Development\workspace_3.5\MyApp\extLibs\5.0.0\net_rim_bbapi_adv_app10539.jar;C:\Development\eclipse_3.5\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components\lib\net_rim_api.jar'
'codename=MyApp'
'MyApp.rapc'
    

 

Please use plain text.
Developer
pfiffi78
Posts: 241
Registered: 01-29-2009

Re: Will it work with more than one app?

Looks like the problem is using the Java version of the rapc compiler. In there it checks for a certain bit flag in the COD that comes within the JAR.

 

When you run the rapc.exe command, however, that check doesn't seem to take place.

 

So I guess I will have to re-write the rapc ant task of the bb-ant tools a bit to make it work.. Hmmm

Please use plain text.
Developer
pfiffi78
Posts: 241
Registered: 01-29-2009

Re: Will it work with more than one app?

I just tried to run the same command but from within Ant and there I also get the 'non-parseable' warning.

 

Tim, wouldn't it be possible to get a Ad SDK that hasn't got this flag bit set??

 

 

Please use plain text.
Developer
pfiffi78
Posts: 241
Registered: 01-29-2009

Re: Will it work with more than one app?

Tim, is there anything that can be done about this problem?

 

Please use plain text.
Developer
dnepr
Posts: 723
Registered: 03-12-2009

Re: Will it work with more than one app?

+1 on getting a version of that works with BB Ant tools.
Please use plain text.
Regular Contributor
gollapallysrinivas
Posts: 94
Registered: 08-07-2010

Re: Will it work with more than one app?

Hai,

 

same sdk will work different applications. the only change is to change the parameters in the xml file.

I have used the same sdk in different applications by changing the parameters in xml file.

Please use plain text.