can you help me. i have an error in my code with a boolean isFromMockProvider() on a null object reference. this problem occurs when the gps on my provider is slow can you guys help me with dealing with the error
here is my code:
GetLocation getLocation = new GetLocation(getApplicationContext());
Location location = getLocation.getLocation();
boolean isMockLocation = location.isFromMockProvider();
if (isMockLocation==true){
showDialog();
}
else {
tesmock.setText("No Use Mock ");
}