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

Reply
New Developer
Posts: 88
Registered: ‎11-04-2008
My Device: Not Specified
Accepted Solution

Notification Profiles API

I am creating an application that uses notifications.

Under Profiles > Advanced > (Select any profile) > Edit, there are items like Browser, Calendar, MMS, Phone, SMS ...

I would like to ask if i can add an item here for my application because i want the user to just change the settings here. If i can, any advise what API i should use?

Need Help badly! :smileysad:
Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Notification Profiles API

See NotificationsManager.registerSource()

 

New Developer
Posts: 88
Registered: ‎11-04-2008
My Device: Not Specified

Re: Notification Profiles API

thanks so much for your reply, RexDoug. i could already see the notifications that i want added.

 

another problem of mine is that how do i get these settings so that i can use them for my notifications?

currently,i am using the Consequence class wherein i set my own tune, led settings and vibrate. I want it to use the settings defined by the user through the notification that i added in the profiles. I have downloaded a sample code from the BlackBerry Developer Guide but i just can't seem to understand it.

 

i am also working on using the NotificationsEngineListener which is a disaster right now because i can't get it to work. Do you also have any ideas on this? :smileyhappy:

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Notification Profiles API

You have no "programmatic" control over the profile settings. Only the user can change these settings.

 

There is a "NotificationsDemo" application in the JDE samples. I suggest you start with that, then build your own features on top of it.

 

 

 

 

New Developer
Posts: 88
Registered: ‎11-04-2008
My Device: Not Specified

Re: Notification Profiles API

What i mean is, i want to get the settings that the user has set so that i can play the tone that he has chosen, or if he wants vibrate or led flashing for the notifications. i don't want to change the settings. is this possible?

 

i already tried the NotificationsDemo and it was very helpful. thanks.

Developer
Posts: 16,578
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Notification Profiles API

if you register a notification the user can change it for each profile in the advanced profile management.
----------------------------------------------------------
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: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Notification Profiles API

OK - I understand your question, I think.

 

You fire your Notification, and the BlackBerry system plays the tones and vibrates the phone, whatever the user set in the profile. You don't do this within your program.

 

So, you register your Notification, then you fire NotificationsManager.triggerImmediateEvent() when you want the notification to occur.

 

The BlackBerry will fire the sounds, whatever, based on the current settings for the current active profile.

 

New Developer
Posts: 88
Registered: ‎11-04-2008
My Device: Not Specified

Re: Notification Profiles API

thanks so much for the help, RexDoug! got it to work already! :smileyhappy:
Contributor
Posts: 12
Registered: ‎03-26-2010
My Device: 8310

Re: Notification Profiles API

[ Edited ]

Any way to mute the ringer programmatically? or even reject a phone call?

 

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Notification Profiles API

Please refrain from posting new questions on a solved thread.