-
Notifications
You must be signed in to change notification settings - Fork 3
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
Request: make version of this repository for Android #2
Comments
This project intend to parse apk file on j2SE application. |
As I wrote, Android apps won't be able to do it using the API anymore, because the |
Oh , bad news. |
Can you somehow support InputStream and not just File or file-path? |
Support InputStream needs some work, I can afford. |
I would really appreciate it. |
Here, I've asked about it on StackOverflow : |
Maybe copy input stream to a temp file is a quick solution. |
My app returns a list of all APK files that it can find on storage, and information about each. |
May be copy input stream to temp file, and then parse it , a better solution? |
It's still a new file, for each file that the user has. |
I inspected code, apk file read by parser many times. eg. AssetManager is based on file operation, contains scan zip entry. it's hard to done work on input stream once. |
Well, even if it doesn't, you can create the inputStream over and over again. You could have an interface that uses a function to re-create the inputStream. |
One that will also accept InputStream instead of File.
The reason:
In the near future, Google will block storage permission, which requires developers to handle files outside of the scope of the current app, to use SAF instead of File and file-path.
More information here:
https://issuetracker.google.com/issues/128591846
And yes, it's very devastating for many apps and libraries that need to access the files in a normal way. Even the Android framework isn't ready for it, as there are functions such as getPackageArchiveInfo (here) that uses a File or file-path, and have no other alternative.
If you want to test your solution without the storage permission and using just the InputStream, here (the app assumes there is a file named "a.apk" on the root path of the normal storage) :
https://issuetracker.google.com/issues/132481545#comment5
The text was updated successfully, but these errors were encountered: