android 系统使用c语言获取系统属性

时间:2014-12-24 09:45:29   收藏:0   阅读:1297

1. 包含bionic库中"sys/system_properties.h" 

2. 使用接口

a:获取接口 int _system_property_get(const char* key, char* buf),buf[PROP_NAME_MAX]
参数1:获取的属性值,参数2:output:char*

b:设置接口 int __system_property_set(const char *key, const char *value);

参数1:属性值,参数2:value值

评论(0)
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!