woheller69 / whoBIRD

Identify bird sounds in real time with this Android version of BirdNET. Bird sound recognition for more than 6,000 species worldwide.
GNU General Public License v3.0
249 stars 13 forks source link

Support Android 9+ #52

Closed lxwntr closed 2 weeks ago

lxwntr commented 3 weeks ago

I got the app to work on Android 9 and tested it on a real device.

The UI code needed minor changes to get window metrics on Android <11.

The backup function did not work on my device (access denied), so I rewrote it to use Intent.ACTION_CREATE_DOCUMENT (API level 19). This API uses streams (it can store, for example, to a cloud provider) and required a workaround to work with Zip4j because ZipOutputStream does not provide the addFolder method and requires iterating over and manually adding metadata+content for each file. I opted to keep using ZipFile with a temporary file and it gets copied to the destination.

No other changes were necessary and identification worked out of the box.

Closes #22, #50

woheller69 commented 3 weeks ago

Thanks, but it was on purpose that I decided to request Android 11 as minimum. Lower Android versions will increase the maintenance effort also for future features and I do not have time for that. So I do currently not plan to merge it. But if you like you can upload an apk in an Android 9 issue so others can download it.

woheller69 commented 2 weeks ago

For now I changed my mind. I had my code already changed, so merging did not work. But the feature is now integrated. https://github.com/woheller69/whoBIRD/commit/02baacafb2f6c1d328d4c4ca68dc77b10000743c

nanderer commented 2 weeks ago

Hi @lxwntr ,

If you got some version to work on older Android versions could you provide an apk for me to try it out?

Thanks in advance

woheller69 commented 2 weeks ago

New version supporting Android 9+ will be on F-Droid in a few days...