API を有効にする
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
独自のアプリで Tuning Fork ライブラリを使用するには、Google Cloud Console で Android Performance Parameters API を有効にします。Google Cloud Console プロジェクトを作成するには、Google デベロッパー アカウントが必要です。
既存の Google Cloud Console プロジェクト。既存のプロジェクトに適切な API キー制限を追加する手順は次のとおりです。
手順
API を有効にする手順は次のとおりです。
Google Cloud Console でプロジェクト ページに移動します。既存のプロジェクトを選択するか、新しいプロジェクトを作成します。
プロジェクト ページに移動
Google Cloud Console プロジェクトの作成の詳細については、Cloud API のドキュメントをご覧ください。
選択したプロジェクトで Android Performance Parameters API を有効にします。
API を有効にする
有効になっていない場合は、[有効にする] をクリックします。
左側の [認証情報] タブを選択します。
プロジェクトに既存の API キーがない場合は、[認証情報を作成] をクリックして [API キー] を選択します。
図 1. API キーを作成する
API キーをコピーします。後で Unity プラグインに入力します。
API キーを Android アプリのみに制限します。
- [キーの制限] セクションが表示されているはずです。表示されていない場合は、API キーをダブルクリックします。
- [アプリケーションの制限] で [Android アプリ] を選択します。
- [項目を追加] をクリックします。
- アプリのパッケージ名を入力します。
SHA-1 証明書フィンガープリントを入力して、アプリを認証します。リリース証明書フィンガープリントを使用します。
keytool -exportcert -list -v \
-alias your-key-name -keystore path-to-production-keystore
図 2. キーを Android アプリのみに制限する
API キーを Android Performance Parameters API に制限します。
- [API の制限] で [キーを制限] を選択します。
- リストから [Android Performance Parameters API] を選択します。
図 3. キーを Android Performance Parameters API に制限する
制限を有効にするために、必ず [保存] をクリックします。
プライバシー
アプリのプライバシー ポリシーを見直して、デバイスや利用状況に関するデータが Google と共有される可能性があることを適切に反映するようにします。Android Performance Parameters API の使用を規定している Google API 利用規約のセクション 3.b に基づいて、次のようにする必要があります。
「PII に適用されるものを含め、プライバシーに関するすべての適用法を遵守します。どのようなユーザー情報を収集し、その情報(広告を含む)をどのように使用し Google およびサードパーティと共有するかを、明確かつ正確に API クライアントのユーザーに説明する、API クライアントのプライバシー ポリシーを提供し、遵守します。」
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-08-26 UTC。
[null,null,["最終更新日 2025-08-26 UTC。"],[],[],null,["To use the Tuning Fork library in your own app, enable the Android\nPerformance Parameters API in the Google Cloud Console. You need a Google\ndeveloper account to create a Google Cloud Console project.\n\nYou can use an existing Google Cloud Console project. Follow\nthe steps below to **add the proper API key restrictions** to your existing\nproject.\n\nSteps\n\nFollow these steps to enable the API:\n\n1. In the Google Cloud Console, go to the **Projects** page. Select an\n existing project or create a new project.\n\n [Go\n to the Projects Page](https://console.cloud.google.com/project)\n\n For more information on creating a Google Cloud Console project, see the\n [Cloud API documentation](https://cloud.google.com/apis/docs/getting-started).\n2. Enable the Android Performance Parameters API on the project you selected.\n\n [Enable\n the API](https://console.cloud.google.com/apis/api/performanceparameters.googleapis.com/overview)\n\n If it has not been enabled, click **ENABLE**.\n3. Select the **Credentials** tab on the left.\n\n4. If the project does not have an existing API key, click **CREATE\n CREDENTIALS** and select **API Key**.\n\n\n **Figure 1.** Create an API key\n5. Copy the API\n key. Later, you will input it into the Unity plugin.\n\n6. Restrict the API key to Android apps only:\n\n 1. You should see a **Key restrictions** section. If not, double-click the API key.\n 2. Under **Application restrictions** , select **Android apps**.\n 3. Click **ADD AN ITEM**.\n 4. Enter your app's package name.\n 5. Enter the SHA-1 certificate fingerprint to\n [authenticate your app](https://developers.google.com/android/guides/client-auth).\n Use the release certificate fingerprint:\n\n ```\n keytool -exportcert -list -v \\\n -alias your-key-name -keystore path-to-production-keystore\n ```\n\n\n **Figure 2.** Restrict the key to Android apps only\n7. Restrict the API key to the Android Performance Parameters API:\n\n 1. Under **API restrictions** , select **Restrict key**.\n 2. Select **Android Performance Parameters API** from the list.\n\n\n **Figure 3.** Restrict the key to the Android Performance Parameters API\n8. Make sure to click **Save** to enable the restrictions.\n\nPrivacy\n\nReview your app's Privacy Policy to ensure that it appropriately reflects that\ndata about devices and usage may be shared with Google. Under Section 3.b the\n[Google APIs Terms of Service](https://developers.google.com/terms), which\ngoverns your use of the Android Performance Parameters APIs, you must:\n\n\"comply with all applicable privacy laws and regulations including those\napplying to PII. You will provide and adhere to a privacy policy for your API\nClient that clearly and accurately describes to users of your API Client what\nuser information you collect and how you use and share such information\n(including for advertising) with Google and third parties.\""]]