我希望它有所帮助。在Android 的快速启动应用程序中,您可以下载带有示例应用程序的 sdk,您可以在其中找到此 AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2014 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.identitytoolkit.demo"
android:versionCode="1"
android:versionName="1.0.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.google.identitytoolkit.demo.GitkitDemo"
android:label="@string/app_name"
android:launchMode="singleTask" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Un-comment the following data tag and replace placeholder. -->
<!--data
android:host="gitkit"
android:scheme="INSERT_REVERSED_SERVER_CLIENT_ID" /-->
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data
android:name="identitytoolkit.show_providers"
android:value="Google" />
<meta-data
android:name="identitytoolkit.use_google_plus"
android:value="false" />
<!-- Un-comment the following 3 meta-data tags and replace placeholder with the real value -->
<!--meta-data
android:name="identitytoolkit.api_key"
android:value="INSERT_YOUR_API_KEY" /-->
<!--meta-data
android:name="identitytoolkit.server_client_id"
android:value="INSERT_YOUR_SERVER_CLIENT_ID" /-->
<!--meta-data
android:name="identitytoolkit.server_widget_url"
android:value="INSERT_YOUR_SERVER_WIDGET_URL" /-->
</application>
</manifest>
此外,在Android 应用程序中使用身份工具包的教程中,您可以阅读需要替换的内容:
取消注释 android:scheme 行并将占位符替换为您的反向服务器客户端 ID。您可以在标题为“Web 应用程序的客户端 ID”的 OAuth 部分中找到此 ID。例如,如果您的服务器客户端 ID 是 123.apps.googleusercontent.com,则将 com.googleusercontent.apps.123 放在这里。
取消注释 identitytoolkit.api_key 元数据并将占位符替换为您的 API 密钥。您可以在标题为“浏览器应用程序密钥”的公共 API 访问部分中找到您的 API 密钥。
取消注释 identitytoolkit.server_client_id 元数据并将占位符替换为您的服务器 OAuth2 客户端 ID。您可以在标题为“Web 应用程序的客户端 ID”的 OAuth 部分中找到此 ID。
取消注释 identitytoolkit.server_widget_url 并将占位符替换为您的服务器端 Gitkit 小部件绝对 URL。此字段对于示例应用程序无关紧要,但您需要在设置 Web 服务器端点后对其进行配置。
正如我在开始时所说,我希望它有所帮助,我只是在处理这个教程,我来到你的问题,因为它很令人困惑......我不知道我是否让它工作了,还有很多工作要做做...