隐私政策是如何完成的?

时间:2014-11-14 19:28:23

标签: android string hyperlink

我很好奇如果在移动应用中本地显示隐私政策的正确方法?我可以创建一个字符串常量,但是,似乎更容易添加为文本文件然后从文本文件中读取。这是我想要做的,但是,应该超链接的文本不会被超链接。

private String readFromFile() {

    String ret = "";

    try {
        InputStream inputStream = openFileInput("config.txt");

        if ( inputStream != null ) {
            InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
            BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
            String receiveString = "";
            StringBuilder stringBuilder = new StringBuilder();

            while ( (receiveString = bufferedReader.readLine()) != null ) {
                stringBuilder.append(receiveString);
            }

            inputStream.close();
            ret = stringBuilder.toString();
        }
    }
    catch (FileNotFoundException e) {
        Log.e("login activity", "File not found: " + e.toString());
    } catch (IOException e) {
        Log.e("login activity", "Can not read file: " + e.toString());
    }

    return ret;
}

那么大家怎么做呢?

1 个答案:

答案 0 :(得分:1)

好吧,如果您计划更改策略,则需要将其从数据库中删除。