我正在创建一个允许用户在应用中互相呼叫的应用,我希望从firebase auth中检索电话号码,并使用它们在我的用户之间拨打电话。
答案 0 :(得分:2)
查看FirebaseUser类文档:
https://firebase.google.com/docs/reference/android/com/google/firebase/auth/FirebaseUser
getPhoneNumber()
或getDisplayName()
会为您提供所需内容。
然后,当您有电话号码时,以这种方式触发呼叫:
Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:0377778888"));
startActivity(callIntent);
请参阅How to make a phone call in android and come back to my activity when the call is done?