×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    7

    Detect mobile device within a building

    Hi,
    I am new to mobile application. Basically i want to get the user's GPS coordinates within building.
    I have no problem detecting the mobile device outdoor, only when indoor is giving me the problem.
    I have tried setting the accuracy, but no avail.

    Is there a solution to it?? Any help will be greatly appreciated. Thanks

    Here is my code:

    new Thread()
    {

    public void run()
    {
    try
    {
    Criteria cr= new Criteria();
    cr.setHorizontalAccuracy(1000);
    LocationProvider lp= LocationProvider.getInstance(cr);

    Location l = lp.getLocation(60);
    Coordinates c = l.getQualifiedCoordinates();

    if(c != null )
    {
    lat = c.getLatitude();
    lon = c.getLongitude();
    }
    }
    catch(Exception e)
    {
    System.out.println("Error");
    }
    }
    }.start();

    Kevin

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Detect mobile device within a building

    You cannot get GPS information indoors, because the building blocks the signals from the satellites.

    Graham.

  3. #3
    Registered User
    Join Date
    Dec 2009
    Posts
    42

    Re: Detect mobile device within a building

    As grahamhughes said. You cannot get signal indoors. As that is just not the way it works. But there is a function to get last known position, that might help you.

    LocationProvider.getLastKnownLocation();

  4. #4
    Registered User
    Join Date
    Jan 2010
    Posts
    7

    Re: Detect mobile device within a building

    Hi guys,

    Thanks for the suggestion. These few days i will be rushing my report. After which i will try what NightStalkerDNS suggested. Hopefully it can fulfilled what i need.

    Kevin

  5. #5
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Detect mobile device within a building

    Just a tip when writing your report :
    - try to know what you're writing about, in this specific case just learn how GPS actually works ! If you had known that you would also have known why there is no signal indoors...

Similar Threads

  1. Calling a mobile phone from a device
    By sripathys in forum Near Field Communication
    Replies: 1
    Last Post: 2009-09-05, 09:53
  2. How to retrieve the mobile device information at run time.
    By VaibhavNHCE in forum Mobile Java General
    Replies: 3
    Last Post: 2009-09-04, 06:12
  3. HttpConnection to a mobile device
    By ziwen in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2008-09-30, 10:19
  4. Mobile Podcasting - will it happen?
    By mobile monte in forum News and Announcements
    Replies: 0
    Last Post: 2006-09-22, 23:45
  5. Detect Any Kink of Mobile Device
    By agawad in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2006-09-22, 18:07

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×