public class

AsyncUserDiscovery

extends UserDiscovery
java.lang.Object
   ↳ com.kinvey.java.UserDiscovery
     ↳ com.kinvey.android.AsyncUserDiscovery

Class Overview

Wraps the com.kinvey.java.UserDiscovery public methods in asynchronous functionality using native Android AsyncTask.

This functionality can be accessed through the userDiscovery() convenience method.

This API is used to search for users based on select criteria. Methods in this API return results via a KinveyUserListCallback.

Sample Usage:

 public void submit(View view) {
    kinveyClient.userDiscovery().lookupByUserName(username, new KinveyUserListCallback () {
        public void onFailure(Throwable t) { ... 
        public void onSuccess(User[] u) { ... }
    });
}
 

Summary

Public Methods
void lookup(UserLookup userlookup, KinveyUserListCallback callback)
Asynchronous user lookup method

Constructs an asynchronous request to find a user, and returns the associated User object via a KinveyClientCallback.

void lookupByFacebookID(String facebookID, KinveyUserListCallback callback)
Asynchronous user lookup by Facebook ID

Constructs an asynchronous request to find a user by facebook ID, and returns the associated User object via a KinveyUserListCallback.

void lookupByFullName(String firstname, String lastname, KinveyUserListCallback callback)
Asynchronous user lookup by first and last name

Constructs an asynchronous request to find a user by first and last name, and returns the associated User object via a KinveyUserListCallback.

void lookupByUserName(String username, KinveyUserListCallback callback)
Asynchronous user lookup by username

Constructs an asynchronous request to find a user by username, and returns the associated User object via a KinveyUserListCallback.

UserLookup userLookup()
[Expand]
Inherited Methods
From class com.kinvey.java.UserDiscovery
From class java.lang.Object

Public Methods

public void lookup (UserLookup userlookup, KinveyUserListCallback callback)

Asynchronous user lookup method

Constructs an asynchronous request to find a user, and returns the associated User object via a KinveyClientCallback. Requests are constructed with a com.google.api.client.json.GenericJson UserLookup object, which can be instantiated via the userLookup() factory method.

Sample Usage:

 UserLookup lookup = kinveyClient.userDiscovery().userLookup();
        lookup.put("age",21);
        kinveyClient.userDiscovery().lookup(lookup, new KinveyUserListCallback() {
            public void onFailure(Throwable t) { ... 
            public void onSuccess(User[] u) { ... }
        });
    }
 

Parameters
userlookup a UserLookup object.
callback a KinveyClientCallback object.

public void lookupByFacebookID (String facebookID, KinveyUserListCallback callback)

Asynchronous user lookup by Facebook ID

Constructs an asynchronous request to find a user by facebook ID, and returns the associated User object via a KinveyUserListCallback.

Sample Usage:

      kinveyClient.userDiscovery().lookupByFacebookID("jsmith", new KinveyUserListCallback() {
            public void onFailure(Throwable t) { ... 
            public void onSuccess(User[] u) { ... }
        });
      }
 

Parameters
facebookID a java.lang.String object.
callback a KinveyUserListCallback object.

public void lookupByFullName (String firstname, String lastname, KinveyUserListCallback callback)

Asynchronous user lookup by first and last name

Constructs an asynchronous request to find a user by first and last name, and returns the associated User object via a KinveyUserListCallback.

Sample Usage:

  kinveyClient.userDiscovery().lookupByFullName("John","Smith", new KinveyUserListCallback() {
            public void onFailure(Throwable t) { ... 
            public void onSuccess(User[] u) { ... }
        });
  
}

Parameters
firstname a java.lang.String object.
lastname a java.lang.String object.
callback a KinveyUserListCallback object.

public void lookupByUserName (String username, KinveyUserListCallback callback)

Asynchronous user lookup by username

Constructs an asynchronous request to find a user by username, and returns the associated User object via a KinveyUserListCallback.

Sample Usage:

 kinveyClient.userDiscovery().lookupByFullName("jsmith", new KinveyUserListCallback() {
            public void onFailure(Throwable t) { ... 
            public void onSuccess(User[] u) { ... }
        });
    }
 

Parameters
username a java.lang.String object.
callback a KinveyUserListCallback object.

public UserLookup userLookup ()