I tried reading the Android documentation but there doesn't seem to be any information on how to handle cases where getApplicationContext()
returns null.
Should i do a check with a
try{
mContext = application.getApplicationContext()
} catch (NullPointerException e)
}
or should i do a null check
if(application.getApplicationContext() == null)
{
return;
}
Does getApplicationContext throw any Exception or Fatal Exception? Or just returns null?