Created
January 28, 2022 06:39
-
-
Save gmYusuf/ec7c28c20c9b1f57e06a071b2c6a35a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
using System; | |
using AndroidUtils; | |
namespace FirebaseUnityWrapper.Database.Event | |
{ | |
public class ValueEventListenerWrapper : AndroidJavaProxy | |
{ | |
protected readonly IValueEventListener mListener; | |
public ValueEventListenerWrapper(IValueEventListener listener) : base("com.google.firebase.database.ValueEventListener") | |
{ | |
mListener = listener; | |
} | |
public void onCancelled(AndroidJavaObject error) | |
{ | |
mListener.onCancelled(error.AsWrapper<DatabaseError>()); | |
} | |
public void onDataChange(AndroidJavaObject snapshot) | |
{ | |
mListener.onDataChange(snapshot.AsWrapper<DataSnapshot>()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment