| 1 |
# android_system_properties |
| 2 |
|
| 3 |
A thin rust wrapper for Android system properties. |
| 4 |
|
| 5 |
This crate is similar to the `android-properties` crate with the exception that |
| 6 |
the necessary Android libc symbols are loaded dynamically instead of linked |
| 7 |
statically. In practice this means that the same binary will work with old and |
| 8 |
new versions of Android, even though the API for reading system properties changed |
| 9 |
around Android L. |
| 10 |
|
| 11 |
## Example |
| 12 |
|
| 13 |
```rust |
| 14 |
use android_system_properties::AndroidSystemProperties; |
| 15 |
|
| 16 |
let properties = AndroidSystemProperties::new(); |
| 17 |
|
| 18 |
if let Some(value) = properties.get("persist.sys.timezone") { |
| 19 |
println!("{}", value); |
| 20 |
} |
| 21 |
``` |
| 22 |
|
| 23 |
## Listing and setting properties |
| 24 |
|
| 25 |
For the sake of simplicity this crate currently only contains what's needed by wgpu. |
| 26 |
The implementations for listing and setting properties can be added back if anyone needs |
| 27 |
them (let me know by filing an issue). |
| 28 |
|
| 29 |
## License |
| 30 |
|
| 31 |
Licensed under either of |
| 32 |
|
| 33 |
* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) |
| 34 |
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) |
| 35 |
|
| 36 |
at your option. |