1:設置配置文件 PromotionAppAdjList.ini
2:讀取配置文件放數組
private ArrayList<String> mPromotionAppAdjList = new ArrayList<String>();
private String PROMOTION_APP_ADJ_LIST = "/nwdappconfig/app/PromotionAppAdjList.ini";
private void parsePromotionAppAdjList() {
InputStream is = null;
try {
is = new FileInputStream(PROMOTION_APP_ADJ_LIST);
} catch (FileNotFoundException e) {
Log.w(TAG, "Couldn't find " + PROMOTION_APP_ADJ_LIST);
return;
}
try {
BufferedReader br = new BufferedReader(
new InputStreamReader(is), 256);
String line;
while ((line = br.readLine()) != null) {
line = line.trim();
if (line.startsWith("#") || line.equals("")) {
continue;
}