开发者

Using the Google map API in Android, using a proxy

I am using the google map API in a very basic app. But the problem is that on running the app, I only see the grid and the map controls...the map doesnt even load in the virtu开发者_如何学Goal device.

I have internet running in the device...the browser seemed to be loading just fine, so it isnt an internet problem.

Also, i did obtain an API key after registering for the map API and included that in my main.xml file...but still it doesnt show the map...just grids.The permissions for using the internet are also granted in the manifest file.

Im using the Google API level 8.Any idea how to fix this?

thx.

EDIT 1: Can anyone please help me out with this...really need help :(

EDIT 2: Well I found the following error in my LogCat:

Sending checkin request

Checkin failed: https://android.clients.google.com/checkin (request #0)

org.apache.http.conn.ConnectTimeOutException: Connect to /209.85.231.100:44 timed out

So basically my connection is timing out...im not really sure why...could anyone provide some fix for this plz?( but the AVD's browser is able to work perfectly, no time out problems..sites are able to load properly)

Also, the pre-installed maps application is showing the following error:

**Network Failure** Wrong remote strings version.GMM Server must be hosting:/strings_remote_533149424.dat

If you know any way i could fix this, it would be extremely helpful...

Thx.


Apparently if you are using a proxy, and have set that in your APN, then your AVD cannot load any application that is using the map, neither the pre-installed one, nor any created by you.
Reference: http://code.google.com/p/android/issues/detail?id=3764#makechanges
Unfortuantely there is no solution for this (yet).
Thx to all who helped :)
PS: If any1 found a solution using the proxy...or any other way to fix this...do post here..


You should not make your network(proxy) settings in your emulator or device. Just open your network settings in your PC. Then go the properties. you will find the list of items in your connections. go to IPV4 and set your default gateway and DNS server.

I faced the same error

**Network Failure** Wrong remote strings version.GMM Server must be hosting:/strings_remote_533149424.dat

Then i followed the above steps. I got the output.....Just check out and reply....


Make sure that these permissions are in your manifest file, outside the closing application tag:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_GPS" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />


Is your emulator connected to the internet? some times the emulator fails to connect to the internet when it boots, you should see a 3g sign on your notification bar.


Seen this issue posted many times, and have written up a really easy tutorial which has helped folk such as this previous question on SO

It generally tends to be one of 3 issues :

  1. API key is incorrect
  2. You are using the standard Android emulator and not the Google APIs.
  3. You have extended Activity instead of MapActivity

Hope this helps.


This is most likely due to the API-key being wrong. Make sure you're using the correct API-key. (The key will be different for your debug certificate (keystore) and the certificate you use to sign the APK before you publish it to Android Market).

To generate an MD5 fingerprint of the debug certificate, first locate the debug keystore. By default, build tools create the debug keystore in the active AVD directory. The location of the AVD directories varies by platform:

Windows Vista: C:\Users\.android\debug.keystore

Windows XP: C:\Documents and Settings\.android\debug.keystore

OS X and Linux: ~/.android/debug.keystore

See http://code.google.com/android/add-ons/google-apis/mapkey.html for more details.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