How to prepare KML file for Android Emulator Control?

I am trying to test my application with location information. You know the Emulator Control has an ability to load from KML file. (Eclipse -> DDMS -> Emulator Control -> Location Controls -> KML -> Load KML...) I've prepared KML file using Google earth application with its "Add path". Then saved it by .kml extension and load it on the Eclipse. Eclipse didn't load this KML file.

How to prepare KML file for Android Emulator Control?


Asked by: Ada640 | Posted: 20-01-2022






Answer 1

I've found solution : KML format is :

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.x">
<Placemark>
    <name>1</name>
        <Point><coordinates>-109.0450005395891,33.39487928579279,0</coordinates></Point>
</Placemark>
</kml>

Answered by: Rubie336 | Posted: 21-02-2022



Answer 2

The KML format that's accepted by ADT (0.8.x) differs from the Google Earth (or even Google Tracks) format.

Convert the original KML file at http://ge2adt.appspot.com/, use your Google account to login.

You can now try to open the file in the emulator control. I still couldn't open the KML file in the emulator. Open the KML file and remove the 'Document' element, don't delete the 'Placemark' elements. Also check if there multiple KML definitions ('kml' element). I had two definitions with only one placemark, and one correct definition with multiple placemarks. Delete the definitions with only one placemark.

Answered by: Eric407 | Posted: 21-02-2022



Answer 3

Just tested this, and found actually the only thing you need to change to get the ADT to accept your KML file is to change the namespace to http://earth.google.com/kml/2.x.

You'd think someone at Google would have sorted this out by now...

Answered by: Melanie930 | Posted: 21-02-2022



Answer 4

The KML file must be a 3D file - some GIS tools (e.g. QGIS) don't put the Z value in the output if it is not present in your input data. A simple search and replace to add ,0 before each closing </coordinate> tag will solve this problem.

Answered by: Ryan368 | Posted: 21-02-2022



Similar questions

eclipse - Android Emulator Debugging, Code will not Update

I'm having a troubling problem testing some code for and Android app. My app has two parts, and activity where the user changes some settings, and a broadcast receiver that responds to SMS messages, both in the same package. Here's the problem, I first implemented some simple code to test out the broadcast receiver and the activity, and both worked fine. But then as I tried to refine the code, I noticed the emulat...


Debugging android app does not install on emulator or device

I was having an issue with debugging my app with eclipse. When I go to debug on either a real device or on an emulator the process goes fine except on the console it gets stuck saying "app_name.apk installing....". There are no error messages and I even tried it with the standard hello world app. I've never had this issue before with my previous app, however I have updated the SDK since then. I have debuggable = true...


Is there a better (i.e. faster) Android emulator for debugging?

This question already has answers here:


debugging https from android emulator

I have an android(4.2) app that uses the https to talk to the webservice. I want to debug/log every https that goes out. I have fiddler and wireshark to debug them, but everything looks encrypted. can a man-in-middle attack be setup with emulator and fiddler/wireshark to decode and display the http url and its params?


java - USB Host debugging with Android emulator

I need to test my custom USB peripheral but I'm lacking the right phone that support USB Host, will the Android emulator be enough for me to test my USB peripheral hardware for this matter? UPDATE: I realized that Android-x86 (with VirtualBox or Vmware player) can be used for this purpose, however not still sure to what extent.


android - What is the best device for debugging instead of emulator?

Closed. This question is opinion-based. It is not c...


javascript - Eclipse android emulator debugging

I am working on android application using J-Query Mobile, JavaScript, Phone-Gap and tools that i use is Eclipse IDE. Now I need to know how I'll debug the android app when it runs on emulator. I want to check some java-script code.


android - i want to use my mobile as an emulator but when i connect my mobile to pc and start the debugging usb im using 4.2.2

i want to use my mobile as an emulator but when i connect my mobile to pc and start the debugging usb and run the app it shows me output no emulator found and when I search the emultr my mobile is not showing in the list im using android 4.2.2


java - Android Studio: Images do not show up while debugging app on phone, but do on the emulator

