diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index df5cbc471d..a61623b6f7 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -9,6 +9,7 @@ 3. All your modified/created strings are in the top of the file (to make easier find what\'s translated). PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy --> + Announce pedestrian crosswalks Road style Default Orange diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index c9b2ba22d3..2b06c514ce 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -824,6 +824,7 @@ public class OsmandSettings { SHOW_LANES.setModeDefaultValue(ApplicationMode.DEFAULT, false); } public final OsmandPreference SPEAK_TRAFFIC_WARNINGS = new BooleanPreference("speak_traffic_warnings", true).makeProfile().cache(); + public final OsmandPreference SPEAK_PEDESTRIAN = new BooleanPreference("speak_pedestrian", true).makeProfile().cache(); public final OsmandPreference SPEAK_STREET_NAMES = new BooleanPreference("speak_street_names", true).makeProfile().cache(); public final OsmandPreference SPEAK_SPEED_CAMERA = new BooleanPreference("speak_cameras", true).makeProfile().cache(); public final OsmandPreference SPEAK_SPEED_LIMIT = new BooleanPreference("speak_speed_limit", true).makeProfile().cache(); diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java index 8b8c2aff2b..4925b1858b 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsNavigationActivity.java @@ -333,12 +333,14 @@ public class SettingsNavigationActivity extends SettingsBaseActivity { settings.SHOW_PEDESTRIAN, settings.SHOW_CAMERAS, settings.SHOW_LANES }, preference.getTitle()); return true; } else if (preference == speakAlarms) { - showBooleanSettings(new String[] { getString(R.string.speak_street_names), getString(R.string.speak_traffic_warnings), + showBooleanSettings(new String[] { getString(R.string.speak_street_names), getString(R.string.speak_traffic_warnings), + getString(R.string.speak_pedestrian), getString(R.string.speak_speed_limit), getString(R.string.speak_cameras), getString(R.string.announce_gpx_waypoints), getString(R.string.speak_favorites), getString(R.string.speak_poi)}, - new OsmandPreference[] { settings.SPEAK_STREET_NAMES, settings.SPEAK_TRAFFIC_WARNINGS, + new OsmandPreference[] { settings.SPEAK_STREET_NAMES, settings.SPEAK_TRAFFIC_WARNINGS, + settings.SPEAK_PEDESTRIAN, settings.SPEAK_SPEED_LIMIT, settings.SPEAK_SPEED_CAMERA, settings.ANNOUNCE_WPT, settings.ANNOUNCE_NEARBY_FAVORITES, settings.ANNOUNCE_NEARBY_POI}, preference.getTitle()); return true; diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java index 04bc676b44..bf51a112af 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java @@ -199,6 +199,8 @@ public class WaypointHelper { if(type == ALARMS) { app.getSettings().SHOW_TRAFFIC_WARNINGS.set(enable); app.getSettings().SPEAK_TRAFFIC_WARNINGS.set(enable); + app.getSettings().SHOW_PEDESTRIAN.set(enable); + app.getSettings().SPEAK_PEDESTRIAN.set(enable); } else if(type == POI) { app.getSettings().SHOW_NEARBY_POI.set(enable); app.getSettings().ANNOUNCE_NEARBY_POI.set(enable); diff --git a/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java b/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java index fd6f05b5b0..5f71dc142b 100644 --- a/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java +++ b/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java @@ -338,6 +338,14 @@ public class VoiceRouter { p.attention(type+"").play(); } } + } else if (type == AlarmInfoType.PEDESTRIAN) { + if (router.getSettings().SPEAK_PEDESTRIAN.get()) { + CommandBuilder p = getNewCommandPlayerToPlay(); + if (p != null) { + notifyOnVoiceMessage(); + p.attention(type+"").play(); + } + } } else { if (router.getSettings().SPEAK_TRAFFIC_WARNINGS.get()) { CommandBuilder p = getNewCommandPlayerToPlay();