Abhilash Abhilash - 1 year ago 94
Android Question

Purpose of findFirst() in Realm - Android

What is the use of

method in Realm for Android? Also, how to retrieve the last inserted record from a table using Realm?

Answer Source

findFirst() would be used when you only expect one result from your query, or just don't care about the whole list, and only want to sample one record.

If you want the very last element you could try findAll(), get the size of that list, and get the last element.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download