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

BlackBerry Push Development

Reply
Developer
pradeep_ch
Posts: 371
Registered: 12-23-2010
My Carrier: Airtel
Accepted Solution

How to show push message if the application is in closed state

Hi Every body,

 

I was succesfully implemented both client side and server side code for push notifications using forums help.

Now i am facing one problem, that is how to show push message as an alert when app is in closed state.

Can anybody help me it's very urgent.

 

Thanks in advance

Please use plain text.
New Developer
mikbry
Posts: 8
Registered: 01-22-2010
My Carrier: Orange

Re: How to show push message if the application is in closed state

You need to look at MessageListDemo sample to see how to handle it in a BB way

Please use plain text.
Developer
pradeep_ch
Posts: 371
Registered: 12-23-2010
My Carrier: Airtel

Re: How to show push message if the application is in closed state

Thanks for reply, it is not useful to me,

I solved my problem, by doing like this

On closing of the app i am putting this app in background and from background i am pushing the modalscreen.
Please use plain text.
Developer
marcboo
Posts: 36
Registered: 02-13-2011

Re: How to show push message if the application is in closed state

why you just give notification alert in onMessage() overriden function?

Or in the message reading thread if you develop push app below OS 5.0

this is a link that can help with indicator example:

http://stackoverflow.com/questions/1465224/blackberry-how-to-use-notification-icon-in-statusbar
Regards,



MBK
Please use plain text.
Developer
pradeep_ch
Posts: 371
Registered: 12-23-2010
My Carrier: Airtel

Re: How to show push message if the application is in closed state

Thank you very much for reply,

I am using OS 5.0 or greater, Here my client requirement is, he want an alert  while message received.

 

Now my questions are:

 

1. Can I listen the pushmessages coming from the server with out running My App in foreground or background.

2. How can I put indication on indicator when the message is received.

3  Is the indicator able to listen the push messages?.

 

Sorry for asking like this, but  these are questions running in my mind.

 

looking forward for your reply.

 

Please use plain text.
Developer
pradeep_ch
Posts: 371
Registered: 12-23-2010
My Carrier: Airtel

Re: How to show push message if the application is in closed state

One more question

how could an application which is handling notification event and notification icon work together....
Please use plain text.
Developer
marcboo
Posts: 36
Registered: 02-13-2011

Re: How to show push message if the application is in closed state

[ Edited ]

@pradeep_ch

okay i will try to answer your questions

1. according to http://us.blackberry.com/developers/javaappdev/BlackBerry_Push_APIs_Whitepaper.pdf , if you use the push API which is new feature in the OS 5.0 , your application incorporates a listener which runs in background (the one that run in the background is only this listener not your application)

2. in push API when the listener receive data from the PPG server it will trigger the onMessage() function which is must be overridden in implementing PushApplication class

3. indicator can be registered, count up, count down and unregistered in onMessage() function or when your message reads via application

the last one

use multi threading in your onMessge() function (you can combine with Application.getEventLock also as your synchronized lock)

hope that answers will help....

Regards,



MBK
Please use plain text.
Developer
pradeep_ch
Posts: 371
Registered: 12-23-2010
My Carrier: Airtel

Re: How to show push message if the application is in closed state

[ Edited ]

Thanks for your patience,

 

And now i am doing my application in a different way, i am creating  a thread which listen the messages and by creating alternative entry point i starting this thread only instead of entire application.

 

This works fine,

 

Once again thanks for reply.

Please use plain text.
Developer
Shubhangi
Posts: 46
Registered: 07-17-2008

Re: How to show push message if the application is in closed state

Hi,

 

Can you please explain how u have implemented push notification in blackberry?

I want to implement this as following:

 

Push notification will be received by bb device and in response bb device will send some request to the server.

Thanks.

 

Regards,

Shubhangi

 

 

 

Please use plain text.