A java programme for mobile phone to auto send an sms to a designated numbe

Hi I know some of you might find this weird or unnecessary but I hope you can understand.

I'm trying to program this java application for mobile phones, in which once the programme is executed, it will automatically send a pre-programmed sms message say, "I NEED HELP", to a designated handphone number.

I meant for this programme to serve as a emergency message, very much like a hospital notfiying device for patients who may suffer a sudden heart attack but unable to make a call or type an sms. He/she could just execute the programme and an sms will be sent out. I plan for this program to be execute remote via a bluetooth deivce

Is it possible to write a program like this as a java application in a cell phone? Anyone has an idea how I could go about doing? This is for a university project. Please advice.

Message was edited by:

Leddy

[883 byte] By [Leddya] at [2007-11-27 3:50:05]
# 1

You need a mobile phone with midp + JSR-82 + WMA API.

Then in the cellular you must make a bluetooth service available for your bluetooth device.

Pratically the cellular must act as server and bluetooth device like client.

The problem is that the midlet have to stay always in execution in order to listen the client.

You can avoid this problem by using PUSH REGISTRY in this manner:

(the midlet is activated by AMS on bluetooth connection..)

static registration, place MIDlet-Push-1 entries in the JAD or manifest:

MIDlet-Push-1: btspp://localhost:2D26618601FB47C28D9F10B8EC891363;

name=MyBtService,com.j2medeveloper.MyMIDlet, *

Dynamic registration is done at runtime, using the PushRegistry's registerConnection() API:

// MIDlet class name

String midletClassName = this.getClass().getName();

// Register a static connection.

String url = "btspp://localhost:2D26618601FB47C28D9F10B8EC891363;name=MyBtService"

// Use an unrestricted filter.

String filter = "*";

...

PushRegistry.registerConnection(url, midletClassName, filter);

...

Finally you must sign your midlet in order to bypass the request to user for sms sending.

PeppeMEa at 2007-7-12 8:53:59 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
any idea how the programme could also extract gps data say co-ordinates from a bluetooth gps receiever?
Leddya at 2007-7-12 8:53:59 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3
Bluetooth gps always send data thru rfcomm (virtual serial port) in nmea format.You must connect with this profile and interpret the bluetooth data (NMEA string) in your java me midlet.
PeppeMEa at 2007-7-12 8:53:59 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 4

one more question, what do you mean when u said ,"you must sign your midlet in order to bypass the request to user for sms sending"? How do I go about doing that. I'm using netbeans to develop my application, i noticed under project properties, there is a 'signing' part. It is something to do with that?

Thanks alot for helping!

Leddya at 2007-7-12 8:53:59 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 5

In order to signing a midlet for a device you must request a digital certificate

With this certificate you guarantee the user that the midlet is developed from you, then you can estabilish a security rule.

See this link for further information

http://java.sun.com/j2me/docs/wtk2.2/docs/UserGuide-html/security.html

PeppeMEa at 2007-7-12 8:53:59 > top of Java-index,Java Mobility Forums,Java ME Technologies...