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 4616954
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:03:20+00:00 2026-05-22T02:03:20+00:00

I am writing an app for Android that will measure speed as the Android

  • 0

I am writing an app for Android that will measure speed as the Android device is moving, using the GPS receiver. I know I can telnet into the Android emulator and send Geo coordinates using the “geo fix” command. What I want to know though, is there a way to continually send geo fix data to simulate a car moving down a street? Otherwise, how else can I test my application?

  • 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-22T02:03:21+00:00Added an answer on May 22, 2026 at 2:03 am

    Hi in my first GPS based project I faced the same problem so I write a java code that will send GPS Fix to my android emulator below is the snippet

    import java.io.IOException;
    import java.io.PrintStream;
    import java.net.Socket;
    import java.net.UnknownHostException;
    
    public class Main {
    
        static final int PAUSE = 4000; // ms
        static final float START_LONGITUDE = 51, START_LATITUDE = -1.3f;
        static final int NO_SAMPLE = 100;
        static final float DELTA_LONGITUDE = 0.000005f, DELTA_LADITUDE = 0.000005f;
    
        public static void main(String[] args) {
            try {
                Socket socket = new Socket("localhost", 5554); // usually 5554
    
                PrintStream out = new PrintStream(socket.getOutputStream());
                float longitude = START_LONGITUDE, latitude = START_LATITUDE;
                String str;
    
                for (int i = 0; i < NO_SAMPLE; i++) {
                    str = "geo fix " + latitude + " " + longitude + "\n";
                    out.print(str);
                    System.out.print(str);
    
                    Thread.sleep(PAUSE);
    
                    longitude += DELTA_LONGITUDE;
                    latitude += DELTA_LADITUDE;
                }
            } catch (UnknownHostException e) {
                System.exit(-1);
            } catch (IOException e) {
                System.exit(-1);
            } catch (InterruptedException e) {
                System.exit(-1);
            }
    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently writing an app in Android that works with the GPS. At the
I'm writing an Android app which will be making use of the cloud-2-device messaging
I am writing an android app where a user will geolocate using coarse location
I'm planning on writing an android app that can view and update data on
I'm writing an android app that will connect to a REST/JSON webservice. Users will
I am writing a android app that will pull in a list of all
I am writing an Android app that will communicate with the PC. I tried
I am writing a simple Android app and have a database that will send
I'm writing an Android app that needs to access GMail, and I'd like to
So I'm writing an android app that needs to grab book price data from

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.