You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, this information is needed by the backend nodejs process, so accessing it via the Android Java API would require a complex back-and-forth via the React Native process.
It would be better to read this information directly from the APK in the nodejs-mobile process. An APK is a Zip archive, and the version and bundleId are stored in the file AndroidManifest.xml that is always present in the root of the Zip archive (see https://developer.android.com/guide/topics/manifest/manifest-intro). AndroidManifest.xml is encoded as binary XML.
Fortunately there is a tool to read this information: app-info-parser. This tool also reads the resources.arsc file, which includes the app icons, which we don't need to it adds a small memory overhead, but if this is a performance issue in the future we could fork app-info-parser and make that parsing separate.
Unfortunately there is no Java API for reading the supported architectures within an APK (at least I can't find one). I think the best way to read the supported architectures of an APK would be to read the contents of the lib folder in the APK. It will contain a folder for each supported architecture. I have started work to add a readdir() method to random-access-zip (also, the name is bad, it should be zip-fs since it replicates the fs methods for a zipfile).
The text was updated successfully, but these errors were encountered:
Split off from #585, which depends on this.
The text was updated successfully, but these errors were encountered: