Get Device Token Firebase

[Solved] Get Device Token Firebase | Swift - Code Explorer | yomemimo.com
Question : get device token firebase

Answered by : tasmia-binte-sogir

//This is the only one worked for me as of August 29, 2021
FirebaseMessaging.getInstance().getToken().addOnSuccessListener(token -> { if (!TextUtils.isEmpty(token)) { Log.d(TAG, "token successfully retrieved : " + token); } else{ Log.w(TAG, "token should not be null..."); } }).addOnFailureListener(e -> { //handle e }).addOnCanceledListener(() -> { //handle cancel }).addOnCompleteListener(task -> Log.v(TAG, "This is the token : " + task.getResult()));

Source : https://stackoverflow.com/questions/37787373/firebase-fcm-how-to-get-token | Last Update : Sat, 04 Sep 21

Answers related to get device token firebase

Code Explorer Popular Question For Swift