use of retrofit.mime.TypedFile in project glasquare by davidvavra.
the class CheckInActivity method addPhoto.
private void addPhoto() {
String checkInId = mCheckInResponse.getCheckInId();
TypedFile typedFile = new TypedFile("image/jpeg", mPhoto);
Api.get().create(Photos.class).add(checkInId, typedFile, new Callback<Photos.PhotoAddResponse>() {
@Override
public void success(Photos.PhotoAddResponse photoAddResponse, Response response) {
showCheckInComplete();
}
@Override
public void failure(RetrofitError retrofitError) {
showCheckInComplete();
}
});
}
Aggregations