AgoraIO / Advanced-Video

MIT License
261 stars 336 forks source link

Android - (Raw Data) onCaptureVideoFrame and onRenderVideoFrame methods don't get called with App Bundle #185

Closed Jack29913 closed 4 years ago

Jack29913 commented 4 years ago

Hello,

Raw data lib works when we create regular APK but it doesn't work with App Bundle. Neither onCaptureVideoFrame nor onRenderVideoFrame methods gets called at MediaDataObserverPlugin.class How can we resolve this issue? We need the solution ASAP please

Jack29913 commented 4 years ago

After checking native code it looks like this line is the culprit under media_preprocessing_plugin_jni.cpp: if (!rtcEngine) return;

It looks like this rtcEngine is set in this native method loadAgoraRtcEnginePlugin. When bundle is used, its not called as I don't see the log but its called when regular apk is used .

brianxcli commented 4 years ago

By default, Android Studio plugin packages uncompressed native libraries into app bundles. Thus the originally uncompressed native libraries in path/to/app/lib will be missing.

"As a temporary workaround, you can also use android.bundle.enableUncompressedNativeLibs=false in your gradle.properties until we address this more permanently."

https://issuetracker.google.com/issues/127691101

Please take a look at this post.