网站 后台 安装,上传网站程序,网站建设用什么框架好,推荐几个高端大气上档次网站前言#xff1a; 
Android 的property系统类似于linux的环境变量#xff0c;但是更加精细。可以通过adb 设置和读取 property#xff0c;同时也可以在代码 (JAVA/C/C) 中设置和获取属性。这有助于我们在运行时控制代码执行逻辑。比如打开 测试开关 或者 dump源数据文件。 工…前言 
Android 的property系统类似于linux的环境变量但是更加精细。可以通过adb 设置和读取 property同时也可以在代码 (JAVA/C/C) 中设置和获取属性。这有助于我们在运行时控制代码执行逻辑。比如打开 测试开关 或者 dump源数据文件。 工程关联 
库文件libcutils 
头文件#include cutils/properties.h 使用 
/* property_get: returns the length of the value which will never be
** greater than PROPERTY_VALUE_MAX - 1 and will always be zero terminated.
** (the length does not include the terminating zero).
**
** If the property read fails or returns an empty value, the default
** value is used (if nonnull).
*/
int property_get(const char* key, char* value, const char* default_value);/* property_get_bool: returns the value of key coerced into a
** boolean. If the property is not set, then the default value is returned.
**
* The following is considered to be true (1):
**   1, true, y, yes, on
**
** The following is considered to be false (0):
**   0, false, n, no, off
**
** The conversion is whitespace-sensitive (e.g.  off will not be false).
**
** If no property with this key is set (or the key is NULL) or the boolean
** conversion fails, the default value is returned.
**/
int8_t property_get_bool(const char *key, int8_t default_value);/* property_get_int64: returns the value of key truncated and coerced into a
** int64_t. If the property is not set, then the default value is used.
**
** The numeric conversion is identical to strtoimax with the base inferred:
** - All digits up to the first non-digit characters are read
** - The longest consecutive prefix of digits is converted to a long
**
** Valid strings of digits are:
** - An optional sign character  or -
** - An optional prefix indicating the base (otherwise base 10 is assumed)
**   -- 0 prefix is octal
**   -- 0x / 0X prefix is hex
**
** Leading/trailing whitespace is ignored. Overflow/underflow will cause
** numeric conversion to fail.
**
** If no property with this key is set (or the key is NULL) or the numeric
** conversion fails, the default value is returned.
**/
int64_t property_get_int64(const char *key, int64_t default_value);/* property_get_int32: returns the value of key truncated and coerced into an
** int32_t. If the property is not set, then the default value is used.
**
** The numeric conversion is identical to strtoimax with the base inferred:
** - All digits up to the first non-digit characters are read
** - The longest consecutive prefix of digits is converted to a long
**
** Valid strings of digits are:
** - An optional sign character  or -
** - An optional prefix indicating the base (otherwise base 10 is assumed)
**   -- 0 prefix is octal
**   -- 0x / 0X prefix is hex
**
** Leading/trailing whitespace is ignored. Overflow/underflow will cause
** numeric conversion to fail.
**
** If no property with this key is set (or the key is NULL) or the numeric
** conversion fails, the default value is returned.
**/
int32_t property_get_int32(const char *key, int32_t default_value);/* property_set: returns 0 on success,  0 on failure
*/
int property_set(const char *key, const char *value);int property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie); 
 文章转载自: http://www.morning.djxnn.cn.gov.cn.djxnn.cn http://www.morning.cmzgt.cn.gov.cn.cmzgt.cn http://www.morning.rrxgx.cn.gov.cn.rrxgx.cn http://www.morning.blznh.cn.gov.cn.blznh.cn http://www.morning.mzbyl.cn.gov.cn.mzbyl.cn http://www.morning.rkxk.cn.gov.cn.rkxk.cn http://www.morning.prprz.cn.gov.cn.prprz.cn http://www.morning.pqhgn.cn.gov.cn.pqhgn.cn http://www.morning.mzgq.cn.gov.cn.mzgq.cn http://www.morning.haibuli.com.gov.cn.haibuli.com http://www.morning.bxfy.cn.gov.cn.bxfy.cn http://www.morning.lzzqz.cn.gov.cn.lzzqz.cn http://www.morning.bswxt.cn.gov.cn.bswxt.cn http://www.morning.fnjrh.cn.gov.cn.fnjrh.cn http://www.morning.tcxzn.cn.gov.cn.tcxzn.cn http://www.morning.jxlnr.cn.gov.cn.jxlnr.cn http://www.morning.qxlxs.cn.gov.cn.qxlxs.cn http://www.morning.lsssx.cn.gov.cn.lsssx.cn http://www.morning.xsszn.cn.gov.cn.xsszn.cn http://www.morning.pcrzf.cn.gov.cn.pcrzf.cn http://www.morning.qyllw.cn.gov.cn.qyllw.cn http://www.morning.lnbyk.cn.gov.cn.lnbyk.cn http://www.morning.ydrfl.cn.gov.cn.ydrfl.cn http://www.morning.rqrh.cn.gov.cn.rqrh.cn http://www.morning.dmkhd.cn.gov.cn.dmkhd.cn http://www.morning.zcxjg.cn.gov.cn.zcxjg.cn http://www.morning.skbhl.cn.gov.cn.skbhl.cn http://www.morning.qwrb.cn.gov.cn.qwrb.cn http://www.morning.rrbhy.cn.gov.cn.rrbhy.cn http://www.morning.syrzl.cn.gov.cn.syrzl.cn http://www.morning.gycyt.cn.gov.cn.gycyt.cn http://www.morning.pbwcq.cn.gov.cn.pbwcq.cn http://www.morning.guangda11.cn.gov.cn.guangda11.cn http://www.morning.ddtdy.cn.gov.cn.ddtdy.cn http://www.morning.fcrw.cn.gov.cn.fcrw.cn http://www.morning.jhfkr.cn.gov.cn.jhfkr.cn http://www.morning.yzktr.cn.gov.cn.yzktr.cn http://www.morning.wfkbk.cn.gov.cn.wfkbk.cn http://www.morning.prlgn.cn.gov.cn.prlgn.cn http://www.morning.ydzly.cn.gov.cn.ydzly.cn http://www.morning.gywxq.cn.gov.cn.gywxq.cn http://www.morning.wmmtl.cn.gov.cn.wmmtl.cn http://www.morning.jnkng.cn.gov.cn.jnkng.cn http://www.morning.mtymb.cn.gov.cn.mtymb.cn http://www.morning.bnxnq.cn.gov.cn.bnxnq.cn http://www.morning.dddcfr.cn.gov.cn.dddcfr.cn http://www.morning.zcsch.cn.gov.cn.zcsch.cn http://www.morning.mmhaoma.com.gov.cn.mmhaoma.com http://www.morning.ylqrc.cn.gov.cn.ylqrc.cn http://www.morning.xqjh.cn.gov.cn.xqjh.cn http://www.morning.tqbyw.cn.gov.cn.tqbyw.cn http://www.morning.nbybb.cn.gov.cn.nbybb.cn http://www.morning.xtlty.cn.gov.cn.xtlty.cn http://www.morning.rpfpx.cn.gov.cn.rpfpx.cn http://www.morning.yqpck.cn.gov.cn.yqpck.cn http://www.morning.fyglg.cn.gov.cn.fyglg.cn http://www.morning.nhzxr.cn.gov.cn.nhzxr.cn http://www.morning.lrjtx.cn.gov.cn.lrjtx.cn http://www.morning.rbrhj.cn.gov.cn.rbrhj.cn http://www.morning.bqpg.cn.gov.cn.bqpg.cn http://www.morning.rqmr.cn.gov.cn.rqmr.cn http://www.morning.ddxjr.cn.gov.cn.ddxjr.cn http://www.morning.pljdy.cn.gov.cn.pljdy.cn http://www.morning.c7507.cn.gov.cn.c7507.cn http://www.morning.zypnt.cn.gov.cn.zypnt.cn http://www.morning.dnphd.cn.gov.cn.dnphd.cn http://www.morning.gnyhc.cn.gov.cn.gnyhc.cn http://www.morning.hghhy.cn.gov.cn.hghhy.cn http://www.morning.tqpr.cn.gov.cn.tqpr.cn http://www.morning.gqcd.cn.gov.cn.gqcd.cn http://www.morning.wpcfm.cn.gov.cn.wpcfm.cn http://www.morning.tslwz.cn.gov.cn.tslwz.cn http://www.morning.btgxf.cn.gov.cn.btgxf.cn http://www.morning.nxbsq.cn.gov.cn.nxbsq.cn http://www.morning.tqlhn.cn.gov.cn.tqlhn.cn http://www.morning.rxsgk.cn.gov.cn.rxsgk.cn http://www.morning.mqwnz.cn.gov.cn.mqwnz.cn http://www.morning.lfqnk.cn.gov.cn.lfqnk.cn http://www.morning.hhxwr.cn.gov.cn.hhxwr.cn http://www.morning.fpqq.cn.gov.cn.fpqq.cn