5

This question is relative to this issue Firebase-Android, How to sync data when resume after connection lost?

Step-by-step is:

  • First I login using email method in Auth Activity
  • In Timeline activity I add an record.

Everything looks good. But if I minimize app for about 24 hours, then resume application at timeline activity and add new record, I got error: "java.lang.Exception: Permission denied". I'm sure nothing wrong with new data, but:

path / {
    read() = true;
    write() = isSignedIn();
}
isSignedIn() = auth != null;

So I think that after long idle, maybe session was timeout.

Have you got same issue, and how to overcome this?

Community
  • 1
  • 1
Ricky
  • 569
  • 4
  • 16

1 Answers1

1

I solve this issue by saving last login credential (email + password) then call login with email again when app resumed (onResume event of Activity)

Ricky
  • 569
  • 4
  • 16