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: Switch storage to media dir Even with the WRITE_EXTERNAL_STORAGE permission, we appear to no longer have permission to write to a random external storage dir. Instead, we only have permission to write to an app-specific dir, buried deep in the directory tree. We can get that directory name with getExternalMediaDirs()[0]. 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: Synchronize access to the 'rockets' list for online maps Online maps gets rockets added by the telem code and the same data are used to create the maps UI. Synchronise access to that object to prevent simutaneous operations. Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid: Safeguard preferences code in case it's called too early Make sure there's a backend set up before accessing data as it seems this code can be called before the preferences code is called before the backend is created. Signed-off-by: Keith Packard <keithp@keithp.com>
altosdroid: Skip clicks on BT device entries that are too short Maybe these are some kind of extra object? In any case, nothing that we care about, so just ignore the click. 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>