Android support for API >= 26 (8, 8.1 and 9)

Hi everyone!

The current codebase for android_core does not get along very well with the latest Android APIs. I noticed some users were struggling a bit to get ROS running in Android Oreo as some questions popped up in ROS Answers. Furthermore, since November 2018 the apps released to the app store (or even updates to existing apps) will need to target API >= 26.

I’ve already sent a draft PR to android_core and android_apps with some changes that should make the codebase compatible with API 28.

There are some downsides:

  • Making the codebase backwards compatible all the way down to API 10 and 15 as it is now is becoming a headache. My suggestion is to rise the minimum API version to 16, and merge android_10 and android_15 packages in a single package, namely android_core_components. I really don’t think anyone is running a ROS application in an Android 15 phone by now, considering the platform version distribution; please let me know otherwise.
  • Android build tools 26+ doesn’t have the android command, which was used by rosjava_build_tools to create Android projects from the command line. The current standard AFAIK is creating an app from Android Studio directly. See this issue for more details. A python script can be created in the future and make use of some templates if necessary.

If you have any suggestions or ideas regarding this please let me know!

2 Likes

I would go as far as min API 19 or 21/22, devices with a lower API are basically inexistent.

1 Like

I finally managed to merge all the required changes into Kinetic branch, together with PRs to rosjava_build_tools and other related repositories.

The PR with the Maven artifacts is open but not yet merged here. Please feel free to try it out and open new issues if necessary; I’ll try to tackle them as soon as I can. Bloom release is also pending.

Cheers, and happy new year!