プログラムで Android GPS でデバイスが間違った方向に進んでいることを通知する方法。パスをデフォルトに設定しています。次のようにパスを設定しました:
final Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse("http://maps.google.com/maps?" + "saddr="+ 12.756742 + "," + 76.67523465 + "&daddr=" + 12.64345213 + "," + 76.875432));
intent.setClassName("com.google.android.apps.maps","com.google.android.maps.MapsActivity");
startActivity(intent);`
あるポイントから別のポイントに移動する間、デバイスはそのパスにのみ移動する必要があります。ユーザーがそのパスから外れると (右または左に向かって + または - 100 メートル)、ユーザーに通知する必要があります。
前もって感謝します。