I am another lost soul trying to program some SMS MIDlet for a Series 40 phone. I've searched the whole forum for a few days, but I couldn't find any satisfying answers.
By now, I accepted the following restrictions:
1. There is absolutely no way to access the inbox or anything else on the SIM-card.
2. Messages without specified port cannot be read by a Midlet in any way.
Now let me assume a message WITH port number is coming in. If the phone supports MIDP2.0, the phone might call my SMS-MIDlet and the message will be processed right after the Midlet installs a MessageListener listening to that port.
But what if the phone only supports MIDP1.0??
In the "MessageBlocker"-thread, I read that messages with port will simply be lost if there is no "application listening on this port".
Since there doesn't seem to be any suitable way to run a MIDlet in the background on a Series 40 there will never be more than 1 MIDlet "listening" on any port and most of the time no MIDlet at all. Therefore, a message with port will be lost in almost all cases, since it is very unlikely that my MIDlet is currently running, if the message is received at a random time point.
Please, anyone, tell me that I am wrong in any way. If not, I don't really see any sense in the whole WMA for Series 40 mobiles since applications will only be able to communicate with each other over SMS if their users told each other to start a certain MIDlet at a certain time point.
Uhm... Doesn't sound too good. Why did they implement the whole WMA after all?
Well, I read in another thread that it's POSSIBLE to access messages in the inbox which were sent to the port you want to listen to (which of course doesn't include messages without port). But it seems like it's IMPOSSIBLE to find out how...
First, the JCP-People invented the WMA, which included abilities to receive SMS - and it was implemented in some new phones. But then, they saw that what they did was senseless, because messages with port that arrived while no application was listening were either send to the nirvana, put into the save (inbox) with no possibility to ever see them again or - in the best case - were stored in the inbox until any application would ask for messages being sent on a certain port and then forwarded.
So, they had to find a common processing way for these poor messages having no application listening for them, which is why they included the PushRegistry-Stuff into MIDP 2.0. Since then, it's up to the programmer to take care of incoming messages with port, even if the application is not running.
And now, we really don't need to care about these few phones that have WMA but no MIDP 2.0 - in two years they will be forgotten anyways. Write your programs for JSR-185 and you will be happy in the future...