我要制作一个使用Google Maps API的应用程序。我们都知道它不是免费的搜索工具。
此API密钥需要保存在可以进行反向工程和提取的应用代码中。
如果有人使用僵尸网络+我的apk文件耗尽我的Google Maps帐户怎么办?
答案 0 :(得分:0)
如果您的API密钥不受限制,则可以看到$$巨额账单。
要进行限制,请执行以下步骤:
设置API密钥的应用程序限制
Visit the credentials panel.
Select the API key that you want to set a restriction on. The API key property page appears.
Under Key restrictions, select Application restrictions.
Select one of the restriction types and supply the requested information following the restriction list.
Android apps
Add your package name and SHA-1 signing-certificate fingerprint to restrict usage to your Android app.
Below the types, add the SHA-1 signing-certificate fingersprint and your Android package name from your AndroidManifest.xml file.
iOS apps
Accept requests from the iOS app with the bundle identifier that you supply.
Below the types, select the appropriate iOS bundle identifier from the list.
Click Save.
The restriction becomes part of the API key definition after this step. If you fail to provide the appropriate details or do not click “Save”, the API key will not be restricted.