-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I got a response from server that tells me {"status:"failure","reason":"Not a WAVE file - no RIFF header"}.
I try to upload the sample wav provided but from my device storage.
private HttpEntity getEntityForSendFile()
{
File directory = Environment.getExternalStorageDirectory();
File file = new File( directory + "/AudioRecorder" );
File AudioSavePathInDevice = new File( file + "/sample.wav" );
InputStreamEntity reqEntity = null;
// Fetches file from local resources.
/*InputStream raw = getResources().openRawResource(R.raw.sample);*/
try{
InputStream raw = new FileInputStream(AudioSavePathInDevice);
reqEntity = new InputStreamEntity(raw, -1);
}catch (Exception e) {
e.printStackTrace();
}
return reqEntity;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels