• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

When to open MessageConnection (Push Registry)?

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic