void SetupApiKey() { var manifestPath = Path.Combine(Application.dataPath, MainManifestPath); EnsureManifestExists(manifestPath); var changed = false; var apiKey = new MetaData("com.google.android.geo.API_KEY", GoogleMapsViewSettings.AndroidApiKey.Trim()); var manifest = new AndroidManifest(manifestPath); if (!manifest.Contains(apiKey)) { manifest.RemoveSimilar(apiKey); manifest.Add(apiKey); changed = true; } // https://developers.google.com/maps/documentation/android-sdk/config#specify_requirement_for_apache_http_legacy_library if (!manifest.Contains(UsesApacheHttpLibrary)) { manifest.RemoveSimilar(UsesApacheHttpLibrary); manifest.Add(UsesApacheHttpLibrary); changed = true; } if (GoogleMapsViewSettings.AddLocationPermission && !manifest.Contains(LocationPermission)) { manifest.Add(LocationPermission); changed = true; } if (changed) { manifest.Save(); } }
public bool IsConfigurationCorrect() { return(GetSocialModifications.All(node => _manifest.Contains(node)) && DeprecatedModifications.All(node => !_manifest.Contains(node))); }