set Gps Status via Intent - Android Phone

Android examples for Phone:GPS

Description

set Gps Status via Intent

Demo Code


//package com.java2s;
import android.app.Activity;

import android.content.Intent;

import android.provider.Settings;

public class Main {

    public static void setGpsStatu(Activity caller) {
        Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
        caller.startActivityForResult(intent, 0);
    }/*from   w  w  w. j a v a2  s .c om*/
}

Related Tutorials