first of all: Thank you very much for your lessions and the effort you put into this. Much appreceated!
I found an issue in you runtime permissions writeup. In the onRequestPermissionsResult callback you are just checking if permissions are denied and if not initApp() is called. This bypasses the logic that the initApp() should only be called if permissions are granted. I have solved this by changing it to the following:
int deniedCount = 0;
int grantedCount = 0;
// Gather permission grant results
for (int i=0; i<grantResults.length; i++)
{
// Add only permissions which are denied
if (grantResults[i] == PackageManager.PERMISSION_DENIED)
{
permissionResults.put(permissions[i], grantResults[i]);
deniedCount++;
}
if (grantResults[i] == PackageManager.PERMISSION_GRANTED)
{
permissionResults.put(permissions[i], grantResults[i]);
grantedCount++;
}
}
// Check if all permissions are granted
if (deniedCount == 0 && grantedCount != 0)