Commit 7b490df4 authored by charliep's avatar charliep
Browse files

Kludge that allows us to take sample pictures under Android <= 7.0 (Nexus 2 and Moto 4)

parent 2fcd3ff7
package fieldscience.cs.earlham.edu.fieldday;
import android.Manifest;
import android.app.Activity;
import android.app.Dialog;
......@@ -17,6 +16,8 @@ import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Environment;
import androidx.preference.PreferenceManager;
import android.os.StrictMode;
import android.provider.MediaStore;
import android.text.Editable;
import android.text.TextWatcher;
......@@ -52,7 +53,7 @@ import java.util.Objects;
public class BenchSampleActivity extends AppCompatActivity {
private static final String TAG = BenchSampleActivity.class.getSimpleName();
private static final String REMOTE_DB = "Remote DB Connected";
private static final String REMOTE_DB = "Remote database onnected";
private static final String table = "fieldday_reading";
private Spinner sectorSpinner;
......@@ -423,6 +424,10 @@ public class BenchSampleActivity extends AppCompatActivity {
1);
return;
}
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build());
File tempFile = null;
try {
tempFile = createTempFile();
......
......@@ -27,6 +27,8 @@ import android.os.Environment;
import android.os.Handler;
import android.os.IBinder;
import androidx.preference.PreferenceManager;
import android.os.StrictMode;
import android.provider.MediaStore;
import android.text.Editable;
import android.text.TextWatcher;
......@@ -597,6 +599,10 @@ public class SensorSampleActivity extends AppCompatActivity {
1);
return;
}
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build());
File tempFile = null;
try {
tempFile = createTempFile();
......
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