0

次のように、Android アプリケーションにマップを表示しています。

mMap = ((SupportMapFragment)    getSupportFragmentManager().findFragmentById(R.id.map)).getMap();

フラグメントは次のように定義されます。

<fragment xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:map="http://schemas.android.com/apk/res-auto"
  android:id="@+id/map"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  class="com.google.android.gms.maps.SupportMapFragment"
  map:cameraTargetLat="28.635308"
  map:cameraTargetLng="77.224960"
  map:uiCompass="true"
  map:uiRotateGestures="true"
  map:uiScrollGestures="true"
  map:uiTiltGestures="true"
  map:uiZoomControls="true"
  map:uiZoomGestures="true"/>

問題は、一部のモバイルでは正常に動作し、他のモバイル (Android 2.2、2.3) では動作しないことです。これらの場合、マップ オブジェクトは null です。私には、この背後にある理由は、Google Play サービスがこれらの携帯電話にインストールされていないことにあるようです。はいの場合、可能な回避策は何ですか。

4

0 に答える 0