×

Discussion Board

Results 1 to 11 of 11

Thread: Message Blocker

  1. #1
    Registered User
    Join Date
    Dec 2003
    Posts
    7

    Message Blocker

    Hi,
    I'm trying to write a java application to block SMS and MMS messages. I'm using the javax.wireless.messaging class suite to create a connection and listen on a given port for incoming messages. My first problem is that I don't know what port to listen on. I'm using the Nokia 3300 Emulator to run my app and NMIT to send the message; the emulator receives the message whilst running my app but the app itself doesn't respond as it should if it were aware of the message; my guess is that I've got the port wrong.

    My second problem is that I'm unsure how to block the message or how to delete it from the server if my application decides it should be blocked. If this is possible (or even impossible), please let me know.

    Finally, I'd like my program to run only when a message is received, or else run in a quiescent state in the background until a message is recieved. Does anybody have any idea how to write an application that wakes on messages?


    Thanks in advance,

    Tim.

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    It's impossible because of the security model. You're application can listen for messages coming in on specific ports. But regular messages don't have a port. And there is no way for you to listen for messages withouth a port. So you can't intercept regular messages. This is on purpose since they didn't wan't MIDlets to mess around with the regular messaging on the phone (in other words, they don't want MIDlets like you suggest).

    shmoove

  3. #3
    Registered User
    Join Date
    Dec 2003
    Posts
    7
    I suspected as much. Thanks, a negative is almost as valuable as a positive in this case.


    Tim.

  4. #4
    Registered User
    Join Date
    Dec 2003
    Posts
    7
    One final thought: is it possible to get access to the inbox on a phone as a recordstore object? I know it's not generally possible to even get the list of contacts so I seriously doubt it. It sounds like slightly over zealous protection against email viruses to me.

    Any pointers regarding how to do this or to technical documentation that explains exactly why it isn't possible would be gratefully received.

    Tim.

  5. #5
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    Impossible. Not so much protection against viruses, but against rogue applications doing some nasty stuff they are not supposed to.

    shmoove

  6. #6
    Registered User
    Join Date
    Dec 2003
    Posts
    7
    Just for the record, I'm not trying to write a nuisance application, I've been asked to write a program which gives users more control over what they receive in their inbox.
    I'm starting to clutch at straws but I want to explore every possibility; Is it possible to change the default inbox application on a phone so that it used my application instead? This would be analogous to using a different email client on a desktop box and hardly seditious.
    Also, how is it possible that standard sms messages do not have a port? How does the phone know which application (I.a. the inbox) to shunt them to? Why is there so much functionality given to message handling in the J2ME when it seems impossible to handle incoming messages at all?


    Tim.

  7. #7
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    I don't think you're trying to write anything malitious. But someone else might, and since it is such a simple matter to download and install J2ME applications, someone could write a small game, and without the use knowing it could be also accessing the inbox and deleting messages; or something like that.
    The reason for the messaging functionality in J2ME is so that your applications can use SMS as a communication method (as opposed to say, http). It wasn't meant to handle the normal messaging.
    I think you'll have to look into a different platform.
    Also, how is it possible that standard sms messages do not have a port? How does the phone know which application (I.a. the inbox) to shunt them to?
    If they don't have a port, they go to the native messaging application. If they do have one, then the phone checks to see if any application is listening on that port and sends the message to it, or ignores it if there is no such application.

    shmoove

  8. #8
    Registered User
    Join Date
    Dec 2003
    Posts
    7
    Thanks for the info, I'm leaning towards a server based solution myself. I take it the same is true of MMS messages as it is with SMS?

    Tim.

  9. #9
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    I imagine.

  10. #10
    Registered User
    Join Date
    Mar 2003
    Posts
    42

    Listening for specific MMS

    Could you write a Mipd app that listens and accesses an MMS
    that has been sent without WMA?
    (i.e. its been sent conventiionally)

    Is it possible to adjust the MMS on the MMSC so that when its deliverd to the java client, it can be inspected, irrespective of whether it was sent via java or manually?

    regards,
    Larry

  11. #11
    Registered User
    Join Date
    Jan 2005
    Posts
    1
    hi timluther,

    i have to develop a similar application to yours for college.
    i need to access incoming messages that do not have a specified port number. did you figure out how to do this with java.

    thanks.
    jeff.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×