I'm using Firebase in my project and I was trying to create a unique key using Firebase. Using this key I wanna send posts when user start the activity. Like this:
"Posts"
|
-> "Parent Unique key"
|
-> "child unique key 1"
-> "child unique key 2"
-> "child unique key 3"
...
I wanna create Parent Unique key
and by using it I wanna send posts. I know how to create unique key in firebase using push()
but the problem is when user restart the activity, a new unique key will generate. I don't wanna create the same parent key again after creating once and I can't use user_id here as multiple users have different ids. Also I don't wanna store the parent key in some storage medium. Is it possible to create such key in firebase?