Realm android findAllAsync fetches 0 count


#1

hi there

i am trying to modify the android to do applications. I see that java uses findAllAsync to get related records. I did similar to what was done in to do application and created another schema to read them all. but when i put a break point at findAllAsync , the result in the next statement gives 0 count in arraylist. I tried to use findAll … but no success :frowning:

I created a similar adapter to todo adapter and displayed data from my schema, it displayed. does it mean, it has to be called from outside of ui thread ?

what if i only want to know one or two string values, and only 1 record whose info would be displayed in a text label ? i would not require an adapter to do a simple application right ?

a couple of insights with code sample will help


#2

Use this construct: https://github.com/realm/realm-java/blob/master/examples/gridViewExample/src/main/java/io/realm/examples/realmgridview/GridViewExampleActivity.java#L34-L67

(without the Realm.deleteRealm obviously)


#3

thanks, it worked like a charm.