I wanna use this API of google but couldn't find any code examples for java. Can anybody help with giving code examples? (i am already listing reviews, I just need to know how to use API to reply reviews.)
https://developers.google.com/android-publisher/reply-to-reviews
My review listing code:
public List<Review> getReviews(String package_name) {
GoogleCredentials credential = null;
try {
credential = GoogleCredentials.fromStream(new FileInputStream("service.json"))
.createScoped(Collections.singleton(AndroidPublisherScopes.ANDROIDPUBLISHER));
HttpTransport httpTransport = new NetHttpTransport();
JsonFactory jsonFactory = new GsonFactory();
HttpRequestInitializer requestInitializer = new HttpCredentialsAdapter(credential);
AndroidPublisher publisher = new AndroidPublisher(httpTransport, jsonFactory, requestInitializer);
//publisher.reviews().reply()
ReviewsListResponse reviews = publisher.reviews().list(package_name).execute();
return reviews.getReviews();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
Aucun commentaire:
Enregistrer un commentaire