Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 10
Registered: ‎03-30-2010
My Device: Emulator
My Carrier: None

Finding a unique application identifier

Is there a unique identifier that each application has which will report the same on every OS? For example, Android has the package name and Symbian has a UID. It looks like the Application ID in the alx file might be what I need, but I can't find a way to learn that programmatically.

 

ApplicationDescriptor.getName() or ApplicationDescriptor.getModuleName() might also work, but I've read posts saying that the different OS's handle encoding differently, so I can't be guaranteed that the same application will return the same string every time.

 

Thanks!

James

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Finding a unique application identifier

Hi and welcome to the forum.  Smiley Happy

 

I'm not sure I understand the question.  Can you tell me what you would use this unique identifier for?

Contributor
Posts: 10
Registered: ‎03-30-2010
My Device: Emulator
My Carrier: None

Re: Finding a unique application identifier

I'd like to be able to scan the running applications and react if any apps apps I'm interested in are being run. For example, the user currently has the messaging app in the foreground. I see that module net_rim_bb_messaging_app is in my list of trigger apps and respond (with logging, killing the app, or whatever). The issue is that I'm having a hard time figuring out how to uniquely identify them so I can make sure that the app I'm seeing is really the Blackberry Messaging App and not just some app that happens to have the same name.

Highlighted
Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Finding a unique application identifier

I would look here. It may seem unrelated but the sample app that they have checks if a specific app needs to be installed, updated, or already exists. You can probably make it more specific by checking the vender name too.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Contributor
Posts: 10
Registered: ‎03-30-2010
My Device: Emulator
My Carrier: None

Re: Finding a unique application identifier

Thanks! That sample is using the module name as the identifier, so that looks like my best bet. Now to try to find an easy way to know what all apps I should be interested in...

 

Does anyone know if there's a site like androlib.com that's geared towards the BlackBerry? Androlib.com scrapes the android marketplace and grabs information about each android application, including package names. The blackberry market itself would be nice, but it doesn't tell you the module name for each app.

Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Finding a unique application identifier

It depends on what you want your app to do.

 

If you want to block certain apps that is user decided then the previous example has a menu item that retrieves the installed modules.

 

If you want to block certain apps then you can probably email the developers of whatever apps you want to interact with and ask them what their module names are, I can't think up a reason why they wouldn't want to except for that exact reason, they don't want to.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.