0
我目前正在從舊的GoogleMaps API切換到較新的V2版本。我重構了舊的邏輯,它完美地工作。因爲我也支持2.1設備,所以我希望將舊的Map作爲舊設備或舊設備的傳統解決方案,而不使用PlayStore。在我來到HTC-Wildfire之前,我測試了很多設備。此設備已委託給MapsV2,但僅顯示空白的白色屏幕。我懷疑它不能渲染新的Map,因爲它缺少對OpenGlES的支持。GoogleMapsV2 OpenGL問題
這是我用來確定代碼地圖的版本應該得到所示:
int availCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
switch (availCode) {
case ConnectionResult.SUCCESS:
addTab(TAB_GOOGLE_MAPS, R.string.tab_google_map, R.drawable.tab_surrounding, GoogleMapsActivityV2.class, true);
break;
case ConnectionResult.SERVICE_MISSING:
case ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED:
case ConnectionResult.SERVICE_DISABLED:
GooglePlayServicesUtil
.getErrorDialog(availCode, this, REQUEST_CODE_PLAY_SERVICES)
.show();
break;
case ConnectionResult.SERVICE_INVALID:
default:
addTab(TAB_GOOGLE_MAPS, R.string.tab_google_map, R.drawable.tab_surrounding, GoogleMapsActivity.class, true);
break;
}
所以它擁有GooglePlayServices支持,但obviosly此檢查不enaugh。是否可以檢查支持的OpenGL-ES版本?我應該檢查什麼才能讓舒爾MapsV2是runnig?我無法在清單中定義requiresFeature openGLES
標記,因爲我有一個傳統回退,並且不想排除不喜歡PlayStore的低端設備或用戶。
Android 2.1及更低版本[不到所有設備的1%](http://developer.android.com/about/dashboards/index.html)確定您需要支持該功能? – WarrenFaith
不,我們打算把它放到2.2。但即使在2.2版本中,仍然存在沒有PlayStore或OpenGL的設備,無法顯示新的GMapsV2 –