altosdroid: Deal with Google requiring API version 31 Need to add some magic constants to the build. Need to support BLUETOOTH_SCAN permission. Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid: Add BLUETOOTH_CONNECT permission, handle its lack Android 12 switched how bluetooth permissions work, so now we need a new one to talk to devices. Also deal with a lack of that by not crashing when we can't get the name of a BT device. Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid: Fix tab updates on Android 11 after rotate Android 11 appears to have "optimized" application rotation by regenerating fragments automatically. This means the tab fragments aren't getting created by TabsAdapter.getItem, so that code didn't know about them, which caused it to not know which tab was active so all of the application state wasn't getting updated in the tabs after rotation. Fix this by telling TabsAdapter about fragments that are already created -- altosdroid hears about them in the registerTab hook. Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid: Catch log file open failures and show an error dialog Android changed which directories we can write to once, let's hope it doesn't happen again. Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid: Work without GPS available On devices without GPS receivers, use network location instead of crashing. Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid: Revert getResource().getColor to old API This should keep it compatible with API version 21 Signed-off-by: Keith Packard <keithp@keithp.com>
Bump java lib versions in preparation for 1.9.2 Quite a few changes; let's bump the version so we don't end up with the wrong version on some machine. Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid: Use select tracker dialog when deleting a tracker Remove custom delete tracker dialog code. Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid: When the user switches frequency, look for something there Instead of sticking with the original tracker serial, when the user selects a new frequency, check to see if some data appears there and switch to that tracker. Only do this once, and stop looking if the user selects a tracker. Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid: Change tracker selection dialog Create a table of trackers and allow sorting based on each column. When a tracker is selected, the app will not change to another tracker automatically. Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid: Fix a pile of compile warnings This deletes code which doesn't do anything in API versions past 21 and changes a few bits of code to use the newer supported way. No functional changes are intended... Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid: Use custom dialog themes for all dialogs Instead of a mixture of custom application and standard dialog themes Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid: Add text size selection Add a setup menu item to change the size of the text everywhere. This involved re-doing the layout for most of the tabs. Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid: Check if the telem service is running when bluetooth gets enabled Make sure we aren't trying to send a message when the telem service is shut down and the pointer is null. Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid: Request fine location permission if not already granted This avoids crashing if we don't have access to fine position information. Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid: Make altosdroid code more resilient to weird androidisms Sometimes altosdroid was crashing when messing with configuration bits like selecting different themes. These fixes seem to make that happen less. Signed-off-by: Keith Packard <keithp@keithp.com>
Convert to AndroidX from support_v4 Signed-off-by: Mike Beattie <mike@ethernal.org>
Import cleanup Signed-off-by: Mike Beattie <mike@ethernal.org>
Move java source, and resources to new paths for gradle Signed-off-by: Mike Beattie <mike@ethernal.org>