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

  • Home
  • SEARCH
  • 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 8790619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:42:20+00:00 2026-06-13T22:42:20+00:00

I have a situation in which I need to test smart phone app. Objective

  • 0

I have a situation in which I need to test smart phone app. Objective is to disable my app based on the geolocation. So for example let say I am “live” streaming some video via my app and would like to disable streaming if user goes to certain restricted location and turn it ON when user moves to acceptable geological area.

Now the testing part is, that all the phones lets say 5 phones are in front of me and I want to test the app running on them that the app will get turned off when they will move into the restricted areas. How can this be achieved?

Edits:-
Actual scenario – Live streaming of a match which should not be shown in area near the stadium on the android app. So if a user hit “play” button on app and the phone is physically in video restricted zone for that particular duration of the match, the video should not be streamed to that cell phone.

any thoughts… opinions..?

Thanks

  • 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-06-13T22:42:21+00:00Added an answer on June 13, 2026 at 10:42 pm

    On android you have multiple options to supply your application with a mock location:
    via DDMS, telnet or via the LocationManager:

    DDMS

    Start DDMS from the AndroidSDK/tools/ folder. Select the device you want to spoof the location for, and go to Emulator Control. At the bottom of the tab you should find the option to manually set the location, and what location to spoof.

    ADB/Telnet

    List all of your devices via adb devices. From this you should get an output like this:

    List of devices attached
    emulator-5554 device
    

    Then telnet to the indicated port:

    telnet localhost 5554
    

    This should open the android console. There you can use the geo fix command to set the location

    geo fix $lon $lat
    

    LocationProvider

    You can supply a location for testing using the setTestProviderLocation Method of the LocationProvider

    LocationManager lm = (LocationManager)this.getContext().getSystemService(Context.LOCATION_SERVICE);
    String mocLocationProvider = "Test";
    locationManager.addTestProvider(mocLocationProvider, false, false,
                        false, false, true, true, true, 0, 5);
    locationManager.setTestProviderEnabled(mocLocationProvider, true);
    
    Location mockLocation = new Location(mocLocationProvider);
    mockLocation.setLatitude(location.getLatitude());
    mockLocation.setLongitude(location.getLongitude()); 
    mockLocation.setAltitude(location.getAltitude()); 
    mockLocation.setTime(System.currentTimeMillis()); 
    locationManager.setTestProviderLocation( mocLocationProvider, mockLocation);
    

    This method I got from here

    Additionally, do not forget to set the permission

    <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a situation in which I need to convert a text data into
I have an odd situation in which I need to modify the position of
I have a situation where I need to retrieve data from a query which
I have a situation in which i need a reference to the very next
Situation:- I have created a installation setup(local) that returns a URL eg:- ved.test.com which
So I have situation when I need skip current test from test method body.
I have situation where there are multiple test cases which uses a common method.
I need to test out a situation where I have a parent window hosting
I am learning JPA and have one question: In which situations we need more
I have a simulation in which I need to dump large amount of data,

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.