且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将Admin SDK API添加到Android项目

更新时间:2023-11-29 22:45:46

所找到的是正确的.您的案例似乎适合使用Firebase Admin SDK.

What you've found is correct. Your case seems to be suitable for using Firebase Admin SDK.

Firebase Admin SDK需要一个服务器应用程序,它将在其上进行初始化.

Firebase Admin SDK needs a server app, on which it will be initialized.

此处,您可以找到设置Firebase的前提条件的完整列表Android SDK.

Here you can find a full list of the prerequisites for setting-up Firebase Android SDK.

您可以设置Firebase功能,该功能将保存您的服务器端代码.在这些功能中,您还可以初始化Firebase Admin SDK.

You can set-up Firebase Functions, which will hold your server-side code. Inside those functions you can also initialize the Firebase Admin SDK.

此处有关Firebase函数的更多信息.

Please refer here for more information on Firebase Functions.

在这里,您可以找到一个使用Admin SDK的示例Firebase应用程序.该示例显示了如何验证对JSON API的访问,以仅允许特定Firebase用户访问数据.

Here you can find a sample Firebase application which uses the Admin SDK. The sample shows how to authenticate access to a JSON API to only allow access to data for a specific Firebase user.

Firebase函数的构建是为了充当无服务器代码,当您开发服务器端逻辑,然后将其部署到Google云上的托管环境中时.这些功能可以包含您希望使用Admin SDK拥有的所有逻辑.

Firebase Functions are built to serve as serverless code, as you develop your server-side logic, then deploy it to a managed environment on Google's cloud. Those functions can contain all the logic that you would like to have using Admin SDK.