How to know the random id given to a firebase data
<p>My problem is that I can't retrieve the random key generated by <code>Firebase</code> when saving data (I'm obliged to use that random key), for example</p>

<p><a href="https://i.stack.imgur.com/tivO6.png" rel="noreferrer"><img src="https://i.stack.imgur.com/tivO6.png" alt="enter image description here"></a></p>

<p>I tried to use <code>dataSnapshot.getKey()</code>, but it didn't work,any help will be highly appreciated. Thanks in advance</p>