0

I want to write an application that runs in the background and gives more accurate GPS location when not available, it something like this possible?

I understand that the GPS location can be over written in developer mode but i want the application to be for everybody, not just people who know how to activate developer mode and what to do with it.

Binyamin
  • 440
  • 1
  • 6
  • 12

1 Answers1

0
   LocationManager alm=(LocationManager) this.getSystemService(Context.LOCATION_SERVICE);
    if(alm.isProviderEnabled(LocationManager.GPS_PROVIDER)){
        Toast.makeText(this, "GPS is available", Toast.LENGTH_SHORT).show();

    }else{

      Toast.makeText(this, "please open the GPS ", Toast.LENGTH_SHORT).show();
      Intent intent=new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
      startActivityForResult(intent, 0);
    }
Tong
  • 1