Skip to content
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

Implement ability to compare minSdkVersion and download appropriate APK #10

Open
mikehardy opened this issue Mar 13, 2019 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@mikehardy
Copy link
Owner

The system should be able to detect the current device API, the version JSON on the server may contain minSDK information for specific APKs, and the downloader should not fetch an APK with a minSdkVersion that is greater than the device API

This can help the system handle version skew over time

@mikehardy mikehardy assigned mikehardy and unassigned mikehardy Mar 13, 2019
@mikehardy mikehardy added the enhancement New feature or request label Mar 13, 2019
@mikehardy
Copy link
Owner Author

Following implementation of #6 add elements for "minSdk" #sdk (and "abi"), so that we may do device-specific (and thus smaller) downloads

@mikehardy
Copy link
Owner Author

Quick note to mention that the downloads should then be one URL for a universal download, but contain an array of more specific options, with a key that was perhaps a pipe-delimited selector that was like 'abi|minSdk|...' and could contain for any field 'all', or a specific value, and the library could handle fallbacks.

So you could publish a universal APK plus an api16|arm APK, and for an arm64 + api 18 device that react-native-device info indicated could fall back to arm, the api16|arm would be a possible match with preference over the universal download, and thus selected. But if there was an api18|arm, or an api16|arm64 apk those would take precedence.

If you publish api18|all then it signifies the APK should match all ABIs that don't have a specific build

Thinking about which selector wins, I would fix API as more important than ABI, as API unlocks extra functionality, whereas ABI is just size and performance. I suppose in a future enhancement you could specify your preference order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant