Commit 49ff9960 by Lee Jaebin

GPSテストビルド

parent 6061912e
...@@ -13,6 +13,7 @@ import android.location.LocationManager; ...@@ -13,6 +13,7 @@ import android.location.LocationManager;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.provider.Settings;
import android.view.View; import android.view.View;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.Button; import android.widget.Button;
...@@ -215,6 +216,18 @@ public class PairingSettingActivity extends ABVUIActivity { ...@@ -215,6 +216,18 @@ public class PairingSettingActivity extends ABVUIActivity {
Logger.i("-------------------lm : " + (lm != null ? "is not null" : "is null")); Logger.i("-------------------lm : " + (lm != null ? "is not null" : "is null"));
Logger.i("-------------------gpsEnabled : " + gpsEnabled); Logger.i("-------------------gpsEnabled : " + gpsEnabled);
Logger.i("-------------------network : " + network); Logger.i("-------------------network : " + network);
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) { if (!gpsEnabled) {
showSimpleAlertDialog(R.string.set_pairing_central_thermometer, R.string.msg_location_device_no_allow); showSimpleAlertDialog(R.string.set_pairing_central_thermometer, R.string.msg_location_device_no_allow);
......
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