I have a working uploaded ML-model on Goggle Cloud platform (Tested via python and gcloud ml-engine predict).
I am currently trying to get predictions from Android using this library: Client Library for Java with this javadoc. I use a service account for access and Android code in a AsyncTask that looks like this:
JsonFactory jsonFactory = JacksonFactory.getDefaultInstance();
HttpTransport httpTransport = new com.google.api.client.http.javanet.NetHttpTransport();
GoogleCredential credential = GoogleCredential.fromStream(is, httpTransport, jsonFactory);
CloudMachineLearningEngine ml = new CloudMachineLearningEngine.Builder(httpTransport,jsonFactory,credential)
.setApplicationName("myCloudApplication")
.build();
Log.i(TAG,"Successfully set up !!");
is is the InputStream to the json file containing my Service Account Key. I have tried many things getting from here to make predictions against my trained ML-model. I can't find any online examples. Is this even possible?
All help is deeply appreciated.