-
Notifications
You must be signed in to change notification settings - Fork 626
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
[Android] FFMPEG as dynamic feature no Log output #593
Comments
Thanks for creating this issue. I haven't used Android's dynamic feature before. Hope you can give me some time to look at how it works with your app. |
Sure, take your time. :) It is very useful in many cases to reduce the App size. My work-around at the moment is to check if a file was created or not (for example, create an image thumbnail from a video). But with logs, it would be better to track issues with an input file. |
I tried to test the app using your instructions. But
|
No, it looks right. The app should have been installed on your phone. You are not getting an additional notification. You also have to start it manually, it will not autostart. Edit: Please make sure to use the debug flavor for the app and the encoder module when you create the appbundle. After you entered
Please try the following: |
Thanks. I managed to start the application with that command. So, when I click the download button I get the following permission error. Is this something you've seen before. I tried on multiple devices, both received this exception.
|
It looks like a permission error, you can see "untrusted app" in the log. You maybe need to enable install apps from untrusted sources. I don't know which phone you are using, but you should be able to activate it within the android settings. You can also try to install the App from android studio directly first and check if you have a valid logcat output. If this is also not working, you have to activate install app from untrusted sources. You can also try to run the code on an emulator. I haven't tested that, but this should also work. |
Yeah, it was an application permission error. The app needed file access permissions to be able to read split files. Thanks for your suggestions. So, I managed to reproduce this case. The following logs explain what happens there.
We have a log redirection feature that is responsible of capturing Why that happens? Because the initialisation sequence for the Android library is developed assuming that the library is loaded using the Java API, not natively. If you don't want to build the development branch, you can also call the |
Thank you for your hint. Yes, it is working perfectly now. :) |
First, thanks to @tanersener for your great work!
Description
I'm not sure if it is a bug or If I'm missing something: I was able to outsource FFMPEG to a dynamic feature (to eliminate the large app size problem). The logic is working and FFMPEG is working, but I'm not getting any log outout from FFMPEG. I updated an old sample project to demonstrate the issue (see attached)
Expected behavior
I will see the log outputs from FFMPEG even if I use a dynamic feature
Current behavior
FFMPEG is working, but no log outputs are created
To Reproduce
To show a working example: Just install the demo project directly to a smartphone. In that case, the dynamic feature will be installed automatically as a normal feature and FFMPEG will create a normal output you can see inside logcat.
To test the problem, click in Android Studio BUILD -->Build Bundles / Apks --> Build bundle(s)
Now, copy the created app-debug.aab file to an empty folder.
Next, download bundletool for local testing the dynamic feature. You can find the latest version here: https://github.com/google/bundletool/releases copy bundletool to the same directory you copied the .aab file.
Now, do the following commands with connected smartphone and uninstalled demo app:
java -jar bundletool-all-1.11.2.jar build-apks --bundle=app-debug.aab --output=dynamicfeature.apks --local-testing
To install the generated .apks file, do the following:
java -jar bundletool-all-1.11.2.jar install-apks --apks=dynamicfeature.apks
Now test the app. You will see, that the app will be downloaded successful, and you can start it successful. But you won't see any log output. You can also try to read the logs from the session, it will be always empty.
Environment
Android
/arm64-v8a
,v5.1.LTS
main
,development
ndkVersion '22.1.7171670'
Other
If you open the MainActivity, you will see the following code line 126 ff.:
Maybe I forgot one library?
Attachment:
DynamicDelivery.zip
The text was updated successfully, but these errors were encountered: