Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

When to open MessageConnection (Push Registry)?

 
chetan dhewal
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
My application uses Push Registry for MMS. The Midlet gets invoked perfectly.
But when i try to receive() the message, it blocks(i have made seperate class for receiving).

My question is, do we have to open the MessageConnection before any incoming message(via Push Registry). But its not possible since midlet is in dormant stage. so how are we going to receive the messagepart.

------------------------------------
class ECGMIDlet
{
public void startApp()
{
if(push registry == true)
{
new MMSReceiver().start();
// some more code follows
}

}
}

class MMSReceiver
{
public void run()
{
//Is it OK to open MessageConnection after push registry has invoked the
//the midlet and the message is waiting to be fetched...
//But MessageConnection will in any case be opened after push registry

Open MessageConnection("mms://:ECGMIDletAppID")

received_msg= (MultipartMessage) msg_con.receive();
//the code gets stuck after this
//some more code after this

}
}
-----------------------------------------------------------

I am able to receive the message , if the connection is already open , means midlet is already running. but i want it to happen via Push Registry.

Thnx
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic