1.
In database, in booklistings, the key for book listings are now UID + "-" + ISBN
in userbooks, keys are unchanged, they are already distinguished with the parent path of UID
2.
to get current user info anywhere
info = CurrentUser.getInstance().blah
every blah (name/email/phone/profile) should be changed to the real users infomation upon login.
Currently only email and UID are changed upon login. Database side changes need to be made to record user profiles.
3
MockDataBase Removed
Everything read/write of database is now done through DatabaseManager
DatabaseManager is now a singleton class.
4
Async database initiation task is called upon start of app to connect and read all the database data to private attributes. These data will get real time update once the database changes.
5
No more writeUserAccount in the DatabaseManager as login is taken care by firebase auth system
database model change
BookListings
UID-bookisbn
..
UserBooks
UID
ISBN
...
5.
upon successful login
FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser()
is saved to CurrentUser singleton class for future use
6.
CurrentUser class changed to work with FirebaseUser
7.
UserAccount class now doesn't need accountPassword field, removed.
8.
writeBookListings() in DatabaseManager now called WriteToAllBookListings()
9.
To do database read/write from everwhere
class SomeClass:
private DatabaseManager manager = DatabaseManager();
//somewhere inside the class
....
booklisting = manager.readBookWithISBN(isbn);
...
1. In database, in booklistings, the key for book listings are now UID + "-" + ISBN
in userbooks, keys are unchanged, they are already distinguished with the parent path of UID
2. to get current user info anywhere
info = CurrentUser.getInstance().blah
every blah (name/email/phone/profile) should be changed to the real users infomation upon login.
Currently only email and UID are changed upon login. Database side changes need to be made to record user profiles.
3 MockDataBase Removed
Everything read/write of database is now done through DatabaseManager DatabaseManager is now a singleton class.
4 Async database initiation task is called upon start of app to connect and read all the database data to private attributes. These data will get real time update once the database changes.
5 No more writeUserAccount in the DatabaseManager as login is taken care by firebase auth system
BookListings UID-bookisbn ..
UserBooks UID ISBN ...
5. upon successful login FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser() is saved to CurrentUser singleton class for future use
6. CurrentUser class changed to work with FirebaseUser
7. UserAccount class now doesn't need accountPassword field, removed.
8. writeBookListings() in DatabaseManager now called WriteToAllBookListings()
9. To do database read/write from everwhere
class SomeClass: private DatabaseManager manager = DatabaseManager();
//somewhere inside the class .... booklisting = manager.readBookWithISBN(isbn); ...