Solved

J2ME application to find the distance between user and his friend cell phone

Posted on 2004-09-07
14
624 Views
Last Modified: 2012-05-05
Hai,
      As we developing a J2ME  application,used to find the distance from the user's cellphone  to his friend cellphone with in a short distance.

Help me in calculating the distance between the user's and his friend cell phone?

How to develope this application using J2ME is there any API available??
0
Comment
Question by:deeppra
  • 7
  • 4
  • 3
14 Comments
 
LVL 18

Expert Comment

by:armoghan
ID: 11994883
0
 
LVL 18

Expert Comment

by:armoghan
ID: 11994889
There is some documentation to access the GPS on the phone there.

http://idenphones.motorola.com/iden/developer/developer_documentation.jsp

Also on the phone there is a sample GPS application that displays the standard info on the screen. (eg. latitude, longitude, etc)

0
 
LVL 1

Expert Comment

by:softengg
ID: 11994941
There is an API available. Check it out at http://jcp.org/en/jsr/detail?id=179

This specification defines a J2ME Optional Package that enables mobile location-based applications for resource limited devices. The API is designed to be a compact and generic API that produces information about the present geographic location of the terminal to Java applications.This API covers obtaining information about the present geographic location and orientation of the terminal and accessing a database of known landmarks stored in the terminal.
http://www.forum.nokia.com/main/1,,1_0_10,00.html#jsr179

Have a look at his article also:
http://www.sys-con.com/story/?storyid=36895&DE=1

Hope this helps.
0
 
LVL 5

Author Comment

by:deeppra
ID: 11999774
where to download javax.microedition.location , i find the specification in the above link
0
 
LVL 5

Author Comment

by:deeppra
ID: 11999800
i dont have any GPS receiver is it necessary, with out this can we use the above API to know the location??
0
 
LVL 1

Expert Comment

by:softengg
ID: 12003832
Here is an exceprt from the article on url http://www.sys-con.com/story/?storyid=36895&DE=1.

For those who don’t wish to go through the trouble and expense of dealing with a GPS receiver, the source code for this article includes a Java class file (HttpReader) that functions as a GPS data stream. (Listings 1–3 and the source code for this article can be downloaded from the JDJ Web site, www.sys-con.com/java/sourcec.cfm.) This class instance reads an HTML page that contains actual GPS data and returns its input stream. While this method is easier than using a GPS receiver, watching a plot of the author driving to his local grocery store is not nearly as much fun.

So act accordingly and download the code form the specified url.
Hope this helps!
0
 
LVL 5

Author Comment

by:deeppra
ID: 12005082
where can i get the Location API package class files, to use in my application only the specification is available give me the package download link
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 18

Expert Comment

by:armoghan
ID: 12014484
0
 
LVL 1

Expert Comment

by:softengg
ID: 12014514
0
 
LVL 1

Accepted Solution

by:
softengg earned 250 total points
ID: 12014528
0
 
LVL 5

Author Comment

by:deeppra
ID: 12033408
Hi softengg,
                             I had download the Location pakage. But how to proceed further, These r the things i am having,

Sun one  studio 4 update 1
J2ME tool kit 1.3 & 1.4
i had done simple application using the Sun one, but i read the readme file in the download, which says that we need MIDP2.0 and may other things, How to proceed further
plz tell me!!!
0
 
LVL 5

Author Comment

by:deeppra
ID: 12033478
i am having a doubt, the mobile phone does't have any  location provider, i such device as u told alread,
>>
For those who don’t wish to go through the trouble and expense of dealing with a GPS receiver, the source code for this article includes a Java class file (HttpReader) that functions as a GPS data stream. (Listings 1–3 and the source code for this article can be downloaded from the JDJ Web site, www.sys-con.com/java/sourcec.cfm.) This class instance reads an HTML page that contains actual GPS data and returns its input stream. While this method is easier than using a GPS receiver, watching a plot of the author driving to his local grocery store is not nearly as much fun.

 in the application i am connecting to the server and the code for it is give,
>>
 String URI = "http://xspsoft:8080/GPS.html";
HttpConnection inputCon = (HttpConnection) Connector.open(URI);
InputStream is = inputCon.openInputStream();

ok now i am testing it using PC, so how the server know me? and how it send my locaction to me??
is there any identification ??
and when i deploy this application in to a cell phone then how it works? how it identify the cell phone and its location??

PLZ clear me doubt
0
 
LVL 5

Author Comment

by:deeppra
ID: 12033483
i open the url" http://xspsoft:8080/GPS.html" in the browser but there is no result from the server!!
why??
0
 
LVL 5

Author Comment

by:deeppra
ID: 12036967
plz anyone help me in doing this application
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
allswap challenge 6 80
Java DateChooser? 3 29
session migration servlets 2 28
Opening PDF on button click and fill new document 2 23
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now