Commit 6061912e by Lee Jaebin

GPSテストビルド

parent 40997eca
......@@ -11,6 +11,7 @@ import android.media.AudioManager;
import android.media.MediaPlayer;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.widget.Toast;
import com.nttdocomo.android.sdaiflib.BeaconData;
......@@ -296,7 +297,18 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
if (requestBluetoothFeature(REQUEST_CODE_ENABLEBLUETOOTH_OKUDAKE)) {
LocationManager lm = (LocationManager) this.getSystemService(this.LOCATION_SERVICE);
final boolean gpsEnabled = lm.isProviderEnabled(LocationManager.GPS_PROVIDER);
String gpsStatus = android.provider.Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED);
if (gpsStatus.indexOf("gps", 0) < 0) {
// Toastを表示
Toast.makeText(getApplicationContext(), "GPSは無効です",
Toast.LENGTH_LONG).show();
// GPSが有効だった場合
} else {
// Toastを表示
Toast.makeText(getApplicationContext(), "GPSは有効です",
Toast.LENGTH_LONG).show();
}
//端末側の位置情報許可チェック
if (gpsEnabled) {
ABookPermissionHelper helper = new ABookPermissionHelper(this, Constant.ABookPermissionType.AccessFineLocation, null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment