How to get max Id of items on Firebase Database?
<p>My DB :
<a href="https://i.stack.imgur.com/6Yz8a.png" rel="nofollow"><img src="https://i.stack.imgur.com/6Yz8a.png" alt="enter image description here"></a></p>

<p>I create new item like this:</p>

<pre><code>mFirebaseDatabase.getReference(Api.CREDITS).child(String.valueOf(item.getId())).setValue(item);
</code></pre>

<p>but when I'll create a new item , I need to set his ID... how to determinate last id of items in the list in Firebase?</p>