I'm not sure what your exact problem is, but I was able to get things to work by using the java (client) code taken from this SO question and by slightly modifying your flask code as follows:
if request.method == 'POST':
int_message = 1
print "Data uploading"
for v in request.values:
#logdata = request.stream.readline()
# print "uploading"
# print logdata
# logdata = request.stream.readline()
print "Uploading done"
return Response(str(int_message), mimetype='text/plain')
I wouldn't consider this "the final answer", but hopefully it will give you a shove in the right direciton.
Thanks. Did you install the java client on android or on your desktop?