Commit 2b08bdf3 authored by Loris Croce's avatar Loris Croce
Browse files

send files not really working

parent b5e38e00
......@@ -47,6 +47,7 @@ public class MainActivity extends AppCompatActivity {
private String appUser;
private String appPosition;
private String TAG = MainActivity.class.getCanonicalName();
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
@Override
......@@ -87,13 +88,13 @@ public class MainActivity extends AppCompatActivity {
sendFiles.setOnClickListener(new CompoundButton.OnClickListener() {
@Override
public void onClick(View v) {
try {
//TODO list files in directory and send them
// TODO upload single file iter list files
sender.uploadMultipleFiles(Arrays.asList(dataLogger.getFolder()
.getFolder().listFiles()));
} catch (Exception e) {
Log.d(TAG, "onClick: " + Arrays.asList(dataLogger.getFolder()
.getFolder().listFiles()));
}
}
});
......@@ -141,8 +142,8 @@ public class MainActivity extends AppCompatActivity {
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
private void startRecording() {
phoneSensors.onResume(this);
Log.d("TAG", "startRecording: User " + dataLogger.getAndroidUser());
Log.d("TAG", "startRecording: Position " + dataLogger.getAndroidPosition());
Log.d(TAG, "startRecording: User " + dataLogger.getAndroidUser());
Log.d(TAG, "startRecording: Position " + dataLogger.getAndroidPosition());
dataLogger.start(phoneSensors.getAll());
String path = dataLogger.getFile().getAbsolutePath();
txtViewFilename.setText(path.substring(path.length()-17));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment