Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Крэш при вызове Aimybox.abandonRequestAudioFocus #119

Open
Steyrix opened this issue Nov 16, 2021 · 1 comment
Open

Крэш при вызове Aimybox.abandonRequestAudioFocus #119

Steyrix opened this issue Nov 16, 2021 · 1 comment

Comments

@Steyrix
Copy link

Steyrix commented Nov 16, 2021

Логика, связанная с этим методом нужна нам для прерывания посторонних звуков при вызове голосового помощника.
Однако, стреляет крэш вот с таким стектрейсом

Fatal Exception: java.lang.IllegalArgumentException
illegal null AudioFocusRequest

android.media.AudioManager.abandonAudioFocusRequest (AudioManager.java:2919)
com.justai.aimybox.Aimybox.abandonRequestAudioFocus (Aimybox.java:317)
com.justai.aimybox.Aimybox.setState (Aimybox.java:131)
com.justai.aimybox.Aimybox.access$setState$p (Aimybox.java:40)
com.justai.aimybox.Aimybox$standby$1.invokeSuspend (Aimybox.java:188)
kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (BaseContinuationImpl.java:33)
kotlinx.coroutines.DispatchedTask.run (DispatchedTask.java:106)
kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.java:571)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.java:750)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.java:678)
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.java:665)

Необходимо выяснить причины эксепшна и пофиксить его, сохраняя при этом логику прерывания звука

Чаще всего воспроизводится на устройствах:

  • Xiaomi (40%)
  • Huawei (25%)
  • Samsung (32%)

На версиях ОС:

  • Android 8 (9%)
  • Android 9 (13%)
  • Android 10 (49%)
  • Android 11 (29%)
@svetlana-e-petrova
Copy link

svetlana-e-petrova commented Nov 22, 2021

Дополнение к ишью:
android 7, версия com.just-ai.aimybox:core и com.just-ai.aimybox:yandex-speechkit 0.17.1
в нашем приложении повисает белый экран при инициализации объектов aimybox, ошибка следующая:
java.lang.ClassNotFoundException: Didn't find class "android.media.AudioFocusRequest$Builder" on path: DexPathList[[zip file "/data/app/ru.alfabank.mobile.android.feature-1/base.apk"],nativeLibraryDirectories=[/data/app/ru.alfabank.mobile.android.feature-1/lib/x86, /data/app/ru.alfabank.mobile.android.feature-1/base.apk!/lib/x86, /system/lib, /vendor/lib]]
Failed resolution of: Landroid/media/AudioFocusRequest$Builder;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants