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
New Developer
Posts: 28
Registered: ‎11-04-2009
My Device: Not Specified

A way to put the phone on vibrate programatically

I want to make an application to put the phone on vibrate at certain hours. Is it possible? 

got stuck, because I can't modify sound profiles programmatically. 

Any ideas?

I tried to change the world, but I couldn't find the source code
Contributor
Posts: 13
Registered: ‎09-16-2011
My Device: Black berry 9800/ Blackberry 6
My Carrier: BSNL/Airtel

Re: A way to put the phone on vibrate programatically

you can use net.rim.device.api.system.Alert,  startVibrate(int duration) , and stopVibrate().
         

Developer
Posts: 203
Registered: ‎07-30-2009
My Device: Bold(9780),Curve(8520)
My Carrier: Vodafone

Re: A way to put the phone on vibrate programatically

I was tried the do same thing but not get any success so if any buddy have any idea please suggest the appropriate class and methods.

Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: A way to put the phone on vibrate programatically

you can use http://www.blackberry.com/developers/docs/7.1.0api/net/rim/blackberry/api/profiles/Profiles.html, but only since 7.1
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Highlighted
Developer
Posts: 203
Registered: ‎07-30-2009
My Device: Bold(9780),Curve(8520)
My Carrier: Vodafone

Re: A way to put the phone on vibrate programatically

Thanks simon,

 

But is there any other way to change the profiles in os version 4.6 to 7.0

Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: A way to put the phone on vibrate programatically

no.

i think vibrate mode can be triggered by keycode injection though, by a long press of 'q' (or '#'?)
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 203
Registered: ‎07-30-2009
My Device: Bold(9780),Curve(8520)
My Carrier: Vodafone

Re: A way to put the phone on vibrate programatically

Yes, we can do that on device directly let me check it but as of my experience some time key injection is not working properly with os 6.

New Developer
Posts: 28
Registered: ‎11-04-2009
My Device: Not Specified

Re: A way to put the phone on vibrate programatically

Very good news that finally we can manipulate the profiles!!!. Smiley Happy
I'm now looking at the API of 7.1. So, in order to change the profile to vibrate-only I would have to get the desired Profile using Profiles.getDeviceProfiles(), and then use the method Profile.setActive ()?

 

I would like to implement it before 7.1, I've made some code that uses event injection to change the profile, but does not work if the keypad is locked.

I need to change the active sould profile from a application that runs on background, and in that case the keypad would be locked. Do you have any ideas to work around this issue using event injection before 7.1?

 

Br,

Esteban

I tried to change the world, but I couldn't find the source code