To initialize the Usergrid SDK, do the following:
- Add 'usergrid-android-.jar' to the build path for your project.
- Add the following to your source code to import commonly used SDK classes:
import org.apache.usergrid.android.sdk.UGClient; import org.apache.usergrid.android.sdk.callbacks.ApiResponseCallback; import org.apache.usergrid.android.sdk.response.ApiResponse;
- Add the following to your 'AndroidManifest.xml':
<uses-permission android:name="android.permission.INTERNET" />
- Instantiate the 'UGClient' class to initialize the Usergrid SDK:
//Usergrid app credentials, available in the admin portal String ORGNAME = "your-org"; String APPNAME = "your-app"; UGClient client = new UGClient(ORGNAME,APPNAME);
To build from source, do the following:
- Update the path in <android.libs>
- Run
sh build_release_zip.sh <version>
- is the SDK version number specified in UGClient.java.