android AsyncCallback

Hi everyone.

in the “SDK for Android Documentation” at “Search with the Where clause”

I use the part whith custom class

Backendless.Persistence.of( Invoices.class ).find( dataQuery, new AsyncCallback<BackendlessCollection<Invoices>>(){

        @Override
        public void handleResponse(BackendlessCollection&lt;Invoices&gt; invoicesCollection) {

            ???what  the code I need to get the objects???              (name, codeName, amount)            }

        @Override
        public void handleFault(BackendlessFault backendlessFault) {

        }
    });Thanks

The argument of the “handleResponse” method contains the data returned from the server.

Use the debugger to see what you got in the “invoicesCollection”. Or do it with the code:

public void handleResponse( BackendlessCollection&lt;Invoices&gt; invoicesCollection )
{
  Iterator&lt;Invoices&gt; iterator = invoicesCollection.getCurrentPage().iterator();
  while( iterator.hasNext() )
  {
    Invoices invoice = iterator.next();
   // use the invoice object to get the data
  }
}