I am trying to use the Google Cloud Datastore for a simple read/write function in an Android app.
I went on to this page and compiled this " compile 'com.google.apis:google-api-services-datastore:v1beta2-rev31-1.22.0'
" gradle dependency along with the MavenCentral repository.
I then went onto the Batch documentation here but the compiled gradle library lacks the Calender class used in this example code:
JsonBatchCallback<Calendar> callback = new JsonBatchCallback<Calendar>() {
public void onSuccess(Calendar calendar, HttpHeaders responseHeaders) {
printCalendar(calendar);
addedCalendarsUsingBatch.add(calendar);
}
public void onFailure(GoogleJsonError e, HttpHeaders responseHeaders) {
System.out.println("Error Message: " + e.getMessage());
}
};
...
Calendar client = Calendar.builder(transport, jsonFactory, credential)
.setApplicationName("BatchExample/1.0").build();
BatchRequest batch = client.batch();
Calendar entry1 = new Calendar().setSummary("Calendar for Testing 1");
client.calendars().insert(entry1).queue(batch, callback);
Calendar entry2 = new Calendar().setSummary("Calendar for Testing 2");
client.calendars().insert(entry2).queue(batch, callback);
batch.execute();
What other dependencies do I need to compile to get that class?
I have googled around and looked over other stackoverflow questions here and the sample projects here and I can't seem to find a simple demo of how to do CRUD operations with Google Datastore. Can someone please point me in the direction of some comprehensive documentation/ a tutorial that explains how to perform CRUD operations on Google Datastore without using Google App Engine?
Thanks in advance