Code Monkey home page Code Monkey logo

Comments (12)

JunkFood02 avatar JunkFood02 commented on June 12, 2024 1

Where this zips would be hosted?

Similarly, we can host these binaries in the release section of a separate GitHub repository

from youtubedl-android.

JunkFood02 avatar JunkFood02 commented on June 12, 2024 1

To ensure that dependencies are downloaded and loaded after the first cold start, we need to design a reliable process that includes exception handling, downloading progress tracking, and the ability to detect and apply updates online. We should also consider which parts of this process should be implemented in the library itself and which parts should be left to the library's users (app developers).

Additionally, we should maintain the original method of loading dependencies from the APK or external files, since network connections are not always reliable or simply for compatibility.

from youtubedl-android.

BobbyESP avatar BobbyESP commented on June 12, 2024

Agree with that; probably this would mean a library rewrite, right?

from youtubedl-android.

JunkFood02 avatar JunkFood02 commented on June 12, 2024

a library rewrite

Not really, if you take a look at the initialize part of the library, you'll notice that we'll only need a valid zip file to be unzip to the hardcoded destination, despite of where the zip file comes: downloaded from somewhere or extracted from apk (appContext.applicationInfo.nativeLibraryDir)

from youtubedl-android.

BobbyESP avatar BobbyESP commented on June 12, 2024

Yess. Well seen

from youtubedl-android.

BobbyESP avatar BobbyESP commented on June 12, 2024

Yess. Well seen

from youtubedl-android.

BobbyESP avatar BobbyESP commented on June 12, 2024

Where this zips would be hosted?

from youtubedl-android.

BobbyESP avatar BobbyESP commented on June 12, 2024

Where this zips would be hosted?

Similarly, we can host these binaries in the release section of a separate GitHub repository

It's a good idea.

from youtubedl-android.

JunkFood02 avatar JunkFood02 commented on June 12, 2024

Here is some additional input if anyone is interested in this: the executable files themselves (libpython.so, and libffmpeg.so), need to be packaged and shipped along with apks. And the files which can be downloaded, unzipped and loaded are the dependencies of the executables (libpython.zip.so, and libffmpeg.zip.so)

This change is introduced in Android 10: https://developer.android.com/about/versions/10/behavior-changes-10#execute-permission

from youtubedl-android.

BobbyESP avatar BobbyESP commented on June 12, 2024

Here is some additional input if anyone is interested in this: the executable files themselves (libpython.so, and libffmpeg.so), need to be packaged and shipped along with apks. And the files which can be downloaded, unzipped and loaded are the dependencies of the executables (libpython.zip.so, and libffmpeg.zip.so)

This change is introduced in Android 10: developer.android.com/about/versions/10/behavior-changes-10#execute-permission

Exactly what I thought. We can leave packaged in the library those two first and the ones left, downloaded from a hosting service or even GitHub Releases.

from youtubedl-android.

BobbyESP avatar BobbyESP commented on June 12, 2024

To ensure that dependencies are downloaded and loaded after the first cold start, we need to design a reliable process that includes exception handling, downloading progress tracking, and the ability to detect and apply updates online. We should also consider which parts of this process should be implemented in the library itself and which parts should be left to the library's users (app developers).

Additionally, we should maintain the original method of loading dependencies from the APK or external files, since network connections are not always reliable or simply for compatibility.

We could use Ktor Client or maybe OkHttp for the downloading process, downloading the files in the tmp folder of the app data directory, and after that, unzip it and move the dir to the executable's directory

from youtubedl-android.

BobbyESP avatar BobbyESP commented on June 12, 2024

Hi, I'm back with some news. I've made a branch where I will try to achieve this; the ability to download the packages in-app and not to make them be present at the build time increasing the app size. By the moment I have just created the files downloader with Ktor Client. Any other progress will be told here.

from youtubedl-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.