The toast that says not reachable is not showing up, but all the above are showing up, why does my code stop execution on that line?
if (msg_from.equals(MainActivity.PHONENUMBER)){
                    if (msgBody.startsWith("Your")){
                        //have seen this toast
                        Toast.makeText(context, "Yes!!", Toast.LENGTH_SHORT).show();
                         //have seen this toast
                        LocationManager imLoca = SysService.locationMan;
                        Toast.makeText(context, "Yes 2!!", Toast.LENGTH_SHORT).show();
                        //have seen 
                        boolean gpsEnabled  = imLoca.isProviderEnabled(LocationManager.GPS_PROVIDER);
                        Toast.makeText(context, "not reachable", Toast.LENGTH_SHORT).show();
                        //but this does not show up,  and any thing after this line is not working;    
                        boolean netOn = imLoca.isProviderEnabled(LocationManager.NETWORK_PROVIDER);
                        if (gpsEnabled){
                        //do some thing
                        }
                        else if (netOn){
                        //do some thing
                        }
                        else{
                            Toast.makeText(context, "Failing", Toast.LENGTH_SHORT).show();
                        }
                    }
                }
 
     
    