Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7670345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:48:06+00:00 2026-05-31T15:48:06+00:00

I made an android application. I run application on laptop and located me at

  • 0

I made an android application. I run application on laptop and located me at one place(in a wrong town about 250 km). When run application on my desktop with another api key, located me on the same wrong city. Can anyone tell me where is the problem? Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T15:48:08+00:00Added an answer on May 31, 2026 at 3:48 pm

    In my experience, Android won’t acquire a location just because your Wi-Fi will inherit that to the Emulator.

    You need to follow some steps:

    1. Be sure to have the following permissions in your Android Manifest:

      android.permission.INTERNET

      android.permission.ACCESS_NETWORK_STATE

      android.permission.ACCESS_COARSE_LOCATION

      android.permission.ACCESS_FINE_LOCATION

      android.permission.ACCESS_LOCATION_EXTRA_COMMANDS

      android.permission.ACCESS_MOCK_LOCATION

      android.permission.CHANGE_WIFI_STATE

      android.permission.ACCESS_WIFI_STATE

    2. Be sure to have the maps library in your Application tag:

      <application android:icon="@drawable/ic_launcher" >
              <uses-library android:name="com.google.android.maps" />
      </application>
      
    3. Be sure to have a valid Maps API Key in your MapView in your /layout/map.xml file.

    4. Because you are not running your App on an actual device, the only way to send different locations to your App is to push a MOCK LOCATION. To do so, simply Launch your App in the Emulator, go to the DDMS perspective in Eclipse IDE, and look for the options on the left (reset the DDMS perspective if you can’t find them). It should look like this:

    enter image description here

    Select the Emulator Name under the “Devices” Tab, then you can send Latitude and Longitude coordinates using the “Location Controls”.

    When you are done developing and testing, be sure to remove the ACCESS_MOCK_LOCATION permission and to test the location detection on an actual phone or tablet with either GPS, aGPS chip or Cellular/Wifi Network.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have made an android application for Project Build Target as Target name:: Android
I am making the phonegap android application in html,javascript and jquery.I have made the
I am targeting my application to be able run across Android 1.5 till 2.3.
I've made an Android application which contains most used German words and sentences. The
When I run my application on either Android emulator or an actual device, the
I can successfully connect through Bluetooth my Nexus One Android Phone to another Bluetooth
I have a little problem... I have made an Android application which extends the
I have made a ListView in my android application. But the problem is that
I made ​​an Android application that uses that uses the SearchManager. The problem is
In my application i need to run my application of both versions android 2.1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.