• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Problem: Send Receive SMS in one midlet

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm writing one j2me midlet application using WMA library to send and Receive SMS.. Application behavior is : For receiving sms i implemented MessageListner so whenever sms comes, it notify the midlet and in that function i'm creating one thread and receiving sms and doing some parsing. Now i have to reply that sms so i'm sending some reply code by sms in the same thread but then after i'm unable to receive any message. Can any tell me what is the problem behind that? If i comment out send code then my application is able to receive any number of sms. I have used different connector.open objects like SMSREAD and SMSSEND to store message connection.
Please help me in this. My send and receive part works perfectly if i do send and receive in two different midlets....................
Any hint.....................
Thanks in advance for your kind support...................
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem may be that a WMA message listener is called inside a system thread and you should either fire a new thread to handle the message or notify an existing one.

You should not call receive(), much less send a message directly in the listener. Read the WMA javadoc & specs, this is explained in some detail.

Cheers,
Eduardo
 
Hardik Patel
Greenhorn
Posts: 2
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for reply Eduardo.
But i got some other solution also and now it is working...........
so cheers...........
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Hardik, I'm having the same issue. How did you resolve it without having to separate the send SMS and receive SMS code in two separate midlets?

thanks.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mr. Hardik,
can you please share the way to solve this problem with us???

Please
 
Marshal
Posts: 80123
416
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

I am afraid that after over 7 years you may not get a reply from HP.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have this code that can sent or recieve , a full project that can sent and recieve message but i will give if you do my work, i have a question if any one solve then i will give you that
 
The problems of the world fade way as you eat a piece of pie. This tiny ad has never known problems:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic