views:

26

answers:

2

Hi everyone.

I'm developing a J2Me application. Currently I'm trying to add properties to my app specifically for the Sony Ericsson. I have a W705 Sony Ericsson mobile phone.

My app sends SMS messages and so far what I can do is: when a user enters the app he fills a form and the app sends the SMS. That's nice, but I want it to be more integrated in the phone. In my W705, when I click create new message, I'm given with a few options: send new message, send new email etc. I want to add there my own option "Send SMS via my app". I want that when a user installs my app, it adds this link. When this link [button] is pressed, it enters my app.

I looked in the developers site of Sony Ericsson and I couldn't find anything. If it exist then it's probably in some JSR API. I'm pretty sure that it's not possible but I hope I'm wrong.

Thanks!

+1  A: 

It's impossible in J2ME.

Donz
A: 

yeh its possible with J2me

following is sample code for sending sms using J2me

    String address = "sms://" + destinationAddress;

    MessageConnection smsconn = null;
    try {
        /** Open the message connection. */
        smsconn = (MessageConnection)Connector.open(address);

        TextMessage txtmessage = (TextMessage)smsconn.newMessage(MessageConnection.TEXT_MESSAGE);
        txtmessage.setPayloadText(destinationMessage);
        smsconn.send(txtmessage);

    }
    catch(Exception e) {
        e.printStackTrace();
    } 
Mihir