Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Offline Support For Realtime DB does not work with Unity Android SDK #1090

Open
saifullah73 opened this issue Aug 21, 2024 · 2 comments

Comments

@saifullah73
Copy link

Description

ISSUE

I am trying to enable offline capabilities for Realtime DB on Android, but it does not seem to work. The offline capability works fine on Editor and even though Android seems to have the feature, it doesn't work on it.

Code Used

FirebaseApp firebaseApp = Firebase.FirebaseApp.Create(options, Guid.NewGuid().ToString());			
_realtimeDbInstance = FirebaseDatabase.GetInstance(firebaseApp);
_realtimeDbInstance.SetPersistenceEnabled(true);

Reproducing the issue

On Editor:

Launch the game, turn off internet, change player configs, close the game, relaunch after enabling internet. The updated configs show up

On Android:

Repeat the same steps, but after relaunch, the old configs show up , since they were never written to the firebase realtime db

Firebase Unity SDK Version

12.0.0

Unity editor version

2022.3.22f1

Installation Method

.unitypackage

Problematic Firebase Component(s)

Database

Other Firebase Component(s) in use

Analytics, Authentication, Crashlytics, Firestore, Remote Config

Additional SDKs you are using

UnityIAP, Mirror, PlayGames

Targeted Platform(s)

Apple Platforms, Android

Unity editor platform

Mac, Windows

Scripting Runtime

IL2CPP

Release Distribution Type

Pre-built SDK from https://firebase.google.com/download/unity

Relevant Log Output

No response

If using CocoaPods for Apple platforms, the project's Podfile.lock

No response

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@argzdev
Copy link

argzdev commented Aug 22, 2024

Thanks for reporting, @saifullah73. I was able to reproduce the behavior. It looks like the Unity Editor, and the native Firebase Android Quickstart works properly. I'll go ahead and inform our engineers. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants