Guest User

Untitled

a guest
Jun 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public class LocationUtils {
  2.  
  3. public static boolean isGPSProvider(Context context) {
  4. LocationManager lm = (LocationManager)context.getSystemService(Context.LOCATION_SERVICE);
  5. return lm.isProviderEnabled(LocationManager.GPS_PROVIDER);
  6. }
  7.  
  8. public static boolean isNetowrkProvider(Context context) {
  9. LocationManager lm = (LocationManager)context.getSystemService(Context.LOCATION_SERVICE);
  10. return lm.isProviderEnabled(LocationManager.NETWORK_PROVIDER);
  11. }
  12.  
  13. }
  14.  
  15. introducir el código aquí
Add Comment
Please, Sign In to add comment