Originally posted by Ilja Preuss:
I would be surprised if this was possible in pure Java, as it would be a serious security problem.
Moving to Swing/AWT...
Originally posted by Shawn Fitzgerald:
To achieve your goal of transmitting GIS (location) information from a phone to a server (I'm assuming) J2ME is a reasonable if not a very good choice.
But it does depend on what context you are sending this information, if it is with the users permission then J2ME is a good fit. If you are trying to build a BigBrother device to spy on people then J2ME is not the right choice, as it was built with several goals, 1 of which is secure. And by security it was seen both in protecting the device, and the user.
Now you have another issue. Is SMS the right choice. The most popular GIS enabled devices with J2ME support for this data are the NexTel devices. However these devices do not currently support SMS (that is the API is in the WMA support, and these devices have WMA, but NexTel doesn't use SMS).
I know you are thinking I'm wrong, nextel states they have SMS. Well it's more of a proprietary alert protocol. Trust me it ain't there.
However you can send out HTTP/S, or sockets from the NexTel device provided you have a datapacket plan.
Now if you are not working with NexTel but ATT/Cingular, T-Mobile, or (heaven help you) Verizon, then you most likely have SMS, but most of these secure the location API. While Motorola/Nokia devices sometimes have location API's the service provider can shut you down by turning that API off.
If you are past those 2 hurdles, then you should be able to use the SMS examples (WMA demo) from the WirelessToolKit WTK from Sun, and the location API samples that most vendors have with their documentation.
If you are trying to send SMS from a server to a phone to trigger this information I would recommend reading my book "SMS for MIDP2.0" at Cafepress.com, because there is a lot of information and issues you will be running into that are not well documented. This book will guide you through those issues, and provide some useful code.
Let us know what devices and service providers you are using. I'm interested is how your project progresses.