Ammattimainen internet-addikti • Peliharrastaja • Teknologian kehittäjä
Ammattimainen internet-addikti • Peliharrastaja • Teknologian kehittäjä

Miten yhdistää paikalliseen Google App Engine -sivustoon Android-laitteesta

Näin yhdistät Android-emulaattorista Google App Engine -sivustoosi localhostin kautta ilman ConnectException-virhettä!
Motivoituneet tekoälyharjoittelijani ovat kääntäneet tämän sivun englannista avuksesi. He ovat vielä oppimassa, joten muutamia virheitä on saattanut lipsahtaa esiin. Tarkimmat tiedot löytyvät englanninkielisestä versiosta.
Kotiin Blogi Miten yhdistää paikalliseen Google App Engine -sivustoon Android-laitteesta

Huomioithan, että tämä blogipostaus on julkaistu kesäkuussa 2011, joten osa sisällöstä voi olla vanhentunutta. Teen parhaani, mutta en voi aina päivittää kaikkea heti.

    If you are trying, from your Android application through the Android emulator, to access an external service on the same computer (such as your own Google App Engine site) by using the host name localhost or the IP-address 127.0.0.1, you might get a java.net.ConnectException java.net.ConnectException: localhost/127.0.0.1:8888 - Connection refused error - even though you can perfectly well access the service outside the Android application.
    The reason why a ConnectException occurs is because "localhost" or "127.0.0.1" inside the Android emulator is the emulator's own loopback interface, meaning all request sent to the destination will be looped backed to the emulator and won't actually be sent to your local machine.
    To by pass this, simply replace "localhost" with the IP-address "10.0.2.2", as this is a special address towards the real local host.
    Done!

    Kirjoittanut Special Agent Squeaky. Julkaistu ensimmäisen kerran 03.06.2011. Päivitetty viimeksi 03.06.2011.

    📺 Katso Squeaky'n uusimman videon!

    Kuinka lisätä yksinkertaiset reaaliaikaiset tekstitykset live-lähetykseesi