Collect v1.10.2, 1.11.0,
Android v5 (Lenovo Tab3 7"), Android 6 (Moto G4+), Android 7 (Samsung S2 8")
The bearing widget works great in devices with compass hardware (S2), but does not work in devices without the required hardware to measure magnetic bearings (Tab3, G4+).
Fill in a form with the bearing widget on a compatible vs. an incompatible device.
Incompatible devices show the "capture bearing" button greyed out, so there is some form of communication between ODK Collect rendering the button as inactive and the underlying hardware.
It would be great if in this case, the form would simply and gracefully degrade the widget to a simple numeric input -- after all, the bearing widget is only a special case of a numeric input.
This would allow devices to capture bearing information from built-in hardware (ideally) or from external sources (e.g. a hand held compass, if available).
@opendatakit-bot claim
@lognaturel @grzesiek2010 I am thinking to add an EditText to enter the bearing value relevant sensors are not available.
Solution :
Change org.odk.collect.android.checkForRequiredSensors() to return boolean instead of void (true if any senors are available else false). Store it in manualDataEntry variable for use at other places.
To add EditText :
approach 1:
Based on the returned value, add an EditText to current view.
If I am not wrong, currently QuestionWidget/BearingWidget doesn't have the relevant code for it.
So, adding method getEditText(String name, int id) to BearingWidget will add the required functionality.
approach 2:
Add DecimalWidget to the BearingWidget if needed.
Also, a change in BearingWidget.getAnswer() will be needed to get manual answer.
Which one would be better?
Hello @akshay-ap, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 10 days.
You can reclaim this issue or claim any other issue by commenting @opendatakit-bot claim on that issue.
Thanks for your contributions, and hope to see you again soon!
Thanks for filing this issue, @florianm. As of Collect v1.12, you can manually enter bearing if the needed sensors aren't available.
Thanks so much for the quick resolution! This is why you'll find ESRI
Collector in our trash cans and ODK in our hearts :-)
On 21 Dec 2017 00:14, "Hélène Martin" notifications@github.com wrote:
Thanks for filing this issue, @florianm https://github.com/florianm. As
of Collect v1.12, you can manually enter bearing if the needed sensors
aren't available.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/opendatakit/collect/issues/1572#issuecomment-353107522,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAujvzjo0_Gb0WQVflgEw0DsZAcjnXMPks5tCTJzgaJpZM4QKr0H
.
😄 Glad we could help and big thanks to @akshay-ap for taking the lead on this improvement!
Testing on Android 6, Moto G4+ (no bearing sensors), ODK Collect 1.12.1: works nicely. The "record" bearing button renders a number input and an informative message about the missing sensors is shown.
This will simplify our forms, thanks!
Most helpful comment
Thanks so much for the quick resolution! This is why you'll find ESRI
Collector in our trash cans and ODK in our hearts :-)
On 21 Dec 2017 00:14, "Hélène Martin" notifications@github.com wrote: