I am stuck in a small problem. I have text retrieved from the permission window.
Now I found out a way to retrieve the app name . This is how I did it:
private String Namer(String parse){
if(parse.length() > 30) {
parse = parse.substring(parse.indexOf("********") + 6, parse.length());
parse = parse.substring(0, parse.indexOf("*******"));
return parse;
} else {
return parse;
}
}
and this is how i use it:
List<AccessibilityNodeInfo> NodeInfo;
AccessibilityNodeInfo nodeInfo = event.getSource();
for (Map.Entry<OriginalPermissions, String> permissions :
detect.entrySet()) {
NodeInfo = nodeInfo.findAccessibilityNodeInfosByText(permissions.getValue());
Log.d("Information", Namer(Namer(String.valueOf(NodeInfo))));
}
But the problem is that the permission window text can be different. Is there any way in which I could just retrieve the bold text from the permission window?
Thanks