protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); permissionHelper = new MappingPermissionsHelper(this); getLocationPermissionsAsync = permissionHelper.CheckAndRequestPermissions(); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); mapFragment = FragmentManager.FindFragmentById(Resource.Id.map) as MapFragment; mapFragment.GetMapAsync(this); if (GoogleApiAvailability.Instance.IsGooglePlayServicesAvailable(this) == 0) { apiClient = new GoogleApiClient.Builder(this) .AddConnectionCallbacks(this) .AddOnConnectionFailedListener(this) .AddApi(LocationServices.API) // Uncomment to test the error recovery code. //.AddApi(PlusClass.API) //.AddScope(PlusClass.ScopePlusLogin) .Build(); } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); permissionHelper = new MappingPermissionsHelper(this); getLocationPermissionsAsync = permissionHelper.CheckAndRequestPermissions(); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); permissionHelper = new MappingPermissionsHelper(this); getLocationPermissionsAsync = permissionHelper.CheckAndRequestPermissions(); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); mapFragment = FragmentManager.FindFragmentById(Resource.Id.map) as MapFragment; mapFragment.GetMapAsync(this); }