08-21-2010 04:31 PM
I'm researching how to develop a application to send GPS and Cell ID data by post method.
It'll be more easy if I customize a sample code, because I have no experience in JDE BB environment.
So if anyone show me where I can found a sample code to acquire GPS and Cell ID data I'll be very grateful.
Thanks in advance!
08-22-2010 09:46 AM - edited 08-22-2010 09:48 AM
This article LINK contains everything you need to know about GPS ( it has proved invaluable to me ).
To get the Cell ID try with GPRSInfo class ( I´ve never used it though, but looking at the docs it seems pretty simple to use ).
About the sample code I´d say the same that has been said above : GPSDemo and HTTPDemo
08-22-2010 02:57 PM - edited 08-22-2010 03:01 PM
whith this code, you can send and get responce.
httpConn = (HttpConnection) Connector.open(_url);
// send data by POST
OutputStream out = httpConn.openOutputStream();
out.write(the data, what you want send);
String contentType = httpConn.getHeaderField("Content-type");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
InputStream responseData = httpConn.openInputStream();
byte buffer = new byte[BUFFER_SIZE];
int bytesRead = responseData.read(buffer);
while(bytesRead > 0)
baos.write(buffer, 0, bytesRead);
bytesRead = responseData.read(buffer);
_result = baos.toString();
catch (IOException ex)
System.err.print("Error http: " + ex);
press the kudos button to thank the user that helped you.
08-26-2010 02:32 PM
Thank you all!
Too many people helping me here, but after analyze the suggestions I realize I don't have time enough to learn about the BB environment and develop the application.
If someone can do this for me, please send me a message with the time to develop the app and the price.