I made a small test application that uses the GPS module. To test it, I used telenet to connect to the emulator and send geo fix coordinates.
Sending geo fix 90 90 from telnet made my application react ok.
After reading a while I found about the DDMS. There seems to be a problem with sending coordinates from it to the device. No matter what option I try: Manual or KML file (the KML loads fine) the device only receives one 0.0 and 0.0 coordinates, no matter what I send it.
What am I doing wrong ?
It seems that eclipse has something to do with locales of the computer. The solution to make it work was to force the eclipse to use en locales. So, find your eclipse.ini file and add this in the end of the file: -Duser.language=en
I recorded a path in google earth with the route I wanted to follow. I saved it. I converted it here: http://ge2adt.appspot.com/
Related
Wrote Android things image on a micro SDCard and inserted that card into Raspberry Pi 3 Model B and turned on power,At starting it shows 'Auto config Please wait' then the screen remains empty
I had tried connecting it with PC and it is not detected by adb
How could we test whether it is booting OS or not?
Why nothing is shown on the screen?
The actual problem was the build that I generated in android things, Initially triggered the latest Android things build, which kept on failing to boot, so again triggered another standard build that works fine and use Class10 SD cards to write the Android Things
I had the same problem. I solved it by unziping with https://theunarchiver.com/ which was recommended here https://developer.android.com/things/hardware/raspberrypi.html
I recently switched to Android Studio 2.0. Before that I was able to send GPX files to the emulator through ADM's Emulator control tab. Since the switching, that feature seems to be broken. I am currently able to connect through telnet and manually send geo fixes (not easy to simulate long tracks this way), but ADM refuses to let me set a GPX file, a manual location or a KML file. Buttons are enabled but I can't click other them.
I should say, that ADM is correctly connected to the device, since I was able to parse file system, etc.
Any hint on what's happening? Any workaround?
I'm trying to test a GPS-enabled application and want to test it on the real device (not the emulator). I want to spoof the application by sending fake GPS coordinates to it.
I've read that you can do this with DDMS, but this does not work because the "Emulator Control" to send the GPS signal is greyed out (disabled). I tried:
Selecting the right device.
Running DDMS both in eclipse and outside from the command-line
I have enabled the Settings on my Android device so it allows USB debugging and GPS spoofing.
Like I said in my comment, I have the same issue. The best workaround I've found so far is Motorola Dev Forums, which requires a bit of code to spoof locations on an actual device. However, like the OP pointed out to the ignorant Moto rep, the android docs do promise the ability to fake locations from the DDMS. I'll try coding the TestProvider tomorrow, and post updates here if I have any luck. Would appreciate it if you could do the same.
using mock location you do this. I have found some solution from this link may be this will help you check out this link
http://community.developer.motorola.com/t5/Android-App-Development-for/How-to-Send-Mock-Locations-with-DDMS-to-DROID-2-real-device/td-p/13720
I originally asked this question as a possible bug in Eclipse Helios :
link text
I accepted that it was bug in Helios but I now find that I'm now getting the same error under Eclipse 3.5
When I send a location from the DDMS perspective using the emulator control tab. I have a standard listener:
onLocationChanged(Location location){...}
If I break on the first line of this, having sent the lat/lon pair of 53.5/-3.0 from the DDMS tab, then the mLatitude/mLongitude in the location argument have changed to 53.508833/-3.005000 (6 dec places only shown).
The Android SDK is 2.2 in both and the target is Google APIs level 7.
Does anybody else experience this or could offer a possible explanation? (It amounts to quite a big error in terms of metres on the map.)
Yes!!! I have the same issue.
I also have Eclipse Helios, but not sure if this is a Helios issue, since I can start the Emulator from the command line, and send coords using "geo fix" command and get the same problem.
Could be an issue with new versions of Android SDK. I have used previous Android SDK and Eclipse Europa on a PC with no problem. Recently (Oct 2010) I bought a Mac, so I had to install new Eclipse and new Android SDK.
So I'm testing my app, the same one that works fine when testing on the PC, and I'm using the same GPX file that I always use to send coords to the app. And sure enough I get the weird issue you show above with extra numbers after the decimal point added in. Same thing if I use geo fix from command line.
Also, definitely not an App issue. I can open Google Maps in Emulator and send geo fix coords and then use My Location feature in Google maps and it centers on the wrong coords.
So I'm guessing a problem with Emulator in new versions of Android SDK.
Ok, this is a really weird one.
I'm sending Latitude/Longitude to Emulator running my App and its getting the wrong Coordinates !!! Everything I send (either via DDMS using GPX file, DDMS Manual, or telnet and using geo fix command), gets received, but when I print the latitude/longitude points received by the app, there are off by just a little bit (well a few hundred yards to where I was aiming for).
Discovered this because I've always tested my app on a PC, but recently purchased a Mac. So I'm going through my standard tests, using the GPX file with lat/long points that I always used on the PC, and the app is showing the wrong location.
Example:
I send this:
geo fix geo fix -72.74 41.74
And in my app, onLocationChanged, location.toString() says this:
Location[mProvider=gps,mTime=1287892837000,mLatitude=41.74016776666667,mLongitude=-72.74533443333333,mHasAltitude=false,mAltitude=0.0,mHasSpeed=false,mSpeed=0.0,mHasBearing=false,mBearing=0.0,mHasAccuracy=false,mAccuracy=0.0,mExtras=Bundle[mParcelledData.dataSize=4]]
I mean what the heck?? Tested with Google Maps also, and if I select myLocation, it goes to the same wacky coordinates instead of the actual ones I sent.
Looks like some weird math or conversion issue, since the numbers are close, but not exact.
Again, this all works fine on the PC, meaning, on the PC it gets the exact coordinates that I send. For the Emulator I created an avd using AVD manager, WVGA854, Google API Level 8.
Running on new MacBook pro, and new Eclipse Helios install and new install of Android SDK.
This seems like the bug in DDMS .
http://code.google.com/p/android/issues/detail?id=11264