diff --git a/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java b/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java index 30adfc719e8e0c6e9876d5550fed08e9dc8f58fa..1963036cb0601b66029cfa0e31f60b4bf7be183c 100644 --- a/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java +++ b/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java @@ -27,7 +27,7 @@ import android.os.Bundle; import android.util.Log; import android.content.Context; - +import java.io.IOException; import java.util.ArrayList; import java.util.Map; import java.util.Set; @@ -74,6 +74,17 @@ public class FIRMessagingModule extends ReactContextBaseJavaModule implements Li promise.resolve(FirebaseInstanceId.getInstance().getToken()); } + @ReactMethod + public void deleteInstanceId(Promise promise){ + try { + FirebaseInstanceId.getInstance().deleteInstanceId(); + promise.resolve(null); + } catch (IOException e) { + e.printStackTrace(); + promise.reject(e.getCause()); + } + } + @ReactMethod public void presentLocalNotification(ReadableMap details) { Bundle bundle = Arguments.toBundle(details);