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

ndk: Add definitions and bindings for API levels #479

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Aug 10, 2024

  1. ndk: Add definitions and bindings for API levels

    `android/api-levels.h` from the NDK defines constants for all
    (NDK-supported) API levels and both a getter for the "current apps'
    target API level" as well as the API level of the device the app is
    running on.  Create bindings to allow users to query this information
    at runtime from their Rust code as well.
    
    The equivalent of the NDK's `__ANDROID_API__` define are our
    `api-level-xx` crate features, used to restrict APIs (and inexistant
    linker symbols) at build-time.
    (As there is no full-fledged Android build system involved, users of the
     `ndk` crate are expected to keep this in sync with the minimum/target
     API level passed to their build tool of choice.)
    MarijnS95 committed Aug 10, 2024
    Configuration menu
    Copy the full SHA
    b29c013 View commit details
    Browse the repository at this point in the history