I am using A/Studio 2.2
My code unpacks a bundle of LatLng-parameters from a preceeding activity and displays the corresponding G/Map, works well in USA. Loved it. In USA, I used Android 6.
I am in China now, I have downloaded Play Store, Google Maps, Gmail etc and installed them on a local popular low-end phone "vivo-v3m". When I installed G/Maps, a message flashed quickly across Android saying GPS is off and to authorize Google to download something to use Google maps, which I did. In China I am using Android 5.1
G/maps works well after that but my app is still not working.
I strongly suspect I have to include or compile some G/Map APIs into the dependencies in the gradle.
Before I start debugging why the code doesn't work here, I need to know whether it is some Google APIs I have to download to use G/Maps.
Google services is now blocked in China. So Google map is not working in china. use Baidu Maps for china
I was going through the same problem before while developing for a Chinese website and came across Baidu maps. After doing some analysis I found few links that give explanation on Baidu maps in English and steps to implement it. I hope it helps you.
http://www.maplandia.com/china/fujian/fuqing/baidu/
Examples of baidu map api :
http://api.map.baidu.com/library/MarkerClusterer/1.2/examples/simple.htm
Baidu Maps Javascript API Document:
https://qianggan.wordpress.com/2015/04/29/baidu-maps-javascript-api-document/
enter link description here
Related
I'm using Google's API like Google Maps and Google Fit in my Android application and I'd like to know if they'd work in China.
And is there a way to test my app like it was in China? I tried looking for a free china vpn but didn't find anything.
Thanks!
Here's the answer from somebody that lived in China for 5 years.
Some Google Apis work, some Apis don't work and some Apis only work sometimes. It is very complicated to predict if they will continue working. China tries to block Google servers quite often.
Answering your question: currently Google Maps don't work in China and you'll have to use Baidu Maps or Bing Maps. Unless people are using a working VPN... in that case it will work.
From personal experience AstrillVPN is ok and should work 90% of the time if you want to test as if you were in China (but this might change with time) ;)
Currently developing an app including google maps, I'm willing to make it work for China as well.
I know the situation in China evolved a bit during the last years. So I would like to know: is it possible to use google maps for an android app in China?
If I attempt to use it as it is directly, the map remains blank, taking probably too long to load or being blocked by the chinese firewall. And my phone has the google services, which is not the case of many other phones.
However, a version of google maps exists in China. See this link: http://www.google.cn/maps?hl=en
So as a part of google is not blocked, would it be possible to load the data of the google maps API for android from the chinese server when the user himself is in China or doesn't have the google services or a VPN?
I finally gave up on google maps and change to GaoDe (amap).
First because Google maps need the googles services, which are not available on Chinese phones.
Then because if there is a way with JavaScript to get to the Chinese google map ( see the following link: developers.google.com/maps/faq?hl=en#china_ws_access ), for android with java it is still not reliable.
Nearly all of the Google service are not working in China.
Most Chinese developer use Baidu or Gaode as the location provider.
How to make the coordinates that located by using the Google Maps Android API (v2) in China correctly display on google map?The type of the coordinates is WGS84 or GCJ02? Any views?
At the moment Google Maps are not officially supported in China. Technically maps are working, but there are 2 major problems for your Chinese customers:
Maps won't work without Google Play Services. Most of the Chinese users do not have them installed.
Google Maps are actually not accurate enough and have some weird offset in coordinates.
What are your options? You will have to use Baidu maps. But the API of their library is different from Google Maps, so to solve the problem you might want to take a look at this library which we wrote: https://github.com/car2go/AnyMaps
Google still has no map publishing license in China (at least as my latest info goes) It may well be that in the near future Google's Map services will be blocked.
A lot of Chinese websites, including ours, use Google's JS as well as their Service API's, Among them is Google's geocoding api. in china, baidu (NASDAQ:BIDU) and sogou [the minor search engine, part of sohu (NASDAQ:SOHU)] both provided online maps and also APIs,
actually, in china, as of now, the google maps api are still available now. as from recent chinatech.us news, Google China passed the annual inspection and got more opportunity to get online map business license so, the 3 API are are and available.
Some android phones from China are not installed google play services. So, I can't use google map for them. I would like to know that is there any map sdk for the phone like this.
There are two main flavours of Android that are not using Google Play Services. Amazon and Nokia forks of Android. But they provide their own Map SDKs. Do you know which kind of Android these phones run in China? If it's a fork by major players then they would be providing their own Map SDK as well.
That being said, OpenStreet map is a widely used open alternative of Google Maps and has a SDK that you can use. You can find more information on that here https://github.com/osmdroid/osmdroid
I'm migrating an app from Google Maps Android API v2 to Google Maps Android API for Business following instructions here : https://developers.google.com/maps/documentation/business/mobile/android/config#migrate_an_existing_application
This should be very straightforward but unfortunately after replacing all the com.google.android.gms.maps references to com.google.android.m4b.maps, the app is compiling right but the map is not showing : I get a gray rectangle instead.
One possible reason (and actually one thing I don't understand so far) is that the API key is the exact same as the one I used for Google Maps Android API. Logically, there should be a personal code to enter somewhere, something like the Client ID / Crypto key I've been sent by Google.
Can anyone help me?
From the documentation link below ,
https://developers.google.com/maps/documentation/business/mobile/android/auth
there seems to be a hidden service named "Google Maps Mobile SDK service"
which will be enabled by Google Enterprise Support when you sign up for the Google Map Mobile SDK for Business.
Once we purchase Business licence, enable this service in our project
and generate a Map V2 API key using same procedure for non business version
we should be able to see the tiles loading on Android Device.
Note:This observation is only based on documentation link above and not an experimented one.