Interconnecting emulators by networ

by Dries Harnie » Sun, 31 Jan 2010 04:14:39 GMT

Sponsored Links

As part of my work on the Android platform I needed emulators to 'see'
each other.
I asked around on the #android IRC channel and apparently this was the
best place to announce my patches.

Currently, emulators are all separated from the real world because
they are in a private subnet, not connected to the outside world.
These patches install a second network card which allows emulators to
talk among themselves.

I have uploaded the patches to Gerrit:
This patch enables the extra network card in the OS and sets up
multicast routing on this card.
This patch enables the -my-ip option in the emulator. If this option
is not given, the emulator works exactly like it does now.

During development I also noticed that the "socket" networking of QEMU
is broken. I have fixed this in a separate patch but I did not know
how to make the other patches depend on it:
This patch fixes networking for QEMU network cards using the "socket"

If this was not the correct place to publish this information, please
let me know and steer me in the right direction :)

Dries Harnie


Other Threads

1. audio streaming from https site

Hi all
        i am developing multimedia player in android which will play
songs using live audio streaming from different sites. but i am unable
to stream songs which are on HTTPS site.
i am solving this issue from 3 days. i could not find any solution's
on net. has anyone some idea to solve this issue.  please help

thanks in advance i will be very grateful to him


2. android

Hi all,

I'm running 0.9 in Eclipse 3.3/ADT.
I have a very stripped down one-class app (converted from m5) which
ought to be
presenting a map (that works ok) and then drawing an overlay (it
In onCreate(), a simple overlay (TOverlay) is created and added to
Lastly, mapUpdateHandler.sendEmptyMessage() is called, which should
invalidate the mapView,
and hence cause the overlay to be drawn.

I've copied the code below, and then copied the manifest.
The code has a few System.out.println's to determine flow of control.
All these appear in the LogCat output except the one in the overlay:
At the very end I've copied the LogCat output.  One can see the

09-09 15:18:06.332: INFO/System.out(695): o2:1
09-09 15:18:06.352: INFO/System.out(695): mUH:msg=101
09-09 15:18:06.352: INFO/System.out(695): mUH:101
09-09 15:18:06.352: INFO/System.out(695): o3: 1

But not the desired "TOverlay.draw"

Any suggestions will be greatly appreciated.
Thanks in advance,

-------------- Java ----------

import java.util.List;

public class Quester extends MapActivity
        private static final double INIT_CENTER_LAT = 42.3908245;
        private static final double INIT_CENTER_LONG = -71.130993;
        private MapView _mapView;

    public void onCreate(Bundle icicle)
        _mapView = new MapView(this, "dummyapikey");
        GeoPoint p = new GeoPoint((int) (INIT_CENTER_LAT * 1000000),
(int) (INIT_CENTER_LONG * 1000000));
        MapController mc = _mapView.getController();

        TOverlay tOver = new TOverlay(_mapView);
        List<Overlay> overlays = _mapView.getOverlays();


List<Overlay> o2 = _mapView.getOverlays();
    private Handler mapUpdateHandler
        = new Handler(){
                public void handleMessage(Message msg) {
                    switch (msg.what) {
                          case 101:
                   //         _mapView.invalidate();
List <Overlay> o3 = _mapView.getOverlays();
System.out.println("o3: "+o3.size());

    public class TOverlay extends Overlay
        private Paint plotPaint = new Paint();
        private MapView mapView;

        public TOverlay(MapView mapView){
                this.mapView = mapView;

        public synchronized void draw(Canvas canvas, boolean b)
            super.draw(canvas, mapView, b);

            int lat = (int)(INIT_CENTER_LAT*1E6);
                int lng = (int)(INIT_CENTER_LONG*1E6);
            GeoPoint geopoint = new GeoPoint(lat, lng);

            Point screenCoords = new Point();
            mapView.getProjection().toPixels(geopoint, screenCoords);
            canvas.drawCircle(screenCoords.x, screenCoords.y, 12,

    public boolean isRouteDisplayed(){
        return false;


--------------- Manifest -------------
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""
    <uses-permission android:name="android.permission.INTERNET" />
    <application android:icon="@drawable/icon">
        <activity android:name=".Quester" android:label="@string/
                <action android:name="android.intent.action.MAIN" />
android:name="android.intent.category.LAUNCHER" />
        <uses-library android:name="" />


3. Add Chrome-lite plugin.

4. How to receive gps enabled/disabled?

5. Immediate need for SQL Server Developer @GA

6. Create a SIP application

7. How to create array object of SharedPreference to store various data