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

Java Development

Reply
Developer
ercollin
Posts: 26
Registered: 08-14-2008

API to determine current Notification profile

Is there an API to determine which profile is currently active such as Loud, Normal or Quiet? I have been able to setup my own Notification category and fire notifications, but I also need to determine which mode is active.

Please use plain text.
Developer
RexDoug
Posts: 4,649
Registered: 07-21-2008

Re: API to determine current Notification profile

This is not currently in the API, although I understand that it is coming in a future release.

 

Please use plain text.
New Developer
CGaston
Posts: 13
Registered: 10-01-2008

Re: API to determine current Notification profile

Hi,

 

I'm working on an application and I need to obtain the current profile to stop the sounds and vibration.

 

There is a way to detect the current profile?? with OS 4.5, 4.6 or 4.7 maybe?? or It isn't possible yet??

Please use plain text.
Developer
H3llGhost
Posts: 36
Registered: 02-19-2009

Re: API to determine current Notification profile

Are there any news to this topic?
Please use plain text.
Developer
RexDoug
Posts: 4,649
Registered: 07-21-2008

Re: API to determine current Notification profile

The news is:  there is no news!

 

:smileyhappy:

 

Please use plain text.
Administrator
MSohm
Posts: 11,465
Registered: 07-09-2008
My Carrier: Bell

Re: API to determine current Notification profile

You can look at this from the other way around.  There are no APIs to detect the current profile.  However, your application can integrate with the user's profiles.  This means your application will be set to the defaults for each profile (i.e. Vibrate for the vibrate profile, no audio for the silent profile).  It also allows the user to select a custom notification for your application within each profile in the same way they would for the built in applications (Phone, Messages, etc...).  Have a look at the notificationsdemo included with the BlackBerry JDE for an example.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Developer
simon_hain
Posts: 10,780
Registered: 07-29-2008
My Carrier: O2 Germany

Re: API to determine current Notification profile

there is a way to determine the current notification profile - but you have to be a bit tricky.
the consequence interface allows notifications to implement its own profile reactions. if you implement them with only a callback and trigger the notification only the matching consequence will be executed.

see this thread:
http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=22645&query.id=11...

please note that i never took time to confirm this
----------------------------------------------------------
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.

peter_strange wrote:
"This process should happen traumatically for you in both JDE and Eclipse."
Please use plain text.
New Developer
jc500000
Posts: 37
Registered: 04-17-2009

Re: API to determine current Notification profile

[ Edited ]

 

Hi,

 

             I tried looking at the notfications demo as you mentioned in your post.   However, I'm not sure how get the application to be set to the defaults for each profile.  When I run the notifications demo on 4.7 for the Storm, the demo profile is set to Silent.  When I run it on the other simulators, the notifications demo is set to Mute by default.  I tried creating my own notification in code as well and it is also set to Mute in the profiles by default.  Is there any way to get around this?

Message Edited by jc500000 on 07-03-2009 08:18 PM
Please use plain text.
New Developer
rblanch
Posts: 2
Registered: 05-09-2009

Re: API to determine current Notification profile

[ Edited ]

@MSohm


Can you clarify how to create these defaults for each profile? I looked into the notificationsDemo but there is no defaults for any profile.

 

Also, it is possible to put a file(.amr) in your application and use this file as the default for your notification event?

 

Thank you

Please use plain text.
Administrator
MSohm
Posts: 11,465
Registered: 07-09-2008
My Carrier: Bell

Re: API to determine current Notification profile

When your application registers with the NotificationManager and creates an entry in the Profiles application, default settings are applied (no alert for Silent, Vibrate for Vibrate, etc...).  There is no way for an application to specify what its default settings should be.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.