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 키를 게임 프로젝트 tuningfork_settings.txt
파일의 api_key
필드에 복사합니다.
다음과 같이 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에 적용되는 법규를 포함하여 모든 관련 개인 정보 보호 법률 및 규정을 준수해야 합니다. 귀하는 귀하의 API 클라이언트 사용자에게 귀하가 수집하는 사용자 정보와 Google 및 제3자와 이러한 정보(광고 포함)를 사용 및 공유하는 방식을 명확하고 정확하게 설명하는 API 클라이언트 개인정보처리방침을 제공하고 준수해야 합니다.'
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 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\n(for example, the one you created for the demo app). 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.\n Copy the API key into the `api_key` field in the game project\n `tuningfork_settings.txt` file.\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.\""]]