[問題] 大陸 連線能力 Google Play Services

看板AndroidDev作者 (skill)時間10年前 (2015/03/23 12:01), 10年前編輯推噓3(305)
留言8則, 4人參與, 最新討論串1/1
想請問各位大大 我要做個GoogleMap的應用 但是大陸手機沒有Google Play Service可使用 並且從大陸無法網路連線到Google相關網站 有查到說用百度地圖 但是變成我要如何判斷手機主人位於大陸地區呢? (除了LocationManager的getLastKnownLocation之外是否有更便利的方式) 另外想請教要如何判斷手機是可以連線到Google的? (單純用網路方法) 謝謝! -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 59.113.208.171 ※ 文章網址: https://www.ptt.cc/bbs/AndroidDev/M.1427083289.A.01E.html

03/23 12:07, , 1F
GooglePlayServicesUtil.isGooglePlayServicesAvailable
03/23 12:07, 1F
謝謝! 但因為我有考慮到台灣手機帶到大陸去的情況 所以可能本身手機支援Google Play Service 但是那邊的網路並無法連線至Google撈資料 (我用Google Places API) ※ 編輯: issuemylove (59.113.208.171), 03/23/2015 12:10:32

03/23 14:01, , 2F
直接ping google的網址?
03/23 14:01, 2F

03/23 14:10, , 3F
ping google
03/23 14:10, 3F

03/23 14:52, , 4F
對了突然想到 大陸手機是根本沒有google service 你直接
03/23 14:52, 4F

03/23 14:53, , 5F
用google service的方法絕對閃退給你看...XD
03/23 14:53, 5F

03/23 15:25, , 6F
謝謝各位QQ 剛剛搞懂ping的意思了...orz
03/23 15:25, 6F

05/07 18:01, , 7F
做個記錄 就算該手機沒有GooglePlayService也可以
05/07 18:01, 7F

05/07 18:01, , 8F
使用 isGooglePlayServicesAvailable
05/07 18:01, 8F
文章代碼(AID): #1L3v0P0U (AndroidDev)