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
Developer
mantaker
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810
Accepted Solution

Need setBanner method sample...

Hi all,

 

I'm a beginner to this BB dev .. Well, I need to set a banner for my application screen with date, battery power etc.. I searched thru the web and couldn't get an implementation for setBanner method in the class MainScreen.. Can any one help me by giving some sample code to set a banner with those info i specified ..

 

Is there any method to get the following info from the device or the whole set from the theme!!

 

1. wireless service provider

2. battery power level indicator

3. wireless coverage indicator

4. sound profile indicator

5. status indicators, such as the alarm indicator, missed call count indicator, and unopened message count indicator

6. date and time

 

Thanks in Advance,

 

Regards,

-Mantaker 

  

--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
New Developer
igrigorik
Posts: 6
Registered: ‎12-29-2008
My Device: Not Specified

Re: Need setBanner method sample...

+1 for this, i'm looking for the exact same thing. :smileyhappy:
BlackBerry Development Advisor
MSohm
Posts: 14,855
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Need setBanner method sample...

There isn't a built in field that provides this for third party applications, but you can obtain most of the information you are looking for and create your own custom field.

 

1.  The RadioInfo.getNetworkName method can be used to obtain the name of the wireless network.

2.  The DeviceInfo.getBatteryLevel method can be used to get the current battery level.

3.  The RadioInfo.getSignalLevel method can be used to get the current signal level.

4.  There is no API to poll for this information.

5.  There are no APIs to poll for this information.  Your application could track some of this information through the listener interfaces available on the BlackBerry handheld (i.e. Use PhoneListener to listen for unanswered phone calls).

6.  You can use the Date class for this.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
mantaker
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: Need setBanner method sample...

[ Edited ]

Thanks for your reply... But Mr.Mark, what do I do for getting the look and feel of the real banner that is placed on the desktop ( Home Screen I guess) of the BB ..

 

Like this Banner

 

How to attain this widget as in the battery and network of the banner..

 

Can u post a sample working code on this problem ..

 

Thanks 

Message Edited by mantaker on 01-06-2009 12:27 AM
--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
Developer
mantaker
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: Need setBanner method sample...

[ Edited ]

Someone please make a quick reply.. Does anyone had an experience in this ???

 

Thanks. 

Message Edited by mantaker on 01-08-2009 12:56 AM
--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
BlackBerry Development Advisor
MSohm
Posts: 14,855
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Need setBanner method sample...

[ Edited ]
We don't have any samples that re-create this banner.  My post above should help with obtaining this information.  Is there a specific point you are stuck on?
Message Edited by MSohm on 01-12-2009 12:24 PM
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
mantaker
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: Need setBanner method sample...

[ Edited ]

 

Mark,

It just helps, no problem in it .. The specific point in which ever developers stuck, they don't know how to get that battery level indicator and Network strength in action .. If it is in numbers or, percentage, oh yes we can show that .. But we need to show it in imagery right? Is there any API to get that done.. 

 

OR 

 

I've an idea too, do I've to get this done by having the images for every range? ie, Do I need to place image-1 (which has three points filled in a battery image) for battery level ranging 40% - 60% and image-2 (which has all the points filled in a battery image) for battery level ranging 80% to 100% .. Hope you can get my idea!! These images has to be updated according to the level .. Likewise for Network strength too!! But this will be a great job to do ..

 

Someone can try a small framework for the ease use of developers on it .. I can do that I hope, but as for now I'm unable .. But be sure if this is the case that there is nothing to get this done easily .. Our steps should not go in vain...

 

Thanks .. 

 

Message Edited by mantaker on 01-23-2009 01:26 AM
--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
Developer
simon_hain
Posts: 16,354
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Need setBanner method sample...

here is a working sample:
blackberryheaderfield
http://www.jonathanhfisher.co.uk/b2/?p=19
(be sure to include the fix posted in a newer thread)
----------------------------------------------------------
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
mantaker
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: Need setBanner method sample...

Thank you simon hain .. Thanks a lot .. I thought this might be done with some great effort with imageries :smileywink: .. Simple but quiet enough sample ..

 

Thanks to jonathanfisher also :smileyhappy::smileytongue: 

 

and also I've not posted anywhere other than here, If I see anything related and lookalike this, I'll reply with this update or redirect a link here ..

 

Thanks again .. 

--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
New Developer
mohammadsr
Posts: 2
Registered: ‎12-11-2009
My Device: Not Specified

Re: Need setBanner method sample...

hey, sorry to bug you, but the link you posted in your response no longer works. Could you repost?

 

thanks.

 

mohammad