I use Retrofit 2 and a POST Rest call to send some data to backend. My rest interface looks like:
void postSpecialData(String base64, Callback callback);
whereas my Callback is Retrofit interface with:
void onResponse(Call<T> call, Response<T> response);
void onFailure(Call<T> call, Throwable t);
I call then finally:
getRestCommunicator().postSpecialData(encryptedBase64, new Callback() {
@Override
public void onResponse(Call call, Response response) {
toast("Response code " + response.code());
}
@Override
public void onFailure(Call call, Throwable t) {
toast("Failure REST CALL");
}
});
The encryptedBase64 variable is neither a File nor stored somewhere. How can I get the upload progress to make it visible on a progress bar for example?