diff --git a/DataExtractionOSM/src/com/osmand/ToDoConstants.java b/DataExtractionOSM/src/com/osmand/ToDoConstants.java index 536d7093fd..39bf8be7a5 100644 --- a/DataExtractionOSM/src/com/osmand/ToDoConstants.java +++ b/DataExtractionOSM/src/com/osmand/ToDoConstants.java @@ -23,10 +23,6 @@ public class ToDoConstants { // TODO ANDROID -// 34. Suppport navigation for calculated route (example of get route from internet is in swing app). -// DONE : MiniMap done, Routing settings done, RouteLayer done, RoutingHelper done. -// TODO : Test again? - // 42. Revise UI (icons/layouts). Support different devices. Add inactive/focus(!) icon versions. // Some icons are not fine (as back menu from map - it is blured). @@ -43,16 +39,17 @@ public class ToDoConstants { // FUTURE RELEASES // 49. Calculate route from specified point (not from your location only) - // 48. Enable change favourite point (for example fav - "car") means last point you left car. It is not static point. - // 43. Enable poi filter by name (?) - // 44. Show gps status (possibly open existing gps-compass app (free) or suggest to install it - no sense to write own activity) + // 48. Enable change favorite point : (for example fav - "car") means last point you left car. It is not static point, + // you can always use the same name for different locations. + // 50. Invent opening hours editor in order to edit POI hours better on device + // 48. Implement console application that prepare indexes to upload on server... + // 0) run in background 1) download from internet 2) generates indices for Europe (take care about memory) 3) upload? + // 43. Enable poi filter by name // 45. Get clear settings. Move that setting on top settings screen. // That setting should rule all activities that use internet. It should ask whenever internet is used // (would you like to use internet for that operation - if using internet is not checked). // Internet using now for : edit POI osm, show osm bugs layer, download tiles. // 47. Internet connectivity could be checked before trying to use - // 48. Implement console application that prepare indexes to upload on server... - // 0) run in background 1) download from internet 2) generates indices for Europe (take care about memory) 3) upload? // 46. Implement downloading strategy for tiles (do not load 17 zoom, load only 16 for example) - try to scale 15 zoom for 17 (?) // 40. Support simple vector road rendering (require new index file) (?) // 26. Show the whole street on map (when it is chosen in search activity). Possibly extend that story to show layer with streets. (?) @@ -64,10 +61,10 @@ public class ToDoConstants { // TODO swing - // 1. Download tiles without using dir tiles (?) // 9. Fix issues with big files (such as netherlands) - save memory (!) - very slow due to transport index ! // Current result : for big file (1 - task 60-80% time, 90% memory) - // 10. Improve address indexing (use relations). + // 1. Download tiles without using dir tiles (?) + // 10. Improve address indexing (use relations). // use relation "a6" (to accumulate streets!), "a3" to read all cities & define boundaries for city (& define that street in city). // BUGS Swing @@ -76,6 +73,9 @@ public class ToDoConstants { // 37. Get rid of exit button (!). Think about when notification should go & how clear resources if it is necessary // DONE : add to app settings preference (Refresh indexes). // 31. Translation. + // 34. Suppport navigation for calculated route (example of get route from internet is in swing app). + // DONE : MiniMap done, Routing settings done, RouteLayer done, RoutingHelper done. + // 44. Show gps status (possibly open existing gps-compass app (free) or suggest to install it - no sense to write own activity) // DONE SWING diff --git a/OsmAnd/res/menu/map_menu.xml b/OsmAnd/res/menu/map_menu.xml index a9da0836f1..ff8fb5e946 100644 --- a/OsmAnd/res/menu/map_menu.xml +++ b/OsmAnd/res/menu/map_menu.xml @@ -3,6 +3,7 @@ xmlns:android="http://schemas.android.com/apk/res/android"> + diff --git a/OsmAnd/res/values-ru-rRU/strings.xml b/OsmAnd/res/values-ru-rRU/strings.xml index 09b1e82088..2d1c9587ee 100644 --- a/OsmAnd/res/values-ru-rRU/strings.xml +++ b/OsmAnd/res/values-ru-rRU/strings.xml @@ -1,6 +1,8 @@ -Рабочие часы: + Приложение Gps status не найдено + GPS статус + Рабочие часы: Открытие пакета правок Закрытие пакета правок Сохранения объекта diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index c84bfcce71..9577b7dd90 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -1,5 +1,7 @@ + Gps status app could not be found + Show gps status Opening hours : Openging changeset Closing changeset diff --git a/OsmAnd/src/com/osmand/activities/MapActivity.java b/OsmAnd/src/com/osmand/activities/MapActivity.java index 7f9ce963fa..3da92d9e67 100644 --- a/OsmAnd/src/com/osmand/activities/MapActivity.java +++ b/OsmAnd/src/com/osmand/activities/MapActivity.java @@ -8,9 +8,12 @@ import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.app.AlertDialog.Builder; +import android.content.ComponentName; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; +import android.content.pm.PackageManager; +import android.content.pm.ResolveInfo; import android.content.res.Resources; import android.graphics.PointF; import android.hardware.Sensor; @@ -59,7 +62,10 @@ import com.osmand.views.PointNavigationLayer; import com.osmand.views.RouteLayer; public class MapActivity extends Activity implements LocationListener, IMapLocationListener, SensorEventListener { - + + private static final String GPS_STATUS_ACTIVITY = "com.eclipsim.gpsstatus2.GPSStatus"; //$NON-NLS-1$ + private static final String GPS_STATUS_COMPONENT = "com.eclipsim.gpsstatus2"; //$NON-NLS-1$ +// private static final String GPS_STATUS_ACTIVITY = "com.eclipsim.gpsstatus2"; //$NON-NLS-1$ /** Called when the activity is first created. */ private OsmandMapTileView mapView; @@ -540,6 +546,16 @@ public class MapActivity extends Activity implements LocationListener, IMapLocat final Intent settings = new Intent(MapActivity.this, SettingsActivity.class); startActivity(settings); return true; + } else if (item.getItemId() == R.id.map_show_gps_status) { + Intent intent = new Intent(); + intent.setComponent(new ComponentName(GPS_STATUS_COMPONENT, GPS_STATUS_ACTIVITY)); + ResolveInfo resolved = getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY); + if(resolved != null){ + startActivity(intent); + } else { + Toast.makeText(this, getString(R.string.gps_status_app_not_found), Toast.LENGTH_LONG).show(); + } + return true; } else if (item.getItemId() == R.id.map_mark_point) { contextMenuPoint(mapView.getLatitude(), mapView.getLongitude(), true); return true;