I have inserted an image on a blank activity: &lt;ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/imageView4" android:layout_centerVertical="true" android:layout_centerHorizontal="true" android:src="@drawable/h2ua" /&gt; The image works just fine while viewing in Design, and while testing the app using a Nexus ...


debugging - Android Studio Emulator Error - finished with non-zero exit value 2

So I have an app I've been developing / testing for a bit now and have had no problems at all loading it onto my phone for debug. One day out of nowhere it started throwing and error and wouldn't let me run the emulator anymore. The error is below: * What went wrong: Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.proce...


Debugging Android Widget Code In Eclipse

I am starting with Android programming with the help of Unlocking Android / Manning which came from Santa and is a pretty good book. After running a few little tests and examples, I'm moving towards developing the concepts for my own application. I want my App to execute as a Home Widget and I'm using


debugging - Can't debug Android: This device cannot start. (Code 10)

I have a brand new Nexus One. I'm trying to follow the directions for installing the USB driver. When I plug in the device, it doesn't start the New Hardware Wizard, as the documentation suggests. I can run hdwwiz.exe to launch it and manually install the driver, but when I do, Device Manager ...


debugging - How to Debug on the Samsung Galaxy I7500 Android Phone

How to Debug on the Samsung Galaxy I7500 Android Phone? modify c:\android-sdk-windows-1.5_r3\usb_driver\x86\android_usb.inf under the [Google.NTx86] entry add ; SAMSUNG GALAXY %USB\VID_04E8&amp;PID_6640.DeviceDescRelease%=androidusb.Dev, USB\VID_04E8&amp;PID_6640 %USB\VID_04E8&amp;PID_6640&amp;MI_04.DeviceDescRelease%=androidusb.Dev, USB\VI...


debugging - Cannot step through code in debugger (Android)

For some reason I can't step through the code in the debugger. I am not trying to step through Android source code, just code that resides in my project. My build paths are setup to include it, but whenever I try stepping over anything it gives me a "Source not found" message.


linux - Nexus One Android Debugging in Ubuntu 9.10

I can't get Ubuntu 9.10 to recognize the Nexus One as a debug device. I tried following the instructions found here but they are not working: http://alan.lamielle.net/2010/01/22/nexus-one-usb-in-ubuntu-9-10 Anyone know of a link or know how to get the Nexus One to debug correctly in Ubuntu 9.10?


android - Debugging ADT Eclipse Plugin Install

I've installed the Android SDK and the ADT plugin, but Android doesn't show up in the Window>Preferences... dialog. I'm running Galileo. If I go to the Installation Details part of the About Eclipse dialog, it says that I have 0.9.6 of Android DDMS and Android Development Tools. I can run adb from the command line. I tried going around the uninstall/reinstall loop once. I'm on Windows Vista. I also have 2.7...


Android debugging timeouts

My activity occasionally gets hung somewhere in it's looper. From the log I can see an eventual timeout is logged, and then there's a win-death. WARN/ActivityManager(1052): Activity pause timeout for HistoryRecord{1234 {com.company.app/com.company.app.App}} ... WARN/ActivityManager(1052): Activity idle timeout for HistoryRecord{1234 {com.company.app/com.company.app.App}} ... INFO/Process(416): Sendi...


linux - Low level Android Debugging

Is there a way to trace through function calls at the lowest levels of the Android system? Right now when I debug in Eclipse, it goes through the source files that are located inside the frameworks folder, but is it possible to go even lower? For example show what functions are being called from the libcore folder. I am also interested to find how it communicates with the linux kernel at the bottom of the layers. Is there ...


Debugging an Android app to the phone

I've gone through the page Using Hardware Devices. My manifest has &lt;application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true"&gt; My phone has Menu -> Settings -> Applications -> Development -> USB ...


debugging native code (C++) using gdb on android with Eclipse. Is it possible?

I have some piece of code which uses JNI. I can debug code wrote in Java directly in Eclipse (using ADT). I even have a script, which help me debug native code with gdb. However this is not very comfortable way for doing this. Is it possible to configure Eclipse to use gdb (I guess gdbserver) for debbuging android native applications? Do you know where I could find any description of this?






Still can't find your answer? Check out these communities...



Android Google Support | Android Community | Android Community (Facebook) | Dev.io Android



top