Google Api keys

  1. From your Google Cloud Platform add the Places and Maps SDK to your project.
  2. Places & Geocoding API Key.
    1. DEV:
      1. Click APIs & Services on the left menu
      2. Click “Credentials”
      3. Click “Create Credentials” on top of the screen
      4. Choose “API key”.
      5. Add a name to identify that Api key (eg. Places Api Key dev).
      6. In “Application Restrictions” choose IP addresses and restrict it to the ip address(es) of your development machine(s).
      7. In the API restrictions section, choose Places API and Geocoding API. You have successfully added a development api key for Places and Geocoding apis.
    2. Release: Repeat the same procedure to the previous step two more times (one for each platform) with the following change in steps
      1. Android
        1. In ‘Application Restrictions’ choose ‘Android Apps’
        2. in ‘Restrict usage to your Android apps’ section click “ADD AN ITEM” and fill in your app’s package name along with the SHA-1 certificate fingerprint. Follow on page instructions on how to generate your ‘Release certificate fingerprint’.
      2. iOS
        1. In ‘Application Restrictions’ choose ‘iOSApps’.
        2. In ‘Accept requests from an iOS application with one of these bundle identifiers’, click “ADD AN ITEM” and type your iOS app’s bundle identifier. Ideally you should use the same name for ios and android.
    3. Open your project and add the above generated keys in the relevent placeholders inside ‘.env.development’ and ‘.env.production’ files.
  3. Google Maps API Key Android.
      1. Click APIs & Services on the left menu -> Click “Credentials” -> Click “Create Credentials” on top of the screen -> Choose “API key”.
      2. Add a name to identify that Api key (eg. Google maps Android Api key).
      3. In “Application Restrictions” choose “Android Apps”.
      4. In “Restrict usage to your Android Apps”, click to add an item and add your package name and the SHA-1 fingerprint of your development machine (Debug certificate fingerprint).
      5. In “Api Restrictions” choose Maps SDK for Android.
      6. Click Save.
      7. Repeat the above steps to add a production Maps Api Key.
      8. Inside your project, open AndroidManifest.xml and depending on the environment you want to build and run your application (development or production) replace with the respective api key from above
             <meta-data
                android:name=”com.google.android.geo.API_KEY”
                android:value=”DEVELOPMENT_OR_PRODUCTION_API_KEY”/>