1

I currently have this code in an app that uses Google maps:

  <uses-permission android:name="com.example.app.permission.MAPS_RECEIVE" />
  <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />    
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />  
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  <uses-feature android:glEsVersion="0x00020000" android:required="true" />

I have started to wonder though, if I set all these to required="false" the app would presumbly generated a shorter "requires" list when users download the app... Is there any reason not to just set them all to not required?

Currently I do this when loading maps

private void setUpMapGoogleIfNeeded() {    
    if (mMapGoogle == null) {
      mFragmentManager = getSupportFragmentManager();      
      mSupportMapFragment = (SupportMapFragment) mFragmentManager.findFragmentById(R.id.mapFragment);           
      mMapGoogle = mSupportMapFragment.getMap();        
      if (mMapGoogle != null) {
        mMapGoogle.setMyLocationEnabled(SharedCode.sharedSupportsGPS(true, thisActivityContext));
      }
    }             

Does anyone have experience with this? Are the siuttations I have not thought of where setting required = false for above menions can cause errors/exceptions in my app?

4

1 回答 1

2

for没有android:required属性<uses-permission>,因此将被忽略。当用户下载应用程序时,它不会导致“更短的“需求”列表”。

于 2013-07-21T14:13:29.447 回答