property_refresh/
property_refresh.rs1use android_properties::{setprop, AndroidProperty};
2
3const HELLO_WORLD_PROPERTY: &str = "hello.world";
4
5fn main() {
6 setprop(HELLO_WORLD_PROPERTY, "initial value").expect("Cannot set android property");
7 let hello_world = AndroidProperty::new(HELLO_WORLD_PROPERTY);
8 println!("Initial property: {}", hello_world);
9
10 setprop(HELLO_WORLD_PROPERTY, "refreshed value").expect("Cannot set android property");
11 println!("Refreshed property: {}", hello_world);
12}