dependencies Įnable Geospatial capabilities in the session configurationīefore creating the session, change the GeospatialMode in your sessionĬonfiguration to ENABLED: // Create a session config.ĪrConfig_setGeospatialMode(ar_session, ar_config, AR_GEOSPATIAL_MODE_ENABLED) ĬHECK(ArSession_configure(ar_session, ar_config) = AR_SUCCESS) Services Location library and the Google Sign-In for Android library. In your app's adle file, setup Google Play services to include the Play The value stored in .API_KEY authorizes this app. Paste the API key here, then copy the entire block. element with the API key as in the following example. In the AndroidManifest.xml file, in an element, add a In your Android Studio project, open app > src > AndroidManifest.xml. Note that if you are using a restricted API key, you must edit the key toĪdd a debug certificate fingerprint or a release certificate fingerprint toĬopy the API key that was created, as you will paste it in a later step. In the top bar, click Create Credentials, and select API Key. In your Google Cloud Project, under APIs & Services, select TheĪPI Key can list a collection of fingerprints, and must include the fingerprintįor the release version, if it is a restricted API key. (if restricted by API), or that it allows your app (if restricted by app). Make sure that the key is either unrestricted, or that it allows the ARCore API Step 3: Register your app signing key with API providers. That are generated from your app bundle (AAB), get the SHA-1 fingerprint as If you are using Play App Signing, where Google manages and protects yourĪpp's signing key for you, and uses it to sign optimized distribution APKs In your Android Studio project, open the Gradle toolpane.Ĭopy the SHA-1 fingerprint you will paste it in a later step.įor sample apps, use the debug fingerprint. SHA-1 fingerprint from Android Studio, as follows: If you are using the signing key for a pre-release or debug version of yourĪpp, or if your app uploads an APK instead of an AAB, get the signing key Note that you need to register separately for all the differentĬombinations of package name and signing key that you use: debug, Get the signing key SHA-1 fingerprint, then plug it into your Google Cloud Keyless authorization is preferred, but API Key authorization is also supported. To make Geospatial API calls to the VPS, your app needs authorization. This service is responsible for hosting, storing, and resolving Geospatial anchors. Enable the ARCore APIīefore using the Visual Positioning System (VPS) in your app, you must first enable the ARCore API in a new or existing Google Cloud Platform project. Other information specific to the platforms you are using.īe sure your development environment satisfies the ARCore SDK requirements, asĭescribed in the Quickstart for Java. If you're new to developing with ARCore, see Getting startedįor information about software and hardware requirements, prerequisities and Introduction to the Geospatial API for more In this document are for the same functionality written in C. The sample app in the Quickstart is written in Java. If you want to run a sample app that demonstrates the functionality describedįor Java. Make sure that you understand fundamental AR conceptsĪnd how to configure an ARCore session before proceeding. Configure your app's settings so that it can use the Geospatial API.
0 Comments
Leave a Reply. |