問題タブ [location-client]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
1492 参照

android - LocationServices からの getTriggeringGeofences および getGeofenceTransition

LocationClient クラスが現在廃止されていることに気付きました。旅行アプリで使っていました。LocationClient の代わりに LocationServices を使用するようにロジックを変更しました: https://developer.android.com/reference/com/google/android/gms/location/LocationServices.html

問題は、LocationServices.Geofence または GoogleApiClient から getTriggeringGeofences と getGeofenceTransition を取得できないことです。それ、どうやったら出来るの?

これは私の古い BroadcastReceiver のコードです。

0 投票する
2 に答える
5031 参照

android - PRIORITY_LOW_POWER vs PRIORITY_HIGH_ACCURACY

I have used the GoogleApiClient to get the location information. My requirement is to find the accurate location information.

In the location request I have set the priority as PRIORITY_HIGH_ACCURACY, then when I was in in door am not getting any location update when I was indoor. I need the location object needs to be returned it may be last known location.

And also I have tried PRIORITY_LOW_POWER. But it never uses the GPS to get the location information.I think using this may be bit of inaccurate.

I need the better location information when outside by using GPS and also the last known location information to be returned when I was indoor. So which priority is suitable for me?

And also always am getting the Altitude and Bearing as 0. Always am getting the fused provider. I think GoogleApiClient does not provide the provider detail which gives the location information.

Added Clarification:

I have the below implementation:

In my case how can I get the last known location information from the API.

Please help me on this.

0 投票する
3 に答える
12798 参照

android - コンピュータをフォーマットした後、インポート com.google.android.gms.location.LocationClient を解決できません

コンピューターをフォーマットし、Google Maps API V2 を使用して行った Android プロジェクトを再度インポートしたところ、多くのエラーが見つかりました。google_play_services_lib と android-support-v7-appcompat を再リンクしました。 android.gms.location.LocationClient.「LocationClient」の呼び出しのみがエラーになり、他のものは正常にインポートされます。

R.callingを使用したすべての場所でエラーを見つけます。エラー : R を変数に解決できません

setContentView(R.layout.activity_main); EditText et = (EditText) findViewById(R.id.editText1);

コンソールに次のエラーが表示されます。

0 投票する
2 に答える
752 参照

android - Android LocationClient を GoogleApiClient に置き換える必要がありますか?

Android SDK を更新するという悪い動きをしたため、アプリがすべて詰まってしまいました。Android Studio でコードにエラーが表示されませんが、コンパイルすると、「シンボル クラス LocationClient が見つかりません」というビルド エラーがいくつか発生します。

これについていくつかのスレッドを読みましたが、それらは LocationClient の代わりに GoogleApiClient を使用するという考えを示しているようです。今この変更を行う必要がないことを本当に望んでいます。これを解決する他の方法はありますか?

0 投票する
0 に答える
815 参照

android - GCM の信頼性の低さに代わるもの

Androidデバイスを使用してGPS車両追跡システムを開発しようとしています。基本的に、Android デバイスは車両のバッテリーに接続され、インターネットは常にオンになっています。ユーザーは、GCM を起動してデバイスをウェイクアップし、場所を送り返す Web ベースのコントロール パネルを使用して自分の車両を追跡できます。さて、ここに私の質問があります。

  1. GCM は信頼できません。どんな状況でも位置情報の取得に失敗したくありません。GCM がデバイスに到達できなくても、特定の時間間隔の後にサーバーからのポーリング リクエスト以外の方法はありますか?
  2. LocationManager と LocationClient と LocationClient の 2 つの方法があるため、PlayService がインストールされている必要があります。playService が自動的に更新され、使用しているメソッドの一部が非推奨になった場合 (LocationClient が非推奨になり、GoogleApiClient が存在するなど)、デバイスが動作しなくなりますか?
  3. デバイスをインストールする前に注意する必要があるその他のことは、デバイスが車両にインストールされると、アプリを更新する人がいないため、間違いを修正する機会がないためです。更新が利用可能になったときにアプリを自動的に更新する方法はありますか? また、アプリが更新されると、以前の GCM Register Id に影響しますか?

ありがとう。

0 投票する
2 に答える
2509 参照

android - AndroidスタジオはシンボルLocationClientを復元できません

私は AndroidStudio を使用しており、ジオコードに googleplayservices を使用しようとしています。

私はアンドロイドチュートリアルに従いました: http://developer.android.com/google/play-services/setup.html

しかし、私のインポートでは下線が引かれています: import android.location. LocationClient ; つまり: シンボル Location Client を解決できません

何か案は?

私のコードは次のようになります:

build.grandle

そして最後に私のxmlマニフェスト: