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
Developer
Posts: 445
Registered: ‎07-15-2008
My Device: Not Specified

Invoke Profiles

Hello, Is it possible to invoke the Profiles-Application using the API? If so, how do I get the currently selected Profile (loud, silent, vibrate...)? Cheers,javec
If your question was answered, please accept it as a sollution and / or give Kudos ;-)
______________________________
Use the Search Field first! Maybe the question you want to ask already exists!
BlackBerry Development Advisor
Posts: 15,884
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Invoke Profiles

No, this is not supported in the BlackBerry API set.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Developer
Posts: 445
Registered: ‎07-15-2008
My Device: Not Specified

Re: Invoke Profiles

Will it be possible in future API-sets?

Why is it actually not possible? 

If your question was answered, please accept it as a sollution and / or give Kudos ;-)
______________________________
Use the Search Field first! Maybe the question you want to ask already exists!
Developer
Posts: 191
Registered: ‎04-03-2008
My Device: Bold 9700

Re: Invoke Profiles

Well, here's how I do it:

 

 

try {

int moduleHandle = CodeModuleManager.getModuleHandle("net_rim_bb_profiles_app"); ApplicationDescriptor[] apDes = CodeModuleManager.getApplicationDescriptors(moduleHandle); ApplicationManager.getApplicationManager().runApplication(apDes[0]); } catch (ApplicationManagerException e) { // Handle exception here }

 

 

 

Developer
Posts: 445
Registered: ‎07-15-2008
My Device: Not Specified

Re: Invoke Profiles

yes, but that "only" launches the app, it does not return a selected profile?
If your question was answered, please accept it as a sollution and / or give Kudos ;-)
______________________________
Use the Search Field first! Maybe the question you want to ask already exists!
Developer
Posts: 191
Registered: ‎04-03-2008
My Device: Bold 9700

Re: Invoke Profiles

Right.  It only launches the app; it doesn't return any info, unfortunately.
New Developer
Posts: 9
Registered: ‎07-16-2008
My Device: Not Specified

Re: Invoke Profiles

Ok, so you can do this with the Event Injector API, which by default, is set to deny (and seems that it always will).  For a small amount of users, or niche customers where this is very important, you may convince them to go through the necessary steps to manually allow this for your application.

 

So, yes, it is possible, but other than injecting key events (somewhat blindly), you cannot do any more.

Kevin Ross | President | Metova
www.metova.com
Highlighted
New Developer
Posts: 11
Registered: ‎07-14-2008
My Device: Not Specified

Re: Invoke Profiles


rosskevin wrote:

Ok, so you can do this with the Event Injector API, which by default, is set to deny (and seems that it always will).  For a small amount of users, or niche customers where this is very important, you may convince them to go through the necessary steps to manually allow this for your application.

 

So, yes, it is possible, but other than injecting key events (somewhat blindly), you cannot do any more.


 

That's definitely true, however I wouldn't recommend going down that route. Firstly, you're going to have to make some assumptions about the way the Profiles applications visually looks in order to inject the right set of key presses. If the profiles application changes in appearance in a future OS upgrade, you're going to have to modify your application too.

 

Secondly, this approach will not work when the keyboard is locked, so if you're trying to write, say, an automatic profiler switcher, it's just not going to work all the time.

 

Since many users are on a BES, even if that particular user wants to make the change to enable the permission set for Event Injection it's likely the BES admin still won't do it (Believe me, we've tried!).

 

I realize you probably know all this information already rosskevin, just clarifying for the OP why he shouldn't try to go down this route.

 

javec, in short, what you want to do is practically not possible right now and you're going to have to wait for RIM to add appropriate APIs.

New Developer
Posts: 8
Registered: ‎01-06-2009
My Device: Not Specified

Re: Invoke Profiles

But there are some application available which changes the profile based on time and your location. How they are able to do it if there are no API's available.

 

 

Gagan