GeeCON Prague 2014*
The moose likes Product and Other Certifications and the fly likes When to open MessageConnection (Push Registry)? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "When to open MessageConnection (Push Registry)?" Watch "When to open MessageConnection (Push Registry)?" New topic
Author

When to open MessageConnection (Push Registry)?

chetan dhewal
Ranch Hand

Joined: Nov 07, 2000
Posts: 61
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


Chetan Dhewal<br />SCMAD,SCJP 1.2
 
GeeCON Prague 2014
 
subject: When to open MessageConnection (Push Registry)?