A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/android/reference/com/google/android/gms/maps/MapsInitializer below:

MapsInitializer | Google Play services

MapsInitializer

Stay organized with collections Save and categorize content based on your preferences.

Use this class to initialize the Google Maps SDK for Android if features need to be used before obtaining a map. It must be called because some classes such as BitmapDescriptorFactory and CameraUpdateFactory need to be initialized.

Do not use this class if you obtain a valid GoogleMap reference using the onMapReady(GoogleMap map) callback. Instead provide the callback to either MapFragment#getMapAsync() or MapView#getMapAsync(). For examples, see the sample application.

Nested Class Summary Public Method Summary Inherited Method Summary From class java.lang.Object Object

clone()

boolean void

finalize()

final Class<?>

getClass()

int

hashCode()

final void

notify()

final void

notifyAll()

String

toString()

final void

wait(long arg0, int arg1)

final void

wait(long arg0)

final void

wait()

Public Methods public static synchronized int initialize (Context context, MapsInitializer.Renderer preferredRenderer, OnMapsSdkInitializedCallback callback)

Specifies which MapsInitializer.Renderer type you prefer to use to initialize the Google Maps SDK for Android, and provides a callback to receive the actual MapsInitializer.Renderer type. This call will initialize the Google Maps SDK for Android, so that its classes are ready for use. The callback will be triggered when the Maps SDK is initialized.

The Maps SDK only initializes once per Application lifecycle. Only the first call of this method or initialize(Context) takes effect. To make renderer preference meaningful, you must call this method before initialize(Context), and before MapFragment.onCreate(Bundle) and MapView.onCreate(Bundle). It's recommended to do this in Application.onCreate().

Do not use this method if you obtain a valid GoogleMap reference using the onMapReady(GoogleMap map) callback. Instead provide the callback to either MapFragment#getMapAsync() or MapView#getMapAsync(). This call will then have no effect other than triggering the callback for the initialized MapsInitializer.Renderer.

Note the following:

Parameters context Required to fetch the necessary SDK resources and code. Must not be null. preferredRenderer Which MapsInitializer.Renderer type you prefer to use for your application. If null is provided, the default preference is taken. callback The callback that the Maps SDK triggers when it informs you about which renderer type was actually loaded. You can define what you want to do differently according to the maps renderer that is loaded. Returns public static synchronized int initialize (Context context) Parameters context Required to fetch the necessary SDK resources and code. Must not be null. Returns

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-10-31 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["The `MapsInitializer` class initializes the Google Maps SDK for Android, making features like `BitmapDescriptorFactory` and `CameraUpdateFactory` available."],["Initialization is crucial if using map features before obtaining a `GoogleMap` instance via `onMapReady` callback."],["You can specify a preferred renderer (LATEST or LEGACY) during initialization using the `initialize` method with the `MapsInitializer.Renderer` parameter."],["If obtaining a `GoogleMap` instance with the `onMapReady` callback using `MapFragment` or `MapView`, direct initialization with `MapsInitializer` is unnecessary."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4