functions
.region(region)
.https.onRequest(identify);
端点在本地运行功能在android应用中使用firebase模拟器:
private fun useFirebaseEmulators() {
// 10.0.2.2 is the special IP address to connect to the 'localhost' of
// the host computer from an Android emulator.
val settings = FirebaseFirestoreSettings.Builder()
.setHost("10.0.2.2:8080")
.setSslEnabled(false)
.setPersistenceEnabled(false)
.build()
val firestore = FirebaseFirestore.getInstance()
firestore.firestoreSettings = settings
FirebaseFunctions.getInstance().useFunctionsEmulator("http://10.0.2.2:5001");
}
启动android模拟器,在模拟器中从步骤1调用终结点。
Firebase函数未调用