To use the Tuning Fork library in your own app, enable the Android Performance Parameters API in the Google Cloud Console. You need a Google developer account to create a Google Cloud Console project.

You can use an existing Google Cloud Console project (for example, the one you created for the demo app). Follow the steps below to**add the proper API key restrictions**to your existing project.

## Steps

Follow these steps to enable the API:

1. In the Google Cloud Console, go to the**Projects**page. Select an existing project or create a new project.

   [Go to the Projects Page](https://console.cloud.google.com/project)

   For more information on creating a Google Cloud Console project, see the[Cloud API documentation](https://cloud.google.com/apis/docs/getting-started).
2. Enable the Android Performance Parameters API on the project you selected.

   [Enable the API](https://console.cloud.google.com/apis/api/performanceparameters.googleapis.com/overview)

   If it has not been enabled, click**ENABLE**.
3. Select the**Credentials**tab on the left.

4. If the project does not have an existing API key, click**CREATE CREDENTIALS** and select**API Key**.

   ![](https://developer.android.com/static/images/games/performance-tuner/api-key.png)**Figure 1.**Create an API key
5. Copy the API key into the`api_key`field in the game project`tuningfork_settings.txt`file.

6. Restrict the API key to Android apps only:

   1. You should see a**Key restrictions**section. If not, double-click the API key.
   2. Under**Application restrictions** , select**Android apps**.
   3. Click**ADD AN ITEM**.
   4. Enter your app's package name.
   5. Enter the SHA-1 certificate fingerprint to[authenticate your app](https://developers.google.com/android/guides/client-auth). Use the release certificate fingerprint:

      ```
      keytool -exportcert -list -v \
        -alias your-key-name -keystore path-to-production-keystore
      ```

      ![](https://developer.android.com/static/images/games/performance-tuner/api-restrict-android.png)**Figure 2.**Restrict the key to Android apps only
7. Restrict the API key to the Android Performance Parameters API:

   1. Under**API restrictions** , select**Restrict key**.
   2. Select**Android Performance Parameters API**from the list.

   ![](https://developer.android.com/static/images/games/performance-tuner/api-restrict-api.png)**Figure 3.**Restrict the key to the Android Performance Parameters API
8. Make sure to click**Save**to enable the restrictions.

## Privacy

Review your app's Privacy Policy to ensure that it appropriately reflects that data about devices and usage may be shared with Google. Under Section 3.b the[Google APIs Terms of Service](https://developers.google.com/terms), which governs your use of the Android Performance Parameters APIs, you must:

"comply with all applicable privacy laws and regulations including those applying to PII. You will provide and adhere to a privacy policy for your API Client that clearly and accurately describes to users of your API Client what user information you collect and how you use and share such information (including for advertising) with Google and third parties."