diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index ffe7b40..d0eaba5 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -15,3 +15,8 @@ #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} + +# Note: the onAudioData method name is hardcoded in NativeAudioEngine.cpp so need to tell ProGuard to skip it +-keep public interface tech.schober.vinylcast.audio.NativeAudioEngineListener { + void onAudioData(byte[]); +} diff --git a/app/src/main/cpp/NativeAudioEngine.cpp b/app/src/main/cpp/NativeAudioEngine.cpp index dbbf916..a2a45b3 100644 --- a/app/src/main/cpp/NativeAudioEngine.cpp +++ b/app/src/main/cpp/NativeAudioEngine.cpp @@ -81,6 +81,7 @@ void NativeAudioEngine::setAudioDataListener(JNIEnv *env, jobject instance, jobj jclass jClassAudioDataListener = env->GetObjectClass(callbackObject); //declare java method id + //Note: this method name is hardcoded so need to tell ProGuard to skip it jmethodID jMethodIdOnAudioData = env->GetMethodID(jClassAudioDataListener, "onAudioData", "([B)V"); //check null