Field Day issueshttps://code.cs.earlham.edu/field-science/FieldDay/-/issues2019-06-16T13:30:23-04:00https://code.cs.earlham.edu/field-science/FieldDay/-/issues/22Automatically add a row in fieldday_spot when not present2019-06-16T13:30:23-04:00Craig EarleyAutomatically add a row in fieldday_spot when not presentCurrently, upload of fieldday readings might fail when a spot is not present in fieldday_spot. In such case, catch the error, insert a row in fieldday_spot, and continue uploading. Currently, upload of fieldday readings might fail when a spot is not present in fieldday_spot. In such case, catch the error, insert a row in fieldday_spot, and continue uploading. https://code.cs.earlham.edu/field-science/FieldDay/-/issues/24Bench sample does not "see" spots created on the local device2019-06-16T13:30:23-04:00Craig EarleyBench sample does not "see" spots created on the local deviceBench sample does not "see" spots created on the local device (test with combination of new spot through internal sensors and then bench). Bench sample does not "see" spots created on the local device (test with combination of new spot through internal sensors and then bench). https://code.cs.earlham.edu/field-science/FieldDay/-/issues/25Add an upload table2019-06-16T13:30:23-04:00Craig EarleyAdd an upload tableWe don't record when we do an upload. We should have a table whose schema might resemble the following:
- uploadId, monotonically increasing integer key
- startTime, datetime
- endTime (initialize to null, set to a datetime on complet...We don't record when we do an upload. We should have a table whose schema might resemble the following:
- uploadId, monotonically increasing integer key
- startTime, datetime
- endTime (initialize to null, set to a datetime on complete transaction)
- rowsUploaded, integer
We should update the table during each upload.Craig EarleyCraig Earleyhttps://code.cs.earlham.edu/field-science/FieldDay/-/issues/27Add prompt for location permissions2019-08-01T14:22:50-04:00Craig EarleyAdd prompt for location permissionsAfter fixing some errors and warnings, BlueTooth device detection doesn't work if Field Day lacks location permissions. Add a prompt telling the user to enable Field Day to use the device's location (or possibly whatever object Android u...After fixing some errors and warnings, BlueTooth device detection doesn't work if Field Day lacks location permissions. Add a prompt telling the user to enable Field Day to use the device's location (or possibly whatever object Android uses to request permission from the user directly).Craig EarleyCraig Earleyhttps://code.cs.earlham.edu/field-science/FieldDay/-/issues/28Sampling -> Internal sensors on Nexus 7 crashes2019-08-01T14:23:47-04:00Craig EarleySampling -> Internal sensors on Nexus 7 crashes05-23 14:12:54.046 30426-30426/fieldscience.cs.earlham.edu.fieldday E/AndroidRuntime: FATAL EXCEPTION: main
Process: fieldscience.cs.earlham.edu.fieldday, PID: 30426
java.lang.RuntimeException: Unable to start activity Componen...05-23 14:12:54.046 30426-30426/fieldscience.cs.earlham.edu.fieldday E/AndroidRuntime: FATAL EXCEPTION: main
Process: fieldscience.cs.earlham.edu.fieldday, PID: 30426
java.lang.RuntimeException: Unable to start activity ComponentInfo{fieldscience.cs.earlham.edu.fieldday/fieldscience.cs.earlham.edu.fieldday.SensorSampleActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference
at android.widget.ArrayAdapter.getCount(ArrayAdapter.java:337)
at android.widget.ListView.setAdapter(ListView.java:491)
at fieldscience.cs.earlham.edu.fieldday.SensorSampleActivity.onCreate(SensorSampleActivity.java:168)
at android.app.Activity.performCreate(Activity.java:6251)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Craig EarleyCraig Earleyhttps://code.cs.earlham.edu/field-science/FieldDay/-/issues/29Drive API is deprecated by Google and will stop working in December2019-08-23T10:03:20-04:00Craig EarleyDrive API is deprecated by Google and will stop working in DecemberLast year Google deprecated the Drive API we use.
Unlike some deprecations, which scold you when you run "Inspect Code" but continue to work, Google is shutting this down on their side.
[Timeline from the Google Developers website](htt...Last year Google deprecated the Drive API we use.
Unlike some deprecations, which scold you when you run "Inspect Code" but continue to work, Google is shutting this down on their side.
[Timeline from the Google Developers website](https://developers.google.com/drive/android/deprecation):
```
* December 6, 2018: Deprecation is publicly announced. Existing clients will be able to access the API normally, but should immediately commence with migration efforts. New clients must not use the API.
* October 21, 2019: The Drive Android API is removed from the Google Play Services SDK distribution. Apps will be unable to build until removing the Drive Android API dependency, but existing builds will be unaffected. The Drive Android API public documentation will no longer be available.
* December 6, 2019: The Drive Android API is shut down and all connection attempts will be refused. Clients must migrate by this date.
```
There *are* ways to adjust the app to continue using Drive, but we must change it or we won't be able to use it at all in a few months.Craig EarleyCraig Earleyhttps://code.cs.earlham.edu/field-science/FieldDay/-/issues/30Update deprecated dependencies, themes, and environment settings2019-08-05T12:08:41-04:00Craig EarleyUpdate deprecated dependencies, themes, and environment settings[This is an issue to go along with !9 and its branch.][This is an issue to go along with !9 and its branch.]Craig EarleyCraig Earleyhttps://code.cs.earlham.edu/field-science/FieldDay/-/issues/31App crashes if you try to stream without selecting a sector2019-08-23T11:09:39-04:00Craig EarleyApp crashes if you try to stream without selecting a sectorIf you tap "STREAM" (using either internal sensors or Bluetooth platforms) without selecting a sector, Field Day crashes. (The expected behavior is that it does not crash...)
There are at least two possible solutions:
* Pre-populate the...If you tap "STREAM" (using either internal sensors or Bluetooth platforms) without selecting a sector, Field Day crashes. (The expected behavior is that it does not crash...)
There are at least two possible solutions:
* Pre-populate the site and sector fields with default values. This already appears to happen for the site field, although it does not follow up by populating the sector dropdown with a list of sectors associated with that site.
* On user tap of "STREAM", check for empty values in site and sector. Display a message prompting the user to select a value for each empty field. This adds friction but gives the user more transparent control. Similar logic exists already for "SAMPLE", which displays a message prompting the user to enter a spot number before taking a reading, if they have not already done so.Craig EarleyCraig Earleyhttps://code.cs.earlham.edu/field-science/FieldDay/-/issues/32Bring API usages in line with the requirements of Android 10 (SDK 29)2019-09-13T12:07:45-04:00Craig EarleyBring API usages in line with the requirements of Android 10 (SDK 29)Android Q (or 10 or 29 depending on your context) is here, and I want us to keep up rather than catch up.
Several API usage models are going away, and I think it's causing buggy-looking behavior on my Samsung device (though not yet on a...Android Q (or 10 or 29 depending on your context) is here, and I want us to keep up rather than catch up.
Several API usage models are going away, and I think it's causing buggy-looking behavior on my Samsung device (though not yet on a Nexus tablet). When I run a Lint report:
```
* 'getExternalStorageDirectory()' is deprecated
* 'insertImage(android.content.ContentResolver, java.lang.String, java.lang.String, java.lang.String)' is deprecated
* 'getBitmap(android.content.ContentResolver, android.net.Uri)' is deprecated
```
This matches some GIYF investigations on the same topic. Android 10 appears to be taking additional steps to secure user privacy, and one consequence is that we're going to have to fix the way we handle media and external storage.
I'll iterate on this over the next few weeks.Craig EarleyCraig Earleyhttps://code.cs.earlham.edu/field-science/FieldDay/-/issues/33Device rotation while streaming disrupts current data stream2021-02-13T11:16:03-05:00Craig EarleyDevice rotation while streaming disrupts current data streamRotation of the Android device during a stream is buggy.
To replicate this, open Field Day, configure your database, go to "Builtin Sensors", and observe the following:
* User action: Choose site and sector > choose a 1 sec interval > ...Rotation of the Android device during a stream is buggy.
To replicate this, open Field Day, configure your database, go to "Builtin Sensors", and observe the following:
* User action: Choose site and sector > choose a 1 sec interval > touch "Stream" > wait a few seconds > rotate
* Result: stream appears to stop: the button no longer blinks, and after pressing the button again it uses the default 3 sec interval rather than the (visually highlighted) 1 sec interval; control of streaming also becomes confusing, as the streaming entries counter on the Database Actions screen keeps increasing
* Desired result: after rotation, stream continues uninterrupted at the 1 sec interval, button blinks to reflect this, as if we hadn't rotated the screen at all
(It's true that other activities and fragments without so much dynamic content seem to handle rotation fine, but I'd still characterize this as a pretty significant bug - a real "other than that, Mrs. Lincoln..." situation.)
In the short term, we're fine to tell people to do a rotation lock on their device, which I'm guessing has been our pattern. For the long term, let's fix this.https://code.cs.earlham.edu/field-science/FieldDay/-/issues/35Rename and add information to the Protocols feature in Notebook2021-04-03T10:13:50-04:00Craig EarleyRename and add information to the Protocols feature in NotebookThere's a collection of features called "Notebook" in Field Day, and it includes Google Drive, "Note Pad", and "Protocols". Currently, "Note Pad" has minimal functionality and "Protocols" has none (for historic reasons that aren't releva...There's a collection of features called "Notebook" in Field Day, and it includes Google Drive, "Note Pad", and "Protocols". Currently, "Note Pad" has minimal functionality and "Protocols" has none (for historic reasons that aren't relevant to the current configuration). This issue is about Protocols.
I propose we add buttons pointing to a few pieces of read-only content to the Protocols section:
- a frequently-asked-questions page
- troubleshooting common problems
- our glossary of terms (currently in Drive)
- maybe move the About and Settings buttons here, off the valuable main screen
Since this strays from some strict lab definition of "protocols", consider renaming it as well.https://code.cs.earlham.edu/field-science/FieldDay/-/issues/43Test Slack integration2020-04-29T10:07:36-04:00Craig EarleyTest Slack integrationThis issue will test Slack integration. It will be closed immediately.This issue will test Slack integration. It will be closed immediately.