Android (lolipop)で位置情報を取得するアプリを開発しています。
LOCATION_PROVIDERS_ALLOWEDから利用できるプロバイダを取得しようとしたところ、this inspection reports where deprecated code is used in the specified inspection scope とメッセージと、取り消し線が表示されます。
これはどのような事象でどのように対応すればよいのでしょうか?
お分かりになるかた教えてください。
public class MainActivity extends Activity implements LocationListener { public LocationManager mLocationManager; /** 利用できる現在地プロバイダの数 */ private int providerNum = 0; @TargetApi(Build.VERSION_CODES.M) @Override public void onResume() { super.onResume(); //LOCATION_PROVIDERS_ALLOWEDに取り消し線が表示される。以下のメッセージが表示される //this inspection reports where deprecated code is used in the specified inspection scope String gpsStatus = android.provider.Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED); }
よろしくお願いします!!
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。