API Reference

Package com.kinvey.android.network

  • Class Summary 
    Class Description
    AndroidNetworkManager<T extends GenericJson>
    Wraps the NetworkManager public methods in asynchronous functionality using native Android AsyncTask. This functionality can be accessed through the com.kinvey.android.Client#appData convenience method. NetworkManager gets and saves entities that extend com.google.api.client.json.GenericJson. A class that extends GenericJson can map class members to KinveyCollection properties using com.google.api.client.util.Key attributes. For example, the following will map a string "city" to a Kinvey collection attributed named "city": @Key private String city; The @Key attribute also can take an optional name, which will map the member to a different attribute name in the Kinvey collection. @Key("_id") private String customerID; Methods in this API use either com.kinvey.android.callback.KinveyListCallback for retrieving entity sets, com.kinvey.android.callback.KinveyDeleteCallback for deleting appData, or the general-purpose com.kinvey.java.core.KinveyClientCallback used for retrieving single entites or saving Entities. Entity Set sample: NetworkManager myAppData = kinveyClient.appData("myCollection",EventEntity.class); myAppData.get(appData().query, new KinveyListCallback { public void onFailure(Throwable t) { ... } public void onSuccess(EventEntity[] entities) { ... } });
    AndroidNetworkManager<T extends GenericJson>
    Wraps the NetworkManager public methods in asynchronous functionality using native Android AsyncTask. This functionality can be accessed through the com.kinvey.android.Client#appData convenience method. NetworkManager gets and saves entities that extend com.google.api.client.json.GenericJson. A class that extends GenericJson can map class members to KinveyCollection properties using com.google.api.client.util.Key attributes. For example, the following will map a string "city" to a Kinvey collection attributed named "city": @Key private String city; The @Key attribute also can take an optional name, which will map the member to a different attribute name in the Kinvey collection. @Key("_id") private String customerID; Methods in this API use either com.kinvey.android.callback.KinveyListCallback for retrieving entity sets, com.kinvey.android.callback.KinveyDeleteCallback for deleting appData, or the general-purpose com.kinvey.java.core.KinveyClientCallback used for retrieving single entites or saving Entities. Entity Set sample: NetworkManager myAppData = kinveyClient.appData("myCollection",EventEntity.class); myAppData.get(appData().query, new KinveyListCallback { public void onFailure(Throwable t) { ... } public void onSuccess(EventEntity[] entities) { ... } });
    AsyncLinkedNetworkManager<T extends LinkedGenericJson>
    Wraps the LinkedNetworkManager public methods in asynchronous functionality using native Android AsyncTask. This functionality can be accessed through the com.kinvey.android.Client#linkedData(String, Class, StoreType)} convenience method. The first String parameter is the name of the Collection, and the Class is the expected Response Class. The methods provided in this class take two (optional) callbacks, a KinveyClientCallback for the NetworkManager request as well as a UploaderProgressListener or DownloaderProgressListener for updates on the NetworkFileManager status The functionality of this class is provided by both the com.kinvey.java.network.NetworkManager API as well as the com.kinvey.java.network.NetworkFileManager API.
    AsyncLinkedNetworkManager<T extends LinkedGenericJson>
    Wraps the LinkedNetworkManager public methods in asynchronous functionality using native Android AsyncTask. This functionality can be accessed through the com.kinvey.android.Client#linkedData(String, Class, StoreType)} convenience method. The first String parameter is the name of the Collection, and the Class is the expected Response Class. The methods provided in this class take two (optional) callbacks, a KinveyClientCallback for the NetworkManager request as well as a UploaderProgressListener or DownloaderProgressListener for updates on the NetworkFileManager status The functionality of this class is provided by both the com.kinvey.java.network.NetworkManager API as well as the com.kinvey.java.network.NetworkFileManager API.