I know my question is worded somewhat confusingly, but...
My app is using an instant messaging SDK called Applozic. In order to hide/add certain features into the UI, there is an applozic-settings.json file which can be edited.
For example: "hideGroupExitButton": true
My app has two types of users: senders and receivers. Senders have some capabilities that receivers do not... so I need to change some of these values depending on the user type.
SO: is it possible to programmatically change some of these values based on user type?
(applozic-settings.json is only used in FileUtils.java-- which is a LOCKED file...)
Or, do I need to create a new json file for one of the user types, and somehow change FileUtils.java to use the proper file?
This is the relevant code in FileUtils.java:
public static String loadSettingsJsonFile(Context context) {
BufferedReader br = null;
StringBuffer sb = new StringBuffer();
try {
br = new BufferedReader(new InputStreamReader(context.getAssets().open(
"applozic-settings.json"), "UTF-8"));
String line;
if (br != null) {
while ((line = br.readLine()) != null) {
sb.append(line);
}
}
} catch (IOException ioe) {
return null;
} catch (Exception e) {
} finally {
try {
if (br != null) {
br.close();
}
} catch (IOException e) {
}
}
return sb.toString();
}