Android 9 not backwards compatible?

  • Replies:0
Mobile Visuals
  • Forum posts: 1

Feb 16, 2019, 9:04:07 AM via Website

There seems to be audio issues with Android 9. I tested all the 10 top rated music visualizers. 40% of them have audio issues on Android 9, which makes the audio playing or the visualization not work anymore. I tested the same apps on a device with Android 8, where none of these problems appeared. Here are descriptions of the errors, based on stacktraces from my apps on the Developer console:

1) Visualizer data capture issue

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) android::RefBase::incStrong(void const*) const backtrace:

00 pc 000000000000bc30 /system/lib64/libutils.so (android::RefBase::incStrong(void const*) const)

01 pc 000000000000f7a8 /system/lib64/libutils.so (android::Thread::run(char const*, int, unsigned long)+124)

02 pc 00000000000bd028 /system/lib64/libmedia.so (android::Visualizer::periodicCapture()+224)

03 pc 00000000000bcdd8 /system/lib64/libmedia.so (android::Visualizer::CaptureThread::threadLoop()+88)

04 pc 000000000000f9d4 /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+280)

05 pc 00000000000bc9cc /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+140)

06 pc 0000000000083840 /system/lib64/libc.so (__pthread_start(void*)+36)

07 pc 0000000000023d80 /system/lib64/libc.so (__start_thread+68)

I have debugged and researched and found that setDataCaptureListener in Visualizer causes this problem. This is probably not a driver problem, since I see on the Play console that it happens on these devices:

Xiaomi Mi A1 (tissot_sprout)
Xiaomi Mi A2 Lite (daisy_sprout)
Xiaomi Redmi Note 5 Pro (whyred),
Google Pixel 2 (walleye),
Motorola moto g(6) plus (evert_n), Android 9
Essential Products PH-1 (mata)
Sony Xperia XZ1 Compact (G8441),
Sony Xperia XZ1 (G8341),
Samsung Galaxy S9+ (star2qltesq) & the other new Samsung devices

2) Radio streaming no longer starts

E/MediaPlayerNative: error (1, -2147483646)
E/MediaPlayer: Error (1,-2147483648)
E/ContentValues: onError

The '1' value corresponds to the constant in MediaPlayer. MEDIA_ERROR_UNKNOWN. -2147483648 corresponds to hexadecimal 0x80000000 which is defined as UNKNOWN_ERROR in frameworks/native/include/utils/Errors.h.

This shows that the error's source is hard to pin down as it is quite a generic return value, thrown by codec and compatibility issues, but also thread cancellations and several other types.

It could be that the audio playing model has been changed in Android 9, but I can not find any information about this. The only audio related change seems to be "HD Audio: Improved performance and support for HD audio delivering clearer, sharper, and richer quality sound."

Be the first to answer