This commit is contained in:
GaidamakUA 2015-09-28 14:56:40 +03:00
commit f13f84a850
65 changed files with 1601 additions and 814 deletions

View file

@ -66,17 +66,17 @@ public class BinaryInspector {
// test cases show info
if(args.length == 1 && "test".equals(args[0])) {
in.inspector(new String[]{
// "-vpoi",
"-vpoi",
// "-vmap", "-vmapobjects", // "-vmapcoordinates",
// "-vrouting",
"-vaddress", "-vcities",//"-vstreetgroups",
// "-vaddress", "-vcities",//"-vstreetgroups",
// "-vstreets", "-vbuildings", "-vintersections",
// "-zoom=15",
// "-bbox=1.74,51.17,1.75,51.16",
// "-vstats",
// "/Users/victorshcherb/osmand/maps/Synthetic_test_rendering.obf"
"/Users/victorshcherb/osmand/maps/Netherlands_gelderland_europe_2.obf"
// "/Users/victorshcherb/osmand/temp/Czech-republic_jihovychod_europe_2.road.obf"
// "/Users/victorshcherb/osmand/maps/Netherlands_europe_2.road.obf"
"/Users/victorshcherb/osmand/maps/Map.obf"
});
} else {
in.inspector(args);

View file

@ -584,15 +584,16 @@ public class MapPoiTypes {
}
public boolean isTextAdditionalInfo(String key, String value) {
if(key.startsWith("name:") || key.equals("name")) {
if (key.startsWith("name:") || key.equals("name")) {
return true;
}
initPoiTypesByTag();
PoiType pat = poiTypesByTag.get(key+"/"+value);
if(pat == null) {
pat = poiTypesByTag.get(key);
}
if(pat == null) {
PoiType pat = (PoiType) getAnyPoiAdditionalTypeByKey(key);
// initPoiTypesByTag();
// PoiType pat = poiTypesByTag.get(key + "/" + value);
// if (pat == null) {
// pat = poiTypesByTag.get(key);
// }
if (pat == null) {
return true;
} else {
return pat.isText();

View file

@ -35,7 +35,19 @@ public class Algorithms {
public static boolean isEmpty(String s){
return s == null || s.length() == 0;
}
public static boolean stringsEqual(String s1, String s2) {
if (s1 == null && s2 == null) {
return true;
} else if (s1 == null) {
return false;
} else if (s2 == null) {
return false;
} else {
return s2.equals(s1);
}
}
public static long parseLongSilently(String input, long def) {
if(input != null && input.length() > 0) {
try {

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<nine-patch android:src="@drawable/bg_contextmenu_shadow_dark" />
</item>
<item>
<shape>
<solid
android:color="@color/bg_color_dark" />
</shape>
</item>
</layer-list>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<nine-patch android:src="@drawable/bg_contextmenu_shadow_light" />
</item>
<item>
<shape>
<solid
android:color="@color/bg_color_light" />
</shape>
</item>
</layer-list>

View file

@ -0,0 +1,234 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/point_edit_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="fill_parent"
android:layout_height="@dimen/dashboard_map_toolbar"
android:background="@drawable/gradient_toolbar"
android:minHeight="@dimen/dashboard_map_toolbar"
android:theme="?attr/toolbar_theme"
app:contentInsetLeft="72dp"
app:contentInsetStart="72dp">
<ImageButton
android:id="@+id/delete_button"
android:layout_width="?attr/actionBarSize"
android:layout_height="match_parent"
android:layout_gravity="right"
android:background="@android:color/transparent"
android:src="@drawable/ic_action_delete_dark"/>
<Button
android:id="@+id/save_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="right"
android:background="@android:color/transparent"
android:text="@string/shared_string_save"/>
</android.support.v7.widget.Toolbar>
<LinearLayout
android:id="@+id/main_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:clickable="true"
android:orientation="vertical">
<LinearLayout
android:id="@+id/title_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_point_editor_view"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp">
<TextView
android:id="@+id/header_caption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_gravity="center_vertical"
android:text="Point info"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:orientation="horizontal">
<LinearLayout
android:layout_width="42dp"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:id="@+id/name_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:scaleType="center"
android:src="@drawable/ic_action_building_number"/>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/name_caption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:text="@string/favourites_edit_dialog_name"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_list_text_size"/>
<EditText
android:id="@+id/name_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginRight="16dp"
android:layout_marginLeft="8dp"
android:textColor="?android:textColorPrimary"
android:textColorHint="?android:textColorSecondary"
android:inputType="text"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:orientation="horizontal">
<LinearLayout
android:layout_width="42dp"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:id="@+id/category_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:scaleType="center"
android:src="@drawable/ic_action_building_number"/>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/category_caption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginRight="12dp"
android:text="@string/favourites_edit_dialog_name"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_list_text_size"/>
<net.osmand.plus.widgets.AutoCompleteTextViewEx
android:id="@+id/category_edit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginRight="16dp"
android:layout_marginLeft="8dp"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:background="?attr/ctx_menu_info_view_bg"
android:orientation="horizontal">
<LinearLayout
android:layout_width="42dp"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:id="@+id/description_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginStart="12dp"
android:layout_marginTop="10dp"
android:scaleType="center"
android:src="@drawable/ic_action_note_dark"/>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_weight="1"
android:orientation="vertical">
<EditText
android:id="@+id/description_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="16dp"
android:layout_marginLeft="8dp"
android:maxLines="8"
android:layout_gravity="center_vertical"
android:textColor="?android:textColorPrimary"
android:textColorHint="?android:textColorSecondary"
android:inputType="textMultiLine"/>
</LinearLayout>
</LinearLayout>
</FrameLayout>
</LinearLayout>
</FrameLayout>

View file

@ -1459,7 +1459,7 @@
<string name="osmo_mode_on">Спыніць сэсыю OsMo</string>
<string name="osmo_mode_off">Запусьціць сэсыю OSMo</string>
<string name="share_fav_subject">Выбранае адаслана праз OsmAnd</string>
<string name="share_fav_subject">Упадабанае адаслана праз OsmAnd</string>
<string name="use_points_as_intermediates">Разлічыць маршрут паміж кропкамі</string>
<string name="tip_recent_changes_1_8_alpha">Зьмены ў 1.8:
* Разьлік маршруту паміж маршрутнымі пунктамі GPX-сьледу
@ -2080,14 +2080,14 @@
<string name="add_opening_hours">Дадаць гадзіны працы</string>
<string name="poi_dialog_poi_type">Тып POI</string>
<string name="please_specify_poi_type">Калі ласка, пазначце тып POI.</string>
<string name="av_locations_descr">Gpx-файл з мецазнаходжаньнем заўваг</string>
<string name="av_locations_descr">GPX-файл зь мецазнаходжаньнем заўваг</string>
<string name="av_locations">Месцазнаходжаньні</string>
<string name="number_of_rows_in_dash">Колькасьць радкоў на галоўным экране %1$s</string>
<string name="tag_poi_amenity">грамадзкі аб\'ект</string>
<string name="poi_action_delete">выдаліць</string>
<string name="working_days">Працоўныя дні</string>
<string name="recent_places">Нядаўнія месцы</string>
<string name="favourites">Упадабанае</string>
<string name="favourites">Упадабаныя</string>
<string name="saved_at_time">Пасьпяхова захаваны ў: %1$s</string>
<string name="show_gpx">Паказаць GPX</string>
<string name="poi_deleted_localy">POI будуць выдаленыя, як толькі вы загрузіце вашы зьмены</string>
@ -2099,4 +2099,11 @@
<string name="simulate_your_location_stop_descr">Спыніць эмуляцыю свайго становішча</string>
<string name="simulate_your_location_descr">Эмуляваць, выкарыстоўваючы запісаны GPX або разьлічаны маршрут</string>
<string name="downloads_left_template">%1$s сьцягваньняў засталося</string>
</resources>
<string name="shared_string_wikipedia">Вікіпэдыя</string>
<string name="roads">Дарогі</string>
<string name="favourites_edit_dialog_title">Зьвесткі пра ўпадабанае</string>
<string name="favourites_context_menu_add">Дадаць упадабанае</string>
<string name="shared_string_trip_recording">Запіс падарожжа</string>
<string name="shared_string_navigation">Навігацыя</string>
<string name="osmand_running_in_background">Працуе ў фоне</string>
</resources>

File diff suppressed because one or more lines are too long

View file

@ -2137,4 +2137,10 @@
<string name="simulate_your_location_stop_descr">Stop simulering af position</string>
<string name="simulate_your_location_descr">Simuler ved brug af optaget GPX eller beregnet rute</string>
<string name="downloads_left_template">%1$s filhentninger tilbage</string>
</resources>
<string name="roads">Veje</string>
<string name="favourites_edit_dialog_title">Favorit information</string>
<string name="favourites_context_menu_add">Tilføj favorit</string>
<string name="shared_string_trip_recording">Optag ture</string>
<string name="shared_string_navigation">Navigation</string>
<string name="osmand_running_in_background">Kører i baggrunden</string>
</resources>

View file

@ -230,7 +230,7 @@
<string name="poi_lighthouse">Faro</string>
<string name="poi_bicycle_rental">Alquiler de bicicletas</string>
<string name="poi_bicycle_parking">Bicicletero/guardería</string>
<string name="poi_bicycle_parking">Bicicletero / Guardería</string>
<string name="poi_aerialway_station">Estación de transporte elevado</string>
<string name="poi_aerialway_cable_car">Teleférico</string>
@ -391,7 +391,7 @@
<string name="poi_bookmaker">Casa de apuestas</string>
<string name="poi_stadium">Estadio</string>
<string name="poi_sports_centre">Polideportivo</string>
<string name="poi_sports_centre">Centro deportivo</string>
<string name="poi_golf_course">Campo de golf</string>
<string name="poi_ice_rink">Pista de hielo</string>
<string name="poi_pitch">Cancha</string>
@ -434,7 +434,7 @@
<string name="poi_ice_stock">Curling bávaro</string>
<string name="poi_korfbal">Balonkorf</string>
<string name="poi_sport_motor">Deporte de motor</string>
<string name="poi_sport_multi">Multi deportes</string>
<string name="poi_sport_multi">Deportes múltiples</string>
<string name="poi_orienteering">Orientación</string>
<string name="poi_paddle_tennis">Pádel</string>
<string name="poi_paragliding">Parapente</string>
@ -608,7 +608,7 @@
<string name="poi_bench">"Banco (asiento) "</string>
<string name="poi_swimming_pool">Piscina</string>
<string name="poi_water_park">Parque acuático</string>
<string name="poi_park">Parque/Plaza</string>
<string name="poi_park">Parque / Plaza</string>
<string name="poi_recreation_ground">Zona recreativa</string>
<string name="poi_village_green">Zona verde</string>
<string name="poi_trail_riding_station">Estación de equitación</string>
@ -956,14 +956,14 @@
<string name="poi_animal_shelter_dog_cat">Refugio para perros y gatos</string>
<string name="poi_animal_shelter_bird">Refugio para aves</string>
<string name="poi_recycling_centre">Centro de reciclaje</string>
<string name="poi_recycling_container">Contenedor</string>
<string name="poi_recycling_centre">Tipo: Centro de reciclaje</string>
<string name="poi_recycling_container">Tipo: Contenedor</string>
<string name="poi_recycling_glass">Vidrio</string>
<string name="poi_recycling_paper">Papel</string>
<string name="poi_recycling_clothes">Ropa</string>
<string name="poi_recycling_cans">Latas</string>
<string name="poi_recycling_glass_bottles">Botellas de vidrio</string>
<string name="poi_recycling_plastic">Plastico</string>
<string name="poi_recycling_plastic">Plásticos</string>
<string name="poi_recycling_scrap_metal">Chatarra</string>
<string name="poi_recycling_batteries">Baterias</string>
<string name="poi_recycling_plastic_bottles">Botellas de plástico</string>
@ -1315,7 +1315,7 @@
<string name="poi_ford_stepping_stones">Puente de piedras</string>
<string name="poi_information_board">Tablero de información</string>
<string name="poi_toll_hgv_yes">Peaje para camiones</string>
<string name="poi_information_trail_blaze">Marcador del camino</string>
<string name="poi_information_trail_blaze">Marcador en el camino</string>
<string name="poi_rescue_station">Estación de rescate</string>
<string name="poi_doors">Puertas</string>

View file

@ -2035,7 +2035,7 @@
<string name="next_proceed">Siguiente</string>
<string name="opening_at">Abren a las</string>
<string name="closing_at">Cierran a las</string>
<string name="av_locations_descr">Archivo GPX con ubicaciones de la nota</string>
<string name="av_locations_descr">Archivo GPX con notas de ubicaciones</string>
<string name="av_locations">Ubicaciones</string>
<string name="tag_poi_name">nombre</string>
<string name="tag_poi_amenity">servicio</string>
@ -2060,4 +2060,10 @@
<string name="simulate_your_location_stop_descr">Parar simulación de ubicación</string>
<string name="simulate_your_location_descr">Simular usando grabación GPX o ruta calculada</string>
<string name="downloads_left_template">Quedan %1$s descargas</string>
<string name="shared_string_trip_recording">Grabando viaje</string>
<string name="shared_string_navigation">Navegación</string>
<string name="osmand_running_in_background">Ejecutando en segundo plano</string>
<string name="favourites_edit_dialog_title">Información del favorito</string>
<string name="favourites_context_menu_add">Añadir favorito</string>
<string name="roads">Caminos</string>
</resources>

View file

@ -233,7 +233,7 @@
<string name="poi_employment_agency">Oficina de empleo</string>
<string name="poi_studio">Estudio</string>
<string name="poi_stadium">Estadio</string>
<string name="poi_sports_centre">Polideportivo</string>
<string name="poi_sports_centre">Centro deportivo</string>
<string name="poi_golf_course">Campo de golf</string>
<string name="poi_pitch">Cancha</string>
<string name="poi_raceway">Pista de carreras</string>
@ -254,7 +254,7 @@
<string name="poi_golf">Golf</string>
<string name="poi_hockey">Hockey</string>
<string name="poi_horse_racing">Carrera de caballos</string>
<string name="poi_sport_multi">Deporte múltiple</string>
<string name="poi_sport_multi">Deportes múltiples</string>
<string name="poi_sport_motor">Deporte de motor</string>
<string name="poi_rugby_league">Liga de rugby</string>
<string name="poi_skateboard">Patineta</string>
@ -966,7 +966,7 @@
<string name="poi_recycling_clothes">Ropa</string>
<string name="poi_recycling_cans">Latas</string>
<string name="poi_recycling_glass_bottles">Botellas de vidrio</string>
<string name="poi_recycling_plastic">Plastico</string>
<string name="poi_recycling_plastic">Plásticos</string>
<string name="poi_recycling_scrap_metal">Chatarra</string>
<string name="poi_recycling_batteries">Baterias</string>
<string name="poi_recycling_plastic_bottles">Botellas de plástico</string>

View file

@ -892,4 +892,6 @@
<string name="read_full_article">Lue koko artikkeli (online)</string>
<string name="shared_string_wikipedia">Wikipedia</string>
<string name="shared_string_show_details">Näytä tiedot</string>
<string name="layer_amenity_label">POI-nimet</string>
<string name="context_menu_item_directions_to">Navigoi kohteeseen</string>
</resources>

View file

@ -921,7 +921,7 @@
<string name="poi_access_private">Propriété privée</string>
<string name="poi_access_no">Accès interdit</string>
<string name="poi_access_permissive">Accès autorisé</string>
<string name="poi_access_customers">Accès réservé aux clients</string>
<string name="poi_access_customers">Accès client</string>
<string name="poi_access_delivery">Accès réservé aux livraisons</string>
<string name="poi_recycling_glass">Verre</string>
<string name="poi_recycling_paper">Papier</string>
@ -1021,7 +1021,7 @@
<string name="poi_recycling_fridge_and_freezer">Réfrigérateur et congélateur</string>
<string name="poi_twitter">Twitter</string>
<string name="poi_skype">Skype</string>
<string name="poi_youtube">Youtube</string>
<string name="poi_youtube">YouTube</string>
<string name="poi_instagram">Instagram</string>
<string name="poi_google_plus">Google+</string>
<string name="poi_mobile">Mobile</string>
@ -1040,4 +1040,164 @@
<string name="poi_office_religion">Lieu de culte</string>
<string name="poi_association">Bureau d\'association</string>
<string name="poi_financial">Bureau financier</string>
<string name="poi_tax_advisor">Bureau de perception</string>
<string name="poi_religion_voodoo">Vaudou</string>
<string name="poi_religion_spiritualist">Spiritualisme</string>
<string name="poi_religion_scientologist">Scientologie</string>
<string name="poi_religion_pagan">Paganisme</string>
<string name="poi_denomination_catholic">Catholique</string>
<string name="poi_denomination_roman_catholic">Catholique romain</string>
<string name="poi_denomination_orthodox">Orthodoxe</string>
<string name="poi_denomination_lutheran">Luthérien</string>
<string name="poi_denomination_protestant">Protestant</string>
<string name="poi_denomination_anglican">Anglican</string>
<string name="poi_denomination_evangelical">Évangéliste</string>
<string name="poi_denomination_russian_orthodox">Orthodoxe russe</string>
<string name="poi_denomination_pentecostal">Pentecôtiste</string>
<string name="poi_denomination_mormon">Mormon</string>
<string name="poi_denomination_jehovahs_witness">Témoins de Jéhovah</string>
<string name="poi_denomination_greek_orthodox">Orthodoxe grecque</string>
<string name="poi_denomination_reformed">Réformé</string>
<string name="poi_denomination_seventh_day_adventist">Adventiste du septième jour</string>
<string name="poi_denomination_new_apostolic">Nouveau apostolique</string>
<string name="poi_denomination_church_of_england">Église dAngleterre</string>
<string name="poi_denomination_episcopal">Épiscopal</string>
<string name="poi_denomination_united">Uni</string>
<string name="poi_denomination_greek_catholic">Catholique grecque</string>
<string name="poi_denomination_tibetan">Tibétain</string>
<string name="poi_denomination_church_of_scotland">Église dÉcosse</string>
<string name="poi_denomination_salvation_army">Armée du Salut</string>
<string name="poi_denomination_quaker">Quaker</string>
<string name="poi_denomination_bulgarian_orthodox">Orthodoxe bulgare</string>
<string name="poi_denomination_adventist">Adventiste</string>
<string name="poi_denomination_nazarene">Nazaréen</string>
<string name="poi_denomination_serbian_orthodox">Orthodoxe serbe</string>
<string name="poi_denomination_armenian_apostolic">Apostolique arménien</string>
<string name="poi_denomination_apostolic">Apostolique</string>
<string name="poi_denomination_reform">Réformé</string>
<string name="poi_denomination_latter_day_saints">Saints du dernier jour</string>
<string name="poi_denomination_scientist">Scientiste</string>
<string name="poi_denomination_romanian_orthodox">Orthodoxe roumain</string>
<string name="poi_denomination_maronite">Maronite</string>
<string name="poi_military_office">Bureau militaire</string>
<string name="poi_route_hiking_ref_poi">Légende des chemins de randonnée</string>
<string name="poi_height">Hauteur</string>
<string name="poi_ele">Hauteur au dessus du niveau de la mer</string>
<string name="poi_start_date">Date de début</string>
<string name="poi_wheelchair">Fauteuil roulant</string>
<string name="poi_wheelchair_no">Fauteuil roulant interdit</string>
<string name="poi_wheelchair_limited">Fauteuil roulant partiel</string>
<string name="poi_wholesale">Vente en gros</string>
<string name="poi_content_wine">Contenu : vin</string>
<string name="poi_content_gas">Contenu : gaz</string>
<string name="poi_content_wastewater">Contenu : eaux usées</string>
<string name="poi_content_beer">Contenu : bière</string>
<string name="poi_content_salt">Contenu : sel</string>
<string name="poi_content_grain">Contenu : grain</string>
<string name="poi_nudism_yes">Nudisme autorisé</string>
<string name="poi_nudism_no">Nudisme interdit</string>
<string name="poi_nudism_obligatory">Nudisme obligatoire</string>
<string name="poi_population">Population</string>
<string name="poi_parking_underground">Sous-terrain</string>
<string name="poi_trees_olive">Olivier</string>
<string name="poi_trees_apple">Pommier</string>
<string name="poi_trees_oil">Palmier</string>
<string name="poi_trees_orange">Oranger</string>
<string name="poi_trees_almond">Amandier</string>
<string name="poi_trees_banana">Bananier</string>
<string name="poi_trees_hazel">Noisetier</string>
<string name="poi_trees_coconut">Cocotier</string>
<string name="poi_trees_cherry">Cerisier</string>
<string name="poi_trees_walnut">Noyer</string>
<string name="poi_trees_plum">Prunier</string>
<string name="poi_trees_peach">Pêcher</string>
<string name="poi_trees_tea">Théier</string>
<string name="poi_trees_mango">Manguier</string>
<string name="poi_trees_rubber">Caoutchouc</string>
<string name="poi_trees_date">Dattier</string>
<string name="poi_trees_coffea">Caféier</string>
<string name="poi_urban">Urbain</string>
<string name="poi_rural">Rural</string>
<string name="poi_seats">Bancs</string>
<string name="poi_intermittent">Intermittent</string>
<string name="poi_generator_source_coal">Source d\'énergie : charbon</string>
<string name="poi_generator_source_gas">Source d\'énergie : gaz</string>
<string name="poi_generator_source_nuclear">Source d\'énergie : nucléaire</string>
<string name="poi_generator_source_solar">Source d\'énergie : solaire</string>
<string name="poi_generator_source_hydro">Source d\'énergie : hydraulique</string>
<string name="poi_generator_source_wind">Source d\'énergie : éolien</string>
<string name="poi_generator_source_geothermal">Source d\'énergie : géothermie</string>
<string name="poi_generator_source_oil">Source d\'énergie : pétrole</string>
<string name="poi_generator_source_diesel">Source d\'énergie : diesel</string>
<string name="poi_car_wash_self_service">Self service</string>
<string name="poi_int_name">Nom international</string>
<string name="poi_nat_name">Nom national</string>
<string name="poi_reg_name">Nom régional</string>
<string name="poi_loc_name">Nom local</string>
<string name="poi_old_name">Ancien nom</string>
<string name="poi_alt_name">Autre dénomination</string>
<string name="poi_pump_manual">Pompe manuelle</string>
<string name="poi_pump_no">Sans pompe</string>
<string name="poi_pump">Pompe</string>
<string name="poi_pump_powered">Pompe automatique</string>
<string name="poi_water_point">Point d\'eau</string>
<string name="poi_cuisine">Cuisine</string>
<string name="poi_information_board">Panneau d\'information</string>
<string name="poi_information_map">Carte</string>
<string name="poi_information_office">Office du tourisme</string>
<string name="poi_information_hikingmap">Carte des randonnées</string>
<string name="poi_information_audioguide">Audioguide</string>
<string name="poi_information_bicyclemap">Carte cycliste</string>
<string name="poi_smoking_no">Non fumeur</string>
<string name="poi_smoking_dedicated">Réservé aux fumeurs</string>
<string name="poi_toll_yes">Péage</string>
<string name="poi_toll_no">Gratuit</string>
<string name="poi_rescue_station">Station de sauvetage</string>
<string name="poi_railway_crossing">Passage à niveau</string>
<string name="poi_garden">Jardin</string>
<string name="poi_grass">Pelouse</string>
<string name="poi_sand">Sable</string>
<string name="poi_dead_wood">Bois mort</string>
<string name="poi_piste_difficulty_easy">Piste : facile</string>
<string name="poi_piste_difficulty_intermediate">Piste : intermédiaire</string>
<string name="poi_piste_difficulty_advanced">Piste : difficile</string>
<string name="poi_piste_difficulty_novice">Piste : débutant</string>
<string name="poi_piste_difficulty_expert">Piste : expert</string>
<string name="poi_piste_difficulty_freeride">Piste : freeride</string>
<string name="poi_capacity">Capacité</string>
<string name="poi_aerialway_capacity">Capacité horaire</string>
<string name="poi_aerialway_duration">Durée moyenne du trajet (minutes)</string>
<string name="poi_aerialway_bubble_yes">Fermé</string>
<string name="poi_aerialway_bubble_no">Non fermé</string>
<string name="poi_aerialway_heating_yes">Chauffé</string>
<string name="poi_aerialway_heating_no">Non chauffé</string>
<string name="poi_aerialway_bicycle_yes">Vélos autorisés</string>
<string name="poi_aerialway_bicycle_no">Vélos interdits</string>
<string name="poi_aerialway_bicycle_summer">Vélos autorisés en été seulement</string>
<string name="poi_aerialway_access_entry">Entrée uniquement</string>
<string name="poi_aerialway_access_exit">Sortie uniquement</string>
<string name="poi_aerialway_access_both">Entrée et Sortie</string>
<string name="poi_aerialway_summer_access_entry">Accès d\'été : entrée uniquement</string>
<string name="poi_aerialway_summer_access_exit">Accès d\'été : sortie uniquement</string>
<string name="poi_aerialway_summer_access_both">Accès d\'été : entrée et sortie</string>
<string name="poi_rooms">Chambres</string>
</resources>

View file

@ -369,7 +369,7 @@
<string name="version_index_is_not_supported">La version de l\'\'index \'\'{0}\'\' n\'\'est pas supporté</string>
<string name="use_osmand_routing_service">Navigation hors-ligne OsmAnd &gt;20km</string>
<string name="use_osmand_routing_service_descr">Utiliser la navigation hors-ligne pour les longues distances (expérimental)</string>
<string name="osmand_routing_experimental">La navigation hors-ligne OsmAnd est une fonction expérimentale ne fonctionnant pas pour une distance de plus de 20 km.\n\nLe service utilise alors automatiquement le service en ligne CloudMade.</string>
<string name="osmand_routing_experimental">La navigation hors-ligne OsmAnd est une fonction expérimentale ne fonctionnant pas pour une distance de plus de 20 km.\n\nAu delà la navigation bascule automatiquement sur le service en ligne CloudMade.</string>
<string name="specified_dir_doesnt_exist">Le dossier spécifié est introuvable.</string>
<string name="application_dir">Dossier de stockage</string>
@ -550,7 +550,7 @@
<string name="search_history_street">Rue :\n{0}\n{1}</string>
<string name="search_history_int_streets">Intersection :\n{0} x {1} à {2}</string>
<string name="search_history_building">Bâtiment :\n{0} {1}\n{2}</string>
<string name="favorite">Favori</string>
<string name="favorite">Favoris</string>
<string name="shared_string_clear_all">Supprimer tout</string>
<string name="shared_string_history">Historique</string>
<string name="uploading_data">Envoi des données…</string>
@ -565,7 +565,7 @@
<string name="max_level_download_tile">Niveau de zoom maximum</string>
<string name="max_level_download_tile_descr">Sélectionnez un niveau de zoom maximum pour le téléchargement des cartes (tuiles) en ligne</string>
<string name="route_general_information">Distance totale : %1$s, Durée estimée : %2$d h %3$d m.</string>
<string name="router_service_descr">Sélectionner un service de navigation, hors-ligne ou en ligne</string>
<string name="router_service_descr">Sélectionnez un service de navigation, hors-ligne ou en ligne</string>
<string name="router_service">Service de navigation</string>
<string name="sd_dir_not_accessible">Le dossier contenant les données sur la carte SD est inaccessible !</string>
<string name="download_question">Voulez-vous télécharger {0} - {1} ?</string>
@ -879,7 +879,7 @@
<string name="transport_search_desc">Recherche de transports publics</string>
<string name="favourites_search_desc">Recherche dans les favoris</string>
<string name="route_roundabout">Rond-point : prenez la %1$d sortie puis continuez</string>
<string name="route_roundabout">Rond-point : prenez la sortie %1$d puis continuez</string>
<string name="route_kl">Serrez à gauche et continuez</string>
<string name="route_kr">Serrez à droite et continuez</string>
<string name="rendering_attr_noPolygons_description">Rendre invisibles les surfaces représentant des éléments de terrain</string>
@ -978,15 +978,15 @@
<string name="show_lanes">Afficher les voies de circulation</string>
<string name="avoid_unpaved">Éviter les voies non revêtues</string>
<string name="avoid_ferries">Éviter les ferries</string>
<string name="avoid_in_routing_title">Éviter</string>
<string name="avoid_in_routing_title">Éviter</string>
<string name="avoid_in_routing_descr">Éviter péages, voies non revêtues, ferries, autoroutes</string>
<string name="show_warnings_title">Annonces visuelles</string>
<string name="show_warnings_title">Annonces visuelles</string>
<string name="show_warnings_descr">Afficher les avertissements (limitations de vitesse, stops, ralentisseurs, radars), les voies de circulation</string>
<string name="map_widget_fluorescent">Itinéraires fluorescents</string>
<string name="map_widget_show_ruler">Échelle</string>
<string name="map_widget_view_direction">Orientation</string>
<string name="map_widget_transparent">Habillage transparent</string>
<string name="map_widget_transparent">Gadgets transparents</string>
<string name="gps_wakeup_interval">Intervalle d\'activation du GPS: %s</string>
@ -1322,7 +1322,7 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et
<string name="local_osm_changes_backup">Sauvegarder comme une modification OSM</string>
<string name="delete_point">Supprimer le point de mesure</string>
<string name="plugin_distance_point">Point</string>
<string name="use_distance_measurement_help">* Ajout d\'un point : appui bref sur la carte\n* Suppression d\'un point : appui long sur le point (affiche une bulle d\'information) puis nouvel appui dans la bulle pour Supprimer le point\n* Pour plus d\'actions : appuyez sur le gadget de mesure.</string>
<string name="use_distance_measurement_help">* Ajout d\'un point : appui bref sur la carte\n* Suppression du dernier point : appui long sur la carte\n* Pour plus d\'actions : appuyez sur le gadget de mesure.</string>
<string name="distance_measurement_finish_subtrack">Ajouter une nouvelle mesure</string>
<string name="distance_measurement_clear_route">Supprimer la mesure</string>
<string name="shared_string_downloading">Téléchargement en cours</string>
@ -1360,7 +1360,7 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et
<string name="driving_region_uk">Angleterre, Inde, Australie et autres</string>
<string name="speak_title">Annonces vocales…</string>
<string name="speak_title">Annonces vocale</string>
<string name="speak_cameras">Radars</string>
<string name="speak_traffic_warnings">Alerte de traffic</string>
<string name="osb_author_or_password_not_specified">Merci de spécifier votre nom d\'utilisateur et mot de passe OSM dans les paramètres</string>
@ -1828,7 +1828,7 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et
<string name="rendering_category_details">Détails</string>
<string name="rendering_category_transport">Transports en commun</string>
<string name="rendering_category_others">Autres caractéristiques de la carte</string>
<string name="map_widget_appearance_rem">Éléments restants</string>
<string name="map_widget_appearance_rem">Autres éléments</string>
<string name="map_widget_top">Barre d\'état</string>
<string name="map_widget_right">Panneau de droite</string>
<string name="map_widget_left">Panneau de gauche</string>
@ -1844,7 +1844,7 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et
<string name="rendering_attr_shareTaxiRoutes_name">Voies partagées pour les taxi</string>
<string name="rendering_attr_tramTrainRoutes_name">Lignes de tramway et train</string>
<string name="impassable_road">Évitez les routes</string>
<string name="impassable_road">Évitez les routes</string>
<string name="rendering_category_hide">Masquer</string>
<string name="wake_on_voice">Allumer l\'écran</string>
<string name="wake_on_voice_descr">Allumer l\'écran (si éteint) à l\'approche d\'une bifurcation</string>
@ -1989,7 +1989,7 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et
<string name="shared_string_not_use">Non utilisé</string>
<string name="confirmation_to_clear_history">Souhaitez-vous effacer l\'historique ?</string>
<string name="local_osm_changes_upload_all_confirm">%1$d modification(s) vont être envoyé(s) vers OSM. Confirmez-vous cet envoi ?</string>
<string name="delay_to_start_navigation">Démarrer la navigation après</string>
<string name="delay_to_start_navigation">Démarrer la navigation après</string>
<string name="osmo_grop_name_length_alert">Le nom d\'un groupe doit être de 3 caractères minimum !</string>
<string name="osm_changes_added_to_local_edits">Modifications OSM mémorisées localement</string>
<string name="mark_to_delete">Marquer pour suppression</string>
@ -2153,6 +2153,17 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et
<string name="routing_attr_avoid_shuttle_train_description">Éviter les trains-navettes</string>
<string name="shared_string_card_was_hidden">La carte a été masquée</string>
<string name="routing_attr_avoid_shuttle_train_name">Éviter les trains-navettes</string>
<string name="av_locations_descr">Fichier GPS avec notes</string>
<string name="av_locations_descr">Fichier GPX avec notes</string>
<string name="tag_poi_amenity">aménité</string>
</resources>
<string name="simulate_your_location_stop_descr">Arrêter de simuler votre position</string>
<string name="simulate_your_location_descr">Simuler la position à partir d\'un fichier GPX ou d\'une route</string>
<string name="are_you_sure">Etes-vous certain ?</string>
<string name="unsaved_changes_will_be_lost">Les modifications non enregistrées seront perdues. Souhaitez-vous poursuivre ?</string>
<string name="downloads_left_template">%1$s téléchargement(s) restant(s)</string>
<string name="roads">Routes</string>
<string name="favourites_edit_dialog_title">Propriétés du favori</string>
<string name="favourites_context_menu_add">Ajouter un favori</string>
<string name="shared_string_trip_recording">Enregistrement de l\'itinéraire</string>
<string name="shared_string_navigation">Navigation</string>
<string name="osmand_running_in_background">Exécution en tâche de fond</string>
</resources>

View file

@ -183,7 +183,7 @@
<string name="local_index_no_items_to_do">Nessun oggetto da %1$s</string>
<string name="local_index_action_do">Stai per %1$s %2$s oggetto/i. Continuare?</string>
<string name="local_index_descr_title">Gestisci i file delle mappe</string>
<string name="local_index_mi_restore">Attivare</string>
<string name="local_index_mi_restore">Attiva</string>
<string name="local_index_mi_backup">Disattiva</string>
<string name="local_index_mi_reload">Ricarica dalla scheda SD</string>
@ -1632,7 +1632,7 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
<string name="osmo_show_group_notifications_descr">Mostra un messaggio popup quando l\'utente aderisce o lascia il gruppo</string>
<string name="gpx_file_is_empty">La traccia Gpx è vuota</string>
<string name="gpx_file_is_empty">La traccia GPX è vuota</string>
<string name="gpx_info_start_time">Orario di partenza: %1$tF, %1$tT </string>
<string name="gpx_info_average_speed">Velocità media: %1$s </string>
<string name="gpx_info_maximum_speed">Velocità massima: %1$s </string>
@ -2156,7 +2156,7 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
<string name="next_proceed">Avanti</string>
<string name="opening_at">Apre alle</string>
<string name="closing_at">Chiude alle</string>
<string name="av_locations_descr">File gpx con note locali</string>
<string name="av_locations_descr">File GPX con note locali</string>
<string name="av_locations">Località</string>
<string name="tag_poi_name">Nome</string>
<string name="tag_poi_amenity">amenità</string>
@ -2181,4 +2181,10 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
<string name="simulate_your_location_stop_descr">Arresta la simulazione del percorso</string>
<string name="simulate_your_location_descr">Simula utilizzando un GPX registrato o una percorso calcolato</string>
<string name="downloads_left_template">%1$s download rimanenti</string>
</resources>
<string name="favourites_edit_dialog_title">Informazioni preferite</string>
<string name="favourites_context_menu_add">Aggiungi preferito</string>
<string name="roads">Strade</string>
<string name="shared_string_trip_recording">Registrazione viaggio</string>
<string name="shared_string_navigation">Navigazione</string>
<string name="osmand_running_in_background">Avviato in backgroung</string>
</resources>

View file

@ -599,7 +599,7 @@
<string name="gpx_selection_track">%1$s
\nRasta %2$s</string>
<string name="gpx_file_is_empty">Sa rasta Gpx est boida</string>
<string name="gpx_file_is_empty">Sa rasta GPX est bòida</string>
<string name="shared_string_my_tracks">Totu sas rastas</string>
<string name="shared_string_my_favorites">Prefèrridos meos</string>
@ -1349,7 +1349,7 @@
<string name="shared_string_import">Importa</string>
<string name="shared_string_share">Cumpartzi</string>
<string name="share_fav_subject">Prefèrridos cumpartzidos tramite OsmAnd</string>
<string name="share_fav_subject">Prefèrridos cumpartzidos pro mèdiu de OsmAnd</string>
<string name="error_occurred_loading_gpx">Errore durante su carrigamentu de su documentu GPX</string>
<string name="send_report">Imbia resumu</string>
<string name="any_poi">Totus</string>
@ -2066,7 +2066,7 @@
<string name="next_proceed">Imbeniente</string>
<string name="opening_at">Aberit a sas</string>
<string name="closing_at">Serrat a sas</string>
<string name="av_locations_descr">Documentu gpx cun notas locales</string>
<string name="av_locations_descr">Documentu GPX cun notas locales</string>
<string name="av_locations">Localidades</string>
<string name="tag_poi_name">nùmene</string>
<string name="contact_info">Informatziones de cuntatu</string>
@ -2091,4 +2091,11 @@
<string name="simulate_your_location_stop_descr">Firma sa simulatzione de sa positzione tua</string>
<string name="simulate_your_location_descr">Sìmula impreande unu GPX registradu o unàndala calculada</string>
<string name="downloads_left_template">Abarrant galu %1$s iscarrigamentos</string>
</resources>
<string name="favourites_edit_dialog_title">Informatziones prefèrridas</string>
<string name="shared_string_wikipedia">Wikipedia</string>
<string name="favourites_context_menu_add">Annanghe unu prefèrridu</string>
<string name="roads">Istradas</string>
<string name="shared_string_trip_recording">Registratzione biàgiu</string>
<string name="shared_string_navigation">Nàvigu</string>
<string name="osmand_running_in_background">Funtzionamentu in isfondu</string>
</resources>

View file

@ -1655,7 +1655,7 @@ Afganistan, Albánsko, Alžírsko, Andora, Angola, Anguilla, Antigua a Barbuda,
<string name="osmo_mode_on">Zastaviť reláciu OsMo</string>
<string name="osmo_mode_off">Spustiť reláciu OsMo</string>
<string name="share_fav_subject">Obľúbené zdieľané cez OsmAnd</string>
<string name="share_fav_subject">Obľúbené body zdieľané cez OsmAnd</string>
<string name="tip_recent_changes_1_8_alpha">Zmeny v 1.8:
* Počítanie trasy medzi bodmi v GPX stope
* Zmenené rozmiestnenie krajín na stiahnutie (podporuje vyhľadanie podľa lokálnych názvov)
@ -2292,4 +2292,7 @@ Afganistan, Albánsko, Alžírsko, Andora, Angola, Anguilla, Antigua a Barbuda,
<string name="simulate_your_location_stop_descr">Skončiť simuláciu polohy</string>
<string name="simulate_your_location_descr">Simulovať pomocou zaznamenaného GPX alebo vypočítanej trasy</string>
<string name="downloads_left_template">%1$s sťahovaní zostáva</string>
<string name="favourites_edit_dialog_title">Informácie o obľúbenom bode</string>
<string name="favourites_context_menu_add">Pridať obľúbený bod</string>
<string name="roads">Cesty</string>
</resources>

View file

@ -79,7 +79,7 @@
<string name="email">elektronski naslov</string>
<string name="tip_recent_changes_0_8_4_t">"Spremembe v 0.8.4:
\n\t* Odpravljene so nekatere napake delovanja\n\t* Zemljevid med prekinitvami ne izgubi pridobljenega položaja
\n\t* Med navigacijo je omogočeno izvajanje storitev v pripravljenosti "</string>
\n\t* Med navigacijo omogoči delovanje storitev v ozadju "</string>
<string name="tip_recent_changes_0_8_3_t">"Spremembe v 0.8.3:
\n\t* Vmesne točke
\n\t* Izboljšano vodenje po poti\n\t* Možnost izogibanja avtocestam pri pripravi poti\n\t* Dodana nova vrsta kolesarske poti na zemljevid (Cycleway)
@ -347,8 +347,8 @@
<string name="map_widget_view_direction">Smer gledanja</string>
<string name="map_widget_transparent">Prosojni bočni pult</string>
<string name="use_transparent_map_theme">Prosojna tema</string>
<string name="bg_service_sleep_mode_off">Omogoči\n način spanja</string>
<string name="bg_service_sleep_mode_on">Ustavi\n način spanja</string>
<string name="bg_service_sleep_mode_off">Omogoči\n ozadnji način delovanja</string>
<string name="bg_service_sleep_mode_on">Zaustavi\n ozadnji način delovanja</string>
<string name="gps_wakeup_interval">Interval prebujanja GPS: na %s</string>
<string name="int_continuosly">neprekinjeno delovanje</string>
<string name="screen_is_locked">Za odklepanje zaslona pritisnite ikono ključavnice</string>
@ -408,7 +408,7 @@
\n\t* Izboljšano usmerjanje: hitrejše in natančnejše; do 250 km
\n\t* Možnost prikaza le cest
\n\t* Zemljevid med prekinitvami ne izgubi pridobljenega položaja
\n\t* Med navigacijo je omogočeno izvajanje storitev v pripravljenosti "</string>
\n\t* Med navigacijo omogoči delovanje storitev v ozadju "</string>
<string name="close_changeset">Zapri paket sprememb</string>
<string name="zxing_barcode_scanner_not_found">Program ZXing Barcode Scanner ni nameščen. Ali želite program poiskati?</string>
<string name="rendering_attr_roadColors_description">Izberite barvno shemo cest:</string>
@ -444,7 +444,7 @@
<string name="osmand_development_plugin_description">Vstavek omogoča prikaz nastavitev za razvoj in razhroščevanje programa. Med možnostmi so simuliranje vodenja poti, hitrost izrisovanja zemljevida na zaslonu, glasovni opomniki in podobno. Nastavitve so namenjene razvijalcem programske opreme.</string>
<string name="osmand_accessibility_description">Vstavek omogoča nastavljanje in uporabo možnosti dostopnosti pri uporabi programa OsmAnd. Podpira prilagajanje hitrosti govora med vodenjem, nastavljanje prikaza zaslona in prikaz sledilnika za nadzor pogleda zemljevida. Omogoča tudi glasovno objavljanje mesta.</string>
<string name="osmand_background_plugin_description">Prikaži nastavitve za sledenje in navigacijo v načinu pripravljenosti (izklopljen zaslon) in občasno uporabo GPS.</string>
<string name="osmand_background_plugin_description">Prikaži nastavitve za sledenje in navigacijo v ozadnjem načinu (izklopljen zaslon) in občasno uporabo GPS.</string>
<string name="shared_string_close">Zapri</string>
<string name="opening_hours">Delovni čas</string>
<string name="send_location_way_choose_title">Za objavljanje trenutnega mesta uporabi:</string>
@ -684,8 +684,8 @@
<string name="settings_preset">Privzeti profil</string>
<string name="global_settings">Splošne nastavitve</string>
<string name="index_settings">Upravljalnik datotek zemljevidov</string>
<string name="osmand_service">Način pripravljenosti</string>
<string name="osmand_service_descr">Uporabi za izvajanje OsmAnd, ko je zaslon izklopljen</string>
<string name="osmand_service">Način delovanja v ozadju</string>
<string name="osmand_service_descr">Osmand se zažene v ozadju, ko je zaslon izklopljen</string>
<string name="tip_day_night_mode">Dnevni/Nočni način</string>
<string name="daynight_mode_auto">Glede na sončni vzhod in zahod</string>
@ -886,7 +886,7 @@
<string name="background_service_provider_descr">Izberite ponudnika določevanja mesta med izvajanjem v ozadju</string>
<string name="background_service_provider">Ponudnik mesta</string>
<string name="background_router_service_descr">Izvaja OsmAnd v ozadju in omogoča spremljanje položaja, ko je zaslon izklopljen</string>
<string name="background_router_service">Izvajaj v ozadju</string>
<string name="background_router_service">Zaženi OsmAnd v ozadju</string>
<string name="off_router_service_no_gps_available">Storitev navigacije v ozadju zahteva, da je zagnan vsaj en program, ki zahteva te podatke.</string>
<string name="search_poi_filter">Filter</string>
@ -1215,9 +1215,9 @@
<string name="av_photo_play_sound_descr">Ali naj se med fotografiranjem predvaja zvok</string>
<string name="speak_speed_limit">Najavi omejitve hitrosti</string>
<string name="speak_cameras">Najavi hitrostne kamere</string>
<string name="speak_traffic_warnings">Najavi prometna opozorila</string>
<string name="speak_speed_limit">Omejitve hitrosti</string>
<string name="speak_cameras">Hitrostne kamere</string>
<string name="speak_traffic_warnings">Pometna opozorila</string>
<string name="tip_recent_changes_1_5_t">"Spremembe v 1.5:
\n\t* Glasovna opozorila o omejitvah hitrosti in kamere\n\t* Več možnosti glasovnih pozivov (najavljanje imen ulic)\n\t* Ikone za mape visoke gostote\n\t* Veliko sprememb v uporabniškem vmesniku\n\t* Popravek hroščev pri prikazu razdalj, analizatorju GPX, upravljanju točk, orodju za načrtovanje, nalaganje na OSM, pri uporabi protokola HTTPS in drugo "</string>
<string name="osb_author_or_password_not_specified">V nastavitvah je treba določiti uporabniško ime in geslo za OSM</string>
@ -1233,10 +1233,10 @@
<string name="osb_author_dialog_password">Geslo OSM (neobvezno)</string>
<string name="announce_gpx_waypoints">Najavljanje vmesnih točk GPX</string>
<string name="announce_gpx_waypoints">Vmesne točke GPX</string>
<string name="speak_title">Najavi …</string>
<string name="speak_descr">Nastavitve za najavljanje imen ulic, prometnih opozoril (ležeče ovire in podobno), opozoril merilnikov hitrosti, omejitve hitrosti in drugo</string>
<string name="speak_street_names">Najavi imena ulic (TTS)</string>
<string name="speak_street_names">Imena ulic (TTS)</string>
<string name="map_widget_fps_info">Podatki razhroščevanja FPS</string>
<string name="driving_region_descr">Izbira določil vožnje: ZDA, Evropa, Velika Britanija, Azija in druga</string>
<string name="driving_region">Režim vožnje</string>
@ -1541,9 +1541,9 @@
<string name="no_index_file_to_download">Prejetih datotek ni mogoče najti. Preverite internetno povezavo.</string>
<string name="keep_navigation_service">Obdrži</string>
<string name="stop_navigation_service">Prekini</string>
<string name="enable_sleep_mode">Način delovanja sprejemnika GPS</string>
<string name="enable_sleep_mode">Omogoči način delovanja GPS v ozadju</string>
<string name="gps_wake_up_timer">Interval prebujanja GPS</string>
<string name="sleep_mode_stop_dialog">Nastavitve delovanja sprejemnika GPS</string>
<string name="sleep_mode_stop_dialog">Ali želite prekiniti ozadnji način GPS?</string>
<string name="map_preferred_locale_descr">Prednostno uporabljeni jezik oznak na zemljevidu (če jezik ni na voljo, so uporabljene angleške ali krajevne oznake)</string>
<string name="map_preferred_locale">Jezik oznak na zemljevidu</string>
<string name="local_map_names">Krajevna imena</string>
@ -1610,7 +1610,7 @@
<string name="rendering_value_pedestrian_name">Pešačenje</string>
<string name="way_alarms">Prometna opozorila</string>
<string name="speak_favorites">Najavi bližnje priljubljene točke</string>
<string name="speak_favorites">Bližnje priljubljene točke</string>
<string name="int_hour">ur</string>
<string name="duration">Trajanje</string>
<string name="distance">Razdalja</string>
@ -1624,7 +1624,7 @@
<string name="record_plugin_name">Dnevnik potovanj</string>
<string name="index_tours">Izleti</string>
<string name="waypoints">Vmesne točke</string>
<string name="speak_poi">Najavi bližnje točke POI</string>
<string name="speak_poi">Bližnje točke POI</string>
<string name="rendering_value_browse_map_name">Poišči na zemljevidu</string>
<string name="rendering_attr_alpineHiking_description">Izriši poti po lestvici SAC</string>
<string name="pause_navigation">Ustavi navigacijo</string>
@ -1718,7 +1718,7 @@
<string name="osmo_use_https_descr">Uporabi varno povezavo s strežnikom</string>
<string name="error_avoid_specific_road">Ni najdenih možnosti obvoza</string>
<string name="voices">Glasovna navodila</string>
<string name="speak_pedestrian">Najavi prehode za pešce</string>
<string name="speak_pedestrian">Prehodi za pešce</string>
<string name="navigate_point_zone">Območje</string>
<string name="navigate_point_northing">Koordinata v smeri proti severu</string>
<string name="navigate_point_easting">Koordinata v smeri proti vzhodu</string>
@ -1981,4 +1981,18 @@
<string name="saved_at_time">Uspešno shranjeno ob: %1$s</string>
<string name="poi_deleted_localy">Točka POI bo izbrisana po pošiljanju sprememb</string>
<string name="show_gpx">Pokaži GPX</string>
</resources>
<string name="simulate_your_location_stop_descr">Zaustavi simuliranje položaja</string>
<string name="simulate_your_location_descr">Simuliraj s shranjeno potjo GPX oziroma izračunano potjo</string>
<string name="address_unknown">Naslov še ni znan</string>
<string name="show_on_start">Pokaži ob zagonu</string>
<string name="count_of_lines">Seštevek vrstic</string>
<string name="are_you_sure">Ali ste prepričani?</string>
<string name="unsaved_changes_will_be_lost">Vse neshranjene spremembe bodo izgubljene. Ali želite nadaljevati?</string>
<string name="downloads_left_template">%1$s prejemov v vrsti</string>
<string name="roads">Poti</string>
<string name="shared_string_trip_recording">Beleženje poti</string>
<string name="shared_string_navigation">Navigacija</string>
<string name="osmand_running_in_background">Delovanje v ozadju</string>
<string name="favourites_edit_dialog_title">Podrobnosti o točki</string>
<string name="favourites_context_menu_add">Dodaj priljubljeno</string>
</resources>

View file

@ -2002,4 +2002,7 @@
<string name="simulate_your_location_stop_descr">Sluta simulera din plats</string>
<string name="simulate_your_location_descr">Simulera med inspelad GPX eller beräknad rutt</string>
<string name="downloads_left_template">%1$s nedladdningar kvar</string>
</resources>
<string name="favourites_edit_dialog_title">Information om favoriter</string>
<string name="roads">Vägar</string>
<string name="favourites_context_menu_add">Lägg till favorit</string>
</resources>

View file

@ -89,7 +89,7 @@
<string name="bg_service_sleep_mode_off">運行\n 應用程式在背景運轉</string>
<string name="bg_service_sleep_mode_on">停止\n 在背景運轉</string>
<string name="bg_service_sleep_mode_on">停止\n在背景執行</string>
<string name="gps_wakeup_interval">GPS 喚醒間隔:%s</string>
<string name="int_continuosly">繼續</string>
<string name="screen_is_locked">要解鎖螢幕,按下鎖圖示</string>
@ -2091,7 +2091,7 @@
<string name="opening_at">營業于</string>
<string name="closing_at">結束于</string>
<string name="next_proceed">下頁</string>
<string name="av_locations_descr">Gpx 檔案偕同地點注解</string>
<string name="av_locations_descr">GPX 檔案加上地點注解</string>
<string name="av_locations">地點</string>
<string name="tag_poi_name">名稱</string>
<string name="tag_poi_amenity">便利設施</string>
@ -2116,4 +2116,10 @@
<string name="simulate_your_location_stop_descr">停止模擬您的位置</string>
<string name="simulate_your_location_descr">模擬使用記錄的 GPX 或計算的路線</string>
<string name="downloads_left_template">離開下載的 %1$s</string>
</resources>
<string name="favourites_edit_dialog_title">我的最愛資訊</string>
<string name="favourites_context_menu_add">增加到我的最愛</string>
<string name="roads">道路</string>
<string name="shared_string_trip_recording">旅程錄製</string>
<string name="shared_string_navigation">導航</string>
<string name="osmand_running_in_background">在背景執行</string>
</resources>

View file

@ -12,6 +12,7 @@
<attr name="bg_color" format="reference" />
<attr name="bg_card" format="reference" />
<attr name="bg_map_context_menu" format="reference" />
<attr name="bg_point_editor_view" format="reference" />
<attr name="ctx_menu_info_view_bg" format="reference" />
<attr name="dashboard_divider" format="reference" />

View file

@ -9,10 +9,15 @@
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
-->
<string name="shared_string_trip_recording">Trip recording</string>
<string name="shared_string_navigation">Navigation</string>
<string name="osmand_running_in_background">Running in background</string>
<string name="gps_wake_up_timer">GPS wake-up interval</string>
<string name="favourites_edit_dialog_title">Favorite information</string>
<string name="simulate_your_location_stop_descr">Stop simulating your position</string>
<string name="simulate_your_location_descr">Simulate using recorded GPX or calculated route</string>
<string name="address_unknown">Address is not known yet</string>
<string name="av_locations_descr">Gpx file with note locations</string>
<string name="av_locations_descr">GPX file with note locations</string>
<string name="av_locations">Locations</string>
<string name="plugin_settings">Plugins</string>
<string name="routing_attr_avoid_shuttle_train_name">Avoid shuttle train</string>
@ -351,21 +356,6 @@
<string name="wake_on_voice">Turn screen on</string>
<string name="wake_on_voice_descr">Turn on device screen (if off) when approaching a turn</string>
<string name="impassable_road">Avoid roads…</string>
<string name="tip_recent_changes_1_9_t">Changes in 1.9:
* Updated maps styles with road surface rendering, transport layers and hiking symbols
* Search POI along the route
* Mark road as impassable per session
* Easier to download and update maps
* Get visual and audio notification by approaching to waypoint
* Print itinerary and turn information
* Support of turn lanes
* Support Android Wear
* Lots UI changes
* Separate zoom for Text Size on the map
* Special audio notifications in case you are off the route
* OsMo login functionality
* Fix OsMo version incompatibilities
</string>
<string name="rendering_attr_trainLightrailRoutes_name">Train routes</string>
<string name="rendering_attr_tramRoutes_name">Tram routes</string>
<string name="rendering_attr_shareTaxiRoutes_name">Share taxi routes</string>
@ -406,23 +396,6 @@
<string name="speak_favorites">Nearby Favorites</string>
<string name="speak_poi">Nearby POI</string>
<string name="way_alarms">Traffic warnings</string>
<string name="tip_navigation">Navigation</string>
<string name="tip_navigation_t">To get directions to a place, either directly long-click on it on the map, (then tap its description marker and select \'Directions to\'), or select \'Directions to\' after tapping any entry in a search results list or favorite list.
\n\nThe destination is marked as a target flag marker on the map and OsmAnd displays the distance to it and the direction to it (orange triangle).
\n\nYou may chose either \'Start navigation\', which means that OsmAnd would live-guide you, give you voice instructions (if enabled), etc. Or you can select \'Display route\', resulting in static route without any live-guideance or adjustments as you move.
\n\nTo display a route to the selected destination from any point other than your current position, select the start point on the map and tap \'Directions from\'.
\n\nIf you use \'Directions from\' together with \'Start navigation\', OsmAnd will switch to your actual position as soon as it is found (so this can be used to jump-start routing before the position is found), while \'Directions from\' in combination with \'Display route\' just shows you the route from any arbitrary point you had selected without subsequent updates.
</string>
<string name="tip_search">Searching</string>
<string name="tip_search_t">You can search for places directly on the map via \'Use location\' → \'Search near here\', or by calling the search screen via \'Menu\' → \'Search\'.
\n\nThe search screen provides templates for searching
\n\t* by address
\n\t* via coordinates
\n\t* as POI (by type or by name)
\n\t* via your search history
\n\t* or via your predefined favorites.
\n\nFor all hits a context menu or action bar offers options like \'Directions to\' or \'Show on map\', etc.
</string>
<string name="background_service_is_enabled_question">OsmAnd background service is still running. Do you want to interrupt it, too?</string>
<string name="sleep_mode_stop_dialog">Interrupt GPS background mode?</string>
<string name="stop_navigation_service">Interrupt</string>
@ -450,9 +423,6 @@
<string name="proxy_host_descr">Configure your proxy\'s hostname (e.g. 127.0.0.1)</string>
<string name="proxy_port_title">Proxy Port</string>
<string name="proxy_port_descr">Configure your proxy\'s port number (e.g. 8118)</string>
<string name="tip_initial_t">OsmAnd is a navigation application with many features.
\n\nAs a basic introduction, some usage tips and tricks are linked via \'Menu\' → \'Help\' from the map screen.
</string>
<string name="monitoring_settings">Trip recording</string>
<string name="monitoring_settings_descr">Configure how to record your trips</string>
<string name="int_hour">h</string>
@ -475,7 +445,6 @@
<string name="continue_navigation">Continue Navigation</string>
<string name="pause_navigation">Pause Navigation</string>
<string name="keep_navigation_service">Keep</string>
<string name="gps_wake_up_timer">GPS wake-up interval</string>
<string name="map_preferred_locale_descr">Preferred language for labels on the map (if it is not available will switch to English or to local names)</string>
<string name="map_preferred_locale">Map preferred language</string>
<string name="local_map_names">Local names</string>
@ -557,7 +526,7 @@
<string name="gpx_selection_route_points">%1$s \nRoute points %2$s</string>
<string name="gpx_selection_points">%1$s \nPoints</string>
<string name="gpx_selection_track">%1$s \nTrack %2$s</string>
<string name="gpx_file_is_empty">Gpx track is empty</string>
<string name="gpx_file_is_empty">GPX track is empty</string>
<string name="osmo_user_joined">User %1$s joined group %2$s</string>
<string name="osmo_user_left">User %1$s left group %2$s</string>
<string name="osmo_show_group_notifications">Show group notifications</string>
@ -629,14 +598,6 @@
<string name="osmo_conn_successfull">Connection established: %1$s </string>
<string name="osmo_io_error">OsMo connection problem: </string>
<string name="osmo_settings_uuid">Unique device id</string>
<string name="tip_recent_changes_1_8_alpha">Changes in 1.8:
* Calculate route between route points of GPX track
* Changed layout of countries for downloads (support local names search)
* Supports GPX/KML import (convert from KML to GPX)
* GPX tracks has moved to \'My Data\'
* You can split GPX track by distance and check altitude difference/ speed
* Auto start navigation after delay
</string>
<string name="use_points_as_intermediates">Calculate route between points</string>
<string name="osmo_mode_restart">Restart OsMo session</string>
<string name="osmo_mode_on">Stop OsMo session</string>
@ -744,17 +705,6 @@
<string name="routing_preferences_descr">Routing preferences</string>
<string name="speech_rate_descr">Specify speech rate for TTS</string>
<string name="speech_rate">Speech Rate</string>
<string name="tip_recent_changes_1_7_1_t">Changes in 1.7:
\n\t* IMPORTANT maps should be newer than February 2014.
\n\t* Completely updated routing (fast and precise) -
\n\t* New screen with Route Planning (more intuitive and more powerful)
\n\t** NOTE GPX route is available under Route Settings buttton
\n\t* Auto hide buttons in navigation mode
\n\t* Calculate offline route to the first point of GPX route (\'pass the whole track\' option)
\n\t* Active simulation in tunnels
\n\t* Lots of small UX improvements &amp; usability fixes
\n\t* Speech rate accessibility setting
</string>
<string name="complex_route_calculation_failed">Fast route calculation failed (%s), fallback to slow calculation.</string>
<string name="disable_complex_routing_descr">Disable 2-phase routing for car navigation</string>
<string name="disable_complex_routing">Disable complex routing</string>
@ -766,8 +716,6 @@
<string name="app_mode_motorcycle">Motorcycle</string>
<string name="app_mode_boat">Boat</string>
<string name="app_mode_aircraft">Aircraft</string>
<string name="tip_faq_t">Please visit https://code.google.com/p/osmand/wiki/FAQ to see frequently asked questions.</string>
<string name="tip_faq">Frequently Asked Questions</string>
<string name="local_osm_changes_delete_all_confirm">You are going to delete %1$d OSM changes. Are you sure?</string>
<string name="animate_routing_route_not_calculated">Please calculate the route first</string>
<string name="animate_routing_route">Simulate using calculated route </string>
@ -779,29 +727,9 @@
<string name="auto_zoom_farthest">To long-range</string>
<string name="map_magnifier">Map magnifier</string>
<string name="base_world_map">World basemap</string>
<string name="tip_map_styles">Map Styles</string>
<string name="tip_map_styles_t">OsmAnd supports displaying the offline vector maps in different map styles to suit your to needs:
\n\nOther than the balanced \'default\' map style, you may in \'Menu\' → \'Configure map\' → \'Map Style\' select for example
\n\t* The \'Touring view\' style, which contains the most detailed information feasable for traveling and touring, including optimization for professional drivers (higher contrast, distinguishable roads), options for Alpine hiking (SAC scale), cycle routes, hiking symbol support, etc.
\n\t* \'High contrast roads\' shows roads in very accentuated colors for bright ambient lighting situations
\n\t* \'Winter and ski\' creates a (snow covered) winter landscape view, and shows global ski slopes and lifts (in connection with the \'World ski\' map download)
</string>
<string name="about_version">Version :</string>
<string name="about_settings">About</string>
<string name="about_settings_descr">Version info, licenses, project members</string>
<string name="tip_recent_changes_1_6_t">Changes in 1.6:
\n\t* Support of Full HD devices
\n\t* Support transparent map background
\n\t* Show downloaded maps and facilitate downloading missing maps directly from the map view
\n\t* Contour line map files now bundled for countries/regions
\n\t* New world basemap with major roads, railroads, and major areal features like forests
\n\t* Map magnifier feature (long click on zoom button) - Useful both for tile and vector maps
\n\t* Define/edit custom online tile sources (and specify expiration time)
\n\t* Support of time conditional speed limits (Netherlands)
\n\t* Faster search address input
\n\t* Bug fixes with routing and rendering
</string>
<string name="local_index_tile_data_zooms">Zooms downloaded: %1$s</string>
<string name="local_index_tile_data_expire">Expire (minutes): %1$s</string>
<string name="local_index_tile_data_downloadable">Downloadable: %1$s</string>
@ -831,13 +759,6 @@
<string name="speak_speed_limit">Speed limit</string>
<string name="speak_cameras">Speed cameras</string>
<string name="speak_traffic_warnings">Traffic warnings</string>
<string name="tip_recent_changes_1_5_t">Changes in 1.5:
\n\t* Voice warnings about speed limits and cameras
\n\t* More voice prompt capabilities (street names announced)
\n\t* High density map icons
\n\t* Lots of UI changes
\n\t* Bugfixes in distance display, GPX analyzer, waypoint handling, planning widget, OSM uploading, https handling
</string>
<string name="osb_author_or_password_not_specified">Please specify OSM user and password in Settings</string>
<string name="clear_intermediate_points">Clear intermediate points</string>
<string name="keep_intermediate_points">Keep intermediate points</string>
@ -858,15 +779,6 @@
<string name="destination_point">Destination %1$s</string>
<string name="context_menu_item_destination_point">Set as destination</string>
<string name="please_select_address">Select city or street first</string>
<string name="tip_recent_changes_1_4_t">Changes in 1.4:
\n\t* Order waypoints in optimal way to visit all (Travelling salesman, door-to-door)
\n\t* Search street by name (in neighborhood)
\n\t* Planning mode plugin (load/edit/save GPX tracks)
\n\t* New download screen (download in background)
\n\t* Support GPX subfolders (organize your GPX tracks)
\n\t* Delete SRTM files
\n\t* Support OSM Notes
</string>
<string name="search_street_in_neighborhood_cities">Search street in neighborhood cities</string>
<string name="intermediate_items_sort_return">Intermediate waypoints resorted to optimize their order on the way from current location to the destination.</string>
<string name="intermediate_items_sort_by_distance">Sort (door-to-door)</string>
@ -908,12 +820,6 @@
<string name="hno">House number</string>
<string name="website">Web site</string>
<string name="phone">Phone</string>
<string name="tip_recent_changes_1_3_t">Changes in 1.3:
\n\t* Reimplement Tablets and Large screen support
\n\t* Holo Theme (customization)
\n\t* Additional settings for stabilizing compass
\n\t* Top left button on the map screen replaces Menu button
</string>
<string name="osmand_background_plugin_description">Shows the settings to enable tracking and navigation in background (screen off) mode via periodically waking up the GPS device.</string>
<string name="contribution_activity">Install version</string>
<string name="choose_osmand_theme_descr">Choose application theme</string>
@ -922,25 +828,8 @@
<string name="select_address_activity">Select address</string>
<string name="favourites_list_activity">Select favorite</string>
<string name="local_openstreetmap_act_title">OSM modifications</string>
<string name="tip_recent_changes_1_2_t">Fixes in 1.2.1:
\n\t*Fix Geo Intent (Foursquare, c:geo)
\n\t*Fix screen tremble during navigation
\n\t*Other small fixes
\n\nChanges in 1.2:
\n\t* Bug fixes (tuned routing, search, AV recording, voice prompts, some display improvements)
\n\t* Easier hillshade overlay configuration (requires Contour Lines plugin)
\n\t* Now accepts maps.google.com location links
\n\t* New widget (GPS info)
\n\t* Added multi-window support for recent Samsung devices
\n\t* Kalman filter for compass
\n\t* Pebble watch support
</string>
<string name="layer_hillshade">Hillshade layer</string>
<string name="map_widget_gps_info">GPS info</string>
<string name="tip_recent_changes_1_1_4_t">Changes in 1.1.4:
\n\t* UI redesign
\n\t* Bug fixes
</string>
<string name="access_arrival_time">Arrival time</string>
<string name="item_checked">checked</string>
<string name="item_unchecked">unchecked</string>
@ -952,13 +841,6 @@
<string name="download_hillshade_item">Hillshade</string>
<string name="download_wikipedia_maps">Wikipedia</string>
<string name="download_hillshade_maps">Hillshade overlays</string>
<string name="tip_recent_changes_1_1_2_t">Changes in 1.1.2:
\n\t* Audio/video plugin enhancement (photos with EXIF information)
\n\t* Usability fixed and restructured Contour lines plugin
\n\t* Hillshade packages for Contour lines plugin
\n\t* Bug fixes (suboptimal routing)
</string>
<string name="local_indexes_cat_srtm">Contour lines data</string>
<string name="local_indexes_cat_av">Audio/Video data</string>
<string name="stop_routing_confirm">Are you sure you want to stop the navigation?</string>
@ -992,14 +874,6 @@
<string name="recording_playing">An audio from the specified recording is being played.\n%1$s</string>
<string name="recording_open_external_player">Open external player</string>
<string name="recording_delete_confirm">Do you want to remove this recording?</string>
<string name="tip_recent_changes_1_1_0_t">Changes in 1.1.0:
\n\t* Distance calculator plugin
\n\t* Audio/video notes plugin
\n\t* Contour lines plugin
\n\t* Bug fixes
\n\t* \'Touring view\' map style option with more map details, new road styles, more contrast, and Alpine hiking (SAC scale) option
\n\t* EGM96 geoid offset correction for GPS altitude readings
</string>
<string name="recording_unavailable">unavailable</string>
<string name="recording_context_menu_arecord">Take an audio note</string>
<string name="recording_context_menu_vrecord">Take a video note</string>
@ -1027,11 +901,6 @@
<string name="rendering_attr_noAdminboundaries_name">Hide boundaries</string>
<string name="rendering_attr_noAdminboundaries_description">Suppress display of regional boundaries (admin levels 5-9)</string>
<string name="tip_altitude_offset">Altitude Correction</string>
<string name="tip_altitude_offset_t">Most GPS devices report altitude measurements in the ellipsoid-based WGS84 reference system, from which a conversion to locally used systems requires a position-dependent correction.
\n\nA better approximation to these local systems is the EGM96 (geoid) reference.
\n\nOsmAnd will display your positions\'s altitude in the EGM96 system after you download the file \'World Altitide Correction\' (WW15MGH.DAC) via \'Settings\' → \'Manage map files\'. (Original is at http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm96/binary/WW15MGH.DAC.)
</string>
<string name="map_widget_max_speed">Speed limit</string>
<string name="monitoring_control_start">GPX</string>
<string name="no_buildings_found">No buildings found.</string>
@ -1042,17 +911,6 @@
<string name="safe_mode_description">Run the application in safe mode (using slower Android instead of native code).</string>
<string name="safe_mode">Safe mode</string>
<string name="native_library_not_running">The application is running in safe mode (disable it in the Settings).</string>
<string name="tip_recent_changes_1_0_0_t">Changes in 1.0.0:
\n\t* Improved routing: faster, more precise, up to 250 km
\n\t* Introduce roads-only maps
\n\t* Map does not lose position lock after interruptions
\n\t* Enable background service during navigation
</string>
<string name="tip_recent_changes_0_8_4_t">Changes in 0.8.4:
\n\t* Some bug fixes
\n\t* Map does not lose position lock after interruptions
\n\t* Enable background service during navigation
</string>
<string name="close_changeset">Close changeset</string>
<string name="zxing_barcode_scanner_not_found">ZXing Barcode Scanner application not installed. Search in Market?</string>
<string name="rendering_attr_roadColors_description">Select a road color scheme:</string>
@ -1061,13 +919,6 @@
<string name="enable_plugin_monitoring_services">Enable the Trip recording plugin to use position logging services (GPX logging, online tracking)</string>
<string name="non_optimal_route_calculation">Calculate possibly non-optimal route over long distances</string>
<string name="gps_not_available">Please enable GPS in the settings</string>
<string name="tip_recent_changes_0_8_3_t">Changes in 0.8.3:
\n\t* Waypoints
\n\t* Improved route guidance
\n\t* Added a setting which allows to avoid motorways while building a route
\n\t* Added one more type of roads for bicycles to the map (Cycleway=track)
\n\t* Bug fixes
</string>
<string name="map_widget_monitoring_services">Logging services</string>
<string name="no_route">No route</string>
<string name="delete_target_point">Remove waypoint</string>
@ -1110,13 +961,6 @@
<string name="snap_to_road">Snap to road</string>
<string name="interrupt_music_descr">Interrupt music when making announcement</string>
<string name="interrupt_music">Interrupt music</string>
<string name="tip_recent_changes_0_8_2_t">Changes in 0.8.2:
\n\t* Improved Routing
\n\t* Dynamic map widgets
\n\t* Map settings moved to map screen
\n\t* Lock screen button with logging services
\n\t* Fixed Arabic, Kannada scripting and RTL languages
</string>
<string name="osmand_play_title_30_chars">OsmAnd Maps &amp; Navigation</string>
<string name="osmand_short_description_80_chars">Global Mobile Map Viewing &amp; Navigation for Offline and Online OSM Maps</string>
<string name="osmand_long_description_1000_chars">
@ -1310,15 +1154,6 @@ Approximate map coverage and quality:
List of countries supported (basically world wide!):
Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, Argentina, Armenia, Aruba, Australia, Austria, Azerbaijan, Bahamas, Bahrain, Bangladesh, Barbados, Belarus, Belgium, Belize, Benin, Bermuda, Bhutan, Bolivia, Bonaire, Bosnia and Herzegovina, Botswana, Brazil, British Virgin Islands, Brunei, Bulgaria, Burkina Faso, Burundi, Cambodia, Cameroon, Canada, Cape Verde, Central African Republic, Chad, Chile, China, Colombia, Comoros, Congo, Costa Rica, Ivory Coast, Croatia, Cuba, Curaçao, Cyprus, Czech Republic, Denmark, Djibouti, Dominica, Dominican Republic, Ecuador, Egypt, El Salvador, Equatorial Guinea, Eritrea, Estonia, Ethiopia, Fiji, Finland, France, French Guiana, French Polynesia, Gabon, Gambia, Georgia, Germany, Ghana, Gibraltar, Greece, Greenland, Grenada, Guadeloupe, Guam, Guatemala, Guernsey, Guinea, Guinea-Bissau, Guyana, Haiti, Vatican, Honduras, Hong Kong, Hungary, Iceland, India, Indonesia, Iran, Iraq, Ireland, Isle of Man, Israel, Italy, Jamaica, Japan, Jersey, Jordan, Kazakhstan, Kenya, Kiribati, North Korea and South Korea, Kuwait, Kyrgyzstan, Laos, Latvia, Lebanon, Lesotho, Liberia, Libya, Liechtenstein, Lithuania, Luxembourg, Macao, Macedonia, Madagascar, Malawi, Malaysia, Maldives, Mali, Malta, Martinique, Mauritania, Mauritius, Mayotte, Mexico, Micronesia, Moldova, Monaco, Mongolia, Montenegro, Montserrat, Morocco, Mozambique, Myanmar, Namibia, Nauru, Nepal, Netherlands, Netherlands Antilles, New Caledonia, New Zealand, Nicaragua, Niger, Nigeria, Norway, Oman, Pakistan, Palau, Palestinian Territory, Panama, Papua New Guinea, Paraguay, Peru, Philippines, Poland, Portugal, Puerto Rico, Qatar, Romania, Russia, Rwanda, Saint Barthelemy, Saint Helena, Saint Kitts and Nevis, Saint Lucia, Saint Martin, Saint Pierre and Miquelon, Saint Vincent and the Grenadines, Samoa, San Marino, Saudi Arabia, Senegal, Serbia, Seychelles, Sierra Leone, Singapore, Slovakia, Slovenia, Somalia, South Africa, South Georgia, South Sudan, Spain, Sri Lanka, Sudan, Suriname, Swaziland, Sweden, Switzerland, Syria, Taiwan, Tajikistan, Tanzania, Thailand, Timor-Leste, Togo, Tokelau, Tonga, Trinidad and Tobago, Tunisia, Turkey, Turkmenistan, Tuvalu, Uganda, Ukraine, United Arab Emirates, United Kingdom (UK), United States of America (USA), Uruguay, Uzbekistan, Vanuatu, Venezuela, Vietnam, Wallis and Futuna, Western Sahara, Yemen, Zambia, Zimbabwe.
</string>
<string name="tip_update_index">Updating Offline Maps</string>
<string name="tip_update_index_t">Up-to-date map data is essential for offline map viewing, for POI/address search, and for offline navigation. OsmAnd provides a map file manager to download these offline maps and to check for available updates.
\n\nTo download maps go to \'Settings\' → \'Manage map files\' → \'Download\'.
\n\nAfter the global region list is retrieved from the Internet, click on any entry to download or update a file. Please note the file type selector near the top of the screen to select the type of download you want (regular maps, hillshade overlays, etc.).
\n\nYou can filter the region list by typing some letters, or you may select the option \'Settings\' → \'Filter downloaded\' to see updates only for the data already on your device.
\n\n\t* Entries in \'green\' indicate data files identical on device and server
\n\t* Entries in \'blue\' indicate available updates on server
\n\t* Entries in italic font indicate data de-activated on the device
</string>
<string name="filterpoi_activity">Create POI filter</string>
<string name="recalculate_route_to_your_location">Transport mode:</string>
<string name="select_navigation_mode">Select transport mode</string>
@ -1369,15 +1204,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="osmand_parking_hours">Hours</string>
<string name="osmand_parking_minutes">Minutes</string>
<string name="osmand_parking_position_description_add_time">The car was parked at:</string>
<string name="tip_recent_changes_0_8_1_t">Changes in 0.8.1:
\n\t* More precise routes (a bit slower)
\n\t* Smart and fast Route recalculation
\n\t* Direction by lanes
\n\t* Information about speed limits, speed cams, and speed bumps
\n\t* Improved voice guidance on highways
\n\t* Parking plugin (\'Where is my car parked at?\')
\n\t* Enable/disable logging widget
</string>
<string name="select_animate_speedup">Select speed of route simulation</string>
<string name="global_app_allocated_memory_descr">Allocated memory %1$s MB (Android limit %2$s MB, Dalvik %3$s MB).</string>
<string name="global_app_allocated_memory">Allocated memory</string>
@ -1451,29 +1277,11 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="plugins_screen">Plugins</string>
<string name="prefs_plugins_descr">Plugins activate advanced settings and additional functionality</string>
<string name="prefs_plugins">Plugins</string>
<string name="tip_recent_changes_0_8_0_t">Changes in 0.8.0:
\n\t- *Plugin functionality*
\n\t - Most functionality is grouped by features and can be enabled/disabled in the Settings/Plugins.
You can enable (online or cached) tile map sources, tracking settings, and many other new and previously existing features.
\n\t- *New offline map data support*
\n\t - Map rendering becomes faster and more precise (coastline and flooded area problems are mainly fixed).
\n\t - You need to download completely new offline data (old data will not be supported anymore)
\n\t- *Offline Routing*
\n\t - Offline routing becomes more robust
\n\t *Usability and UI experience*
\n\t - Improved in many areas
</string>
<string name="vector_maps_may_display_faster_on_some_devices">Vector maps likely display faster. May not work well on some devices.</string>
<string name="play_commands_of_currently_selected_voice">Play commands of selected voice</string>
<string name="native_rendering">Native rendering</string>
<string name="test_voice_prompts">Test voice prompts</string>
<string name="switch_to_raster_map_to_see">No offline vector map present for this location. You can download one in Settings (Manage map files), or switch to online maps (enable online maps plugin for this).</string>
<string name="tip_recent_changes_0_7_2_t">Changes in 0.7.2:
\n\t- Native rendering for all devices
\n\t- Offline POI editing
\n\t- Accessibility
\n\t- Lots of bug fixes
</string>
<string name="send_files_to_osm">Send GPX files to OSM?</string>
<string name="gpx_visibility_txt">Visibility</string>
<string name="gpx_tags_txt">Tags</string>
@ -1549,16 +1357,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="use_fluorescent_overlays_descr">Use fluorescent colors to display tracks and routes</string>
<string name="offline_edition">Offline editing</string>
<string name="offline_edition_descr">Always use offline editing</string>
<string name="tip_recent_changes_0_7_1_t">Changes in 0.7.1:
\n\t- Offline POI editing
\n\t- Online Tracking option - send coordinates to web service periodically (read how to setup your own web service in HowTo Articles)
\n\t- Show currently recorded track on map
\n\t- Direction detection: \'Make U-turn\' is indicated and announced when heading in opposite direction or after missing a turn
\n\t- New voice prompt \'Route recalculated\'
\n\t- Optical indication of an imminent turn within 100m by diretion arrow changing color
\n\t- Actuality also of deactivated index files now shown on Download screen in dark green and dark blue
\n\t- Other changes
</string>
<string name="update_poi_does_not_change_indexes">POI changes inside application do not affect downloaded map files, changes are saved to local file instead.</string>
<string name="local_openstreetmap_uploading">Uploading …</string>
<string name="local_openstreetmap_were_uploaded">{0} POI/Notes were uploaded</string>
@ -1574,11 +1372,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="live_monitoring_url">Online tracking web address</string>
<string name="gpx_monitoring_disabled_warn">Log track using GPX widget or via \'Trip recording\' settings.</string>
<string name="show_current_gpx_title">Show current track</string>
<string name="tip_recent_changes_0_7_0_t">Changes in 0.7.0:
\n\t- Offline wikipedia data with articles
\n\t- Updated maps
\n\t- Other small features
</string>
<string name="free_version_message">This free OsmAnd version is limited to %1$s downloads and does not support offline Wikipedia articles.</string>
<string name="free_version_title">Free version</string>
<string name="poi_context_menu_showdescription">Show POI description</string>
@ -1615,39 +1408,8 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="user_password_descr">Needed for openstreetmap.org submissions</string>
<string name="osmand_service">Background mode</string>
<string name="osmand_service_descr">OsmAnd runs in background while screen is off</string>
<string name="tip_rotation_switching">Map Orientation</string>
<string name="tip_rotation_switching_t_v2">You can toggle whether and how the map display is rotated by repeatedly clicking on the map screen\'s compass icon.
\n\nThe choices are:
\n\t* \'Don\'t rotate (north is up)\': Map will not be rotated. North will be always up
\n\t* \'To direction of movement\': Map will continuously be aligned with your heading
\n\t* \'To compass\': Map will continuously be aligned with the device\'s compass reading
</string>
<string name="tip_day_night_mode">Day/Night Mode</string>
<string name="tip_day_night_mode_t_v2">The map appearance can for offline vector maps be changed between day (brighter) and night (darker). Night colors are safer and more comfortable for night driving.
\n\nYou can set a policy for day/night switching in \'Menu\' → \'Configure map\' → \'Day/night map\'.
\n\nThe choices are:
\n\t* \'Sunrise/Sunset\': automatic mode, controlled by the position of the sun (default)
\n\t* \'Day\': always use day mode
\n\t* \'Night\': always use night mode
\n\t* \'Light sensor\': map appearance is controlled by the device\'s light sensor (only if equipped)
</string>
<string name="tip_osm_improve">Improving OSM Data</string>
<string name="tip_osm_improve_t">OsmAnd uses maps based on Openstreetmap.org (OSM) data and can directly be used to improve OSM data quality. You can create and upload new POI or OSM bug reports with just a few clicks.
\n\nFor this you need to activate the \'OSM Editing\' plugin under \'Settings\' → \'Plugins\', then provide your OSM login information in \'Settings\' → \'OSM editing\'.
\n\nTo add a new POI use option \'Create POI\' in the \'Use location\' context menu. Proceed with entering the information about the new POI in \'Create POI\' dialogue and finally commit it.
\n\nAlso errors in maps can immediately be reported via an OSM bug, so the OSM community can then fix this problem. Use the option \'Open OSM bug\' in the \'Use location\' context menu. Then enter the detailed description of the problem and finally post it using the \'Add\' button.
\n\nOsmAnd supports caching your entries offline (see respective setting), but Internet connectivity is of course needed to upload your OSM POI and OSM bug contributions.
</string>
<string name="download_files_not_enough_space">There is not enough free space to download %1$s MB (free: %2$s).</string>
<string name="download_files_question_space">Free space now {2} MB! Download {0} file(s) ({1} MB)?</string>
<string name="tip_recent_changes_0_6_9_t">Changes in 0.6.9 :
\n\t- Improved offline map rendering
\n\t- Fast Native offline rendering - look in experimental features (may not work on some devices)
\n\t- Massive look and feel changes
\n\t- Altitude info
\n\t- New translations (Vienamese, Polish)
\n\t- Other small features
</string>
<string name="use_transparent_map_theme">Transparent theme</string>
<string name="native_library_not_supported">Native library is not supported on this device.</string>
<string name="init_native_library">Initializing native library…</string>
@ -1673,16 +1435,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="animate_route_off">Stop simulation</string>
<string name="animate_route">Start simulation</string>
<string name="tip_recent_changes_0_6_8_t">Changes in 0.6.8:
\n\t- Completely redesigned search (POI, Address)! Make address search much faster and more responsive. Create one Search interface with many different options.
\n\t- Implement POI search by name in big areas (countries)
\n\t- Fix flickering map screen for tablets (Issue 641)
\n\t- Auto-center map view option (Issue 356)
\n\t- GPX navigation moved to \'Directions\' and \'Save Directions\' moved to \'About route\'
\n\t- POI data included in .obf file (all download indexes after 01/10/11)
\n\t- Voice prompt fixes (GPS position fix, omitting first command)
\n\t- Small improvements
</string>
<string name="file_can_not_be_renamed">File can not be renamed.</string>
<string name="file_with_name_already_exists">File with that name already exists.</string>
<string name="gpx_navigation">GPX route</string>
@ -1703,18 +1455,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="search_position_map_view">Current map center</string>
<string name="select_search_position">Origin:</string>
<string name="context_menu_item_search">Search near here</string>
<string name="tip_recent_changes_0_6_7_t">Recent changes for 0.6.7:
\n\t- Offline data manager (download, delete, activate / deactivate offline data directly in OsmAnd)
\n\t- Favorite points and groups (categorize, delete, manage favorites)
\n\t- GPX Explorer in application (view track detail, distance, average speed, elevation, etc.)
\n\t- GPX navigation (more options, continue navigation after crash, support roundabouts)
\n\t- Function to save route as GPX track for offline use
\n\t- Improve GPX monitoring (filter some inaccurate position and save accuracy/elevation/speed)
\n\t- Upload GPX to OSM community (http://download.osmand.net/gpx/)
\n\t- Improve vector rendering
\n\t- Improvement of TTS engine (announce exact distance, enable miles)
\n\t- Bug fixes
</string>
<string name="route_successfully_saved_at">Route successfully saved as \'%1$s\'.</string>
<string name="filename_input">File name: </string>
<string name="file_with_name_already_exist">File with same name already exists.</string>
@ -1760,15 +1500,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="map_text_size">Map font size</string>
<string name="trace_rendering">Rendering debug info</string>
<string name="trace_rendering_descr">Display rendering performance</string>
<string name="tip_recent_changes">Recent Changes</string>
<string name="tip_recent_changes_0_6_6_t">Recent changes for 0.6.6:
\n\t- Text To Speech engine for voice navigation
\n\t- Make map renderer more detailed
\n\t- Basemap for whole world packaged with app
\n\t- Tweak offline navigation (still experimental)
\n\t- GPX navigation options
\n\t- UI update and large bug fixing
</string>
<string name="installing_new_resources">Unpacking new data…</string>
<string name="internet_connection_required_for_online_route">An online navigation service is selected but no Internet connection is available.</string>
<string name="tts_language_not_supported_title">Language not supported</string>
@ -1801,16 +1532,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="install_more">Install more…</string>
<string name="level_to_switch_vector_raster_descr">Minimum zoom level to use vector maps</string>
<string name="level_to_switch_vector_raster">Min. vector zoom level</string>
<string name="tip_location_sharing">Share a Location</string>
<string name="tip_location_sharing_t">You can share the location of interesting places on your trip with family or friends via the \'Use location\' context menu → \'Share location\'.
\n\nThen chose a way to share your location. The choices are: E-Mail, SMS(text), or just copy the location coordinates to the device clipboard.
</string>
<string name="tip_favorites">Favorite Points</string>
<string name="tip_favorites_t">Frequently used points can be saved as Favorites, as follows:
\n\nIn the \'Use location\' context menu for any point, select option \'Add to favorites\' and then enter a name for it.
\n\nAfter saving a Favorite, it is accessible via \'Menu\' → \'My Places\'. Tapping on any entry in the \'Favorites\' list provides options like to navigate to it, edit or delete it.
\n\nTo display all Favorite points directly on the map, on the map screen enable layer \'Favorites\' in \'Menu\' → \'Configure map\'.
</string>
<string name="create_poi_link_to_osm_doc"><u>Online OSM</u> map classification with images</string>
<string name="error_doing_search">Error occurred in offline search</string>
<string name="search_offline_geo_error">Could not parse geo intent \'%s\'</string>
@ -1819,20 +1540,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="preferred_locale_descr">Select display language (please restart OsmAnd after changing)</string>
<string name="preferred_locale">Display language</string>
<string name="incomplete_locale">incomplete</string>
<string name="tip_map_switch">Select a Map Source</string>
<string name="tip_map_switch_t_v2">The map source and map layers displayed are changed via \'Menu\' → \'Configure map\'.
\n\nUnder \'Map source…\' you can choose using the pre-loaded offline vector maps (default, also needed for offline navigation), or predefined (online or cached offline) tile sources (activate the \'Online maps\' plugin under \'Settings\' → \'Plugins\' for this), or maps manually created using e.g. OsmAndMapCreator on a PC.
\n\nOsmAnd also supports custom sources.
</string>
<string name="tip_app_mode">Use Profile</string>
<string name="tip_app_mode_t_v2">OsmAnd supports different (customizable) application profiles for different use cases.
\n\nYou can change profiles via the profile button in the lower left corner of the map screen (icon car, bicycle, or pedestrian), or when creating a route (\'transport mode\').
</string>
<string name="tip_map_context_menu">\'Use location\' Menu</string>
<string name="tip_map_context_menu_t">The \'Use location\' context menu contains all actions referring to a point (location).
\n\nIt is available by long-pressing any point on the map (then tapping its marker), or by pressing the trackball button, or by selecting \'Menu\' → \'Use location\' (the last two ways take the map center as reference).
\n\nA marker box can be hidden again by long-clicking on it.
</string>
<string name="unit_of_length_descr">Change units of length and speed</string>
<string name="unit_of_length">Unit of measure</string>
<string name="si_mi_foots">Miles/feet</string>
@ -1956,7 +1663,7 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="fav_file_to_load_not_found">GPX file containing favorites is not found at {0}</string>
<string name="fav_saved_sucessfully">Favorites successfully saved to {0}</string>
<string name="no_fav_to_save">No favorite points to save</string>
<string name="share_fav_subject">Favourites shared via OsmAnd</string>
<string name="share_fav_subject">Favorites shared via OsmAnd</string>
<string name="error_occurred_loading_gpx">Error occurred while loading GPX</string>
<string name="send_report">Send report</string>
<string name="none_region_found">No offline data for regions found on SD card. Download regions from the Internet.</string>
@ -1976,7 +1683,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="use_trackball">Use trackball</string>
<string name="background_service_wait_int_descr">Set maximum waiting time for each background position fix</string>
<string name="background_service_wait_int">Maximum wait for fix</string>
<string name="service_stop_background_service">Switch off OsmAnd background navigation service</string>
<string name="where_am_i">Where am I?</string>
<string name="process_navigation_service">OsmAnd navigation service</string>
<string name="network_provider">Network</string>
@ -2165,6 +1871,7 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="add_favorite_dialog_top_text">Enter favorite name</string>
<string name="add_favorite_dialog_default_favourite_name">Favorite</string>
<string name="add_favorite_dialog_favourite_added_template">Favorite point \'\'{0}\'\' was added successfully.</string>
<string name="favourites_context_menu_add">Add favorite</string>
<string name="favourites_context_menu_edit">Edit favorite</string>
<string name="favourites_context_menu_delete">Delete favorite</string>
<string name="favourites_remove_dialog_msg">Remove favorite point \'%s\'?</string>
@ -2263,7 +1970,7 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="please_specify_poi_type">Please specify POI type.</string>
<string name="working_days">Working days</string>
<string name="recent_places">Recent places</string>
<string name="favourites">Favourites</string>
<string name="favourites">Favorites</string>
<string name="saved_at_time">Successfully saved at: %1$s</string>
<string name="poi_deleted_localy">POI will be deleted once you upload your changes</string>
<string name="show_gpx">Show GPX</string>

View file

@ -67,6 +67,7 @@
<item name="bg_color">@color/bg_color_light</item>
<item name="bg_card">@drawable/bg_card_light</item>
<item name="bg_map_context_menu">@drawable/bg_map_context_menu_light</item>
<item name="bg_point_editor_view">@drawable/bg_point_editor_view_light</item>
<item name="dashboard_divider">@color/dashboard_divider_light</item>
<item name="divider_color">@color/divider_color</item>
<item name="dashboard_button">@drawable/dashboard_button_light</item>
@ -151,6 +152,7 @@
<item name="bg_color">@color/bg_color_dark</item>
<item name="bg_card">@drawable/bg_card_dark</item>
<item name="bg_map_context_menu">@drawable/bg_map_context_menu_dark</item>
<item name="bg_point_editor_view">@drawable/bg_point_editor_view_dark</item>
<item name="dashboard_divider">@color/dashboard_divider_dark</item>
<item name="divider_color">@color/dashboard_divider_dark</item>
<item name="dashboard_button">@drawable/dashboard_button_dark</item>

View file

@ -26,7 +26,7 @@ public class FavouritePoint implements Serializable, LocationPoint {
}
this.name = name;
}
public int getColor() {
return color;
}

View file

@ -1,12 +1,13 @@
package net.osmand.plus;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import net.osmand.IProgress;
import net.osmand.IndexConstants;
@ -29,23 +30,23 @@ import net.osmand.plus.render.RendererRegistry;
import net.osmand.plus.resources.ResourceManager;
import net.osmand.plus.routing.RoutingHelper;
import net.osmand.plus.views.corenative.NativeCoreContext;
import net.osmand.plus.voice.CommandPlayer;
import net.osmand.plus.voice.CommandPlayerException;
import net.osmand.plus.voice.CommandPlayerFactory;
import net.osmand.plus.voice.MediaCommandPlayerImpl;
import net.osmand.plus.voice.TTSCommandPlayerImpl;
import net.osmand.render.RenderingRulesStorage;
import net.osmand.router.RoutingConfiguration;
import net.osmand.util.Algorithms;
import org.xmlpull.v1.XmlPullParserException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import btools.routingapp.BRouterServiceConnection;
/**
@ -264,6 +265,7 @@ public class AppInitializer implements IProgress {
app.avoidSpecificRoads = startupInit(new AvoidSpecificRoads(app), AvoidSpecificRoads.class);
app.locationProvider = startupInit(new OsmAndLocationProvider(app), OsmAndLocationProvider.class);
app.savingTrackHelper = startupInit(new SavingTrackHelper(app), SavingTrackHelper.class);
app.notificationHelper = startupInit(new NotificationHelper(app), NotificationHelper.class);
app.liveMonitoringHelper = startupInit(new LiveMonitoringHelper(app), LiveMonitoringHelper.class);
app.selectedGpxHelper = startupInit(new GpxSelectionHelper(app, app.savingTrackHelper), GpxSelectionHelper.class);
app.favorites = startupInit(new FavouritesDbHelper(app), FavouritesDbHelper.class);
@ -318,13 +320,32 @@ public class AppInitializer implements IProgress {
final ProgressDialog dlg = showDialog ? ProgressDialog.show(uiContext, app.getString(R.string.loading_data),
app.getString(R.string.voice_data_initializing)) : null;
new Thread(new Runnable() {
public CommandPlayer createCommandPlayer(String voiceProvider, OsmandApplication osmandApplication, Activity ctx)
throws CommandPlayerException {
if (voiceProvider != null) {
File parent = osmandApplication.getAppPath(IndexConstants.VOICE_INDEX_DIR);
File voiceDir = new File(parent, voiceProvider);
if (!voiceDir.exists()) {
throw new CommandPlayerException(ctx.getString(R.string.voice_data_unavailable));
}
if (MediaCommandPlayerImpl.isMyData(voiceDir)) {
return new MediaCommandPlayerImpl(osmandApplication, osmandApplication.getRoutingHelper().getVoiceRouter(), voiceProvider);
} else if (TTSCommandPlayerImpl.isMyData(voiceDir)) {
return new TTSCommandPlayerImpl(ctx, osmandApplication.getRoutingHelper().getVoiceRouter(), voiceProvider);
}
throw new CommandPlayerException(ctx.getString(R.string.voice_data_not_supported));
}
return null;
}
@Override
public void run() {
try {
if (app.player != null) {
app.player.clear();
}
app.player = CommandPlayerFactory.createCommandPlayer(voiceProvider, app, uiContext);
app.player = createCommandPlayer(voiceProvider, app, uiContext);
app.getRoutingHelper().getVoiceRouter().setPlayer(app.player);
if(dlg != null) {
dlg.dismiss();

View file

@ -180,7 +180,10 @@ public class FavouritesDbHelper {
String name = checkEmoticons(p.getName());
String category = checkEmoticons(p.getCategory());
p.setCategory(category);
String description = checkEmoticons(p.getDescription());
String description = null;
if (p.getDescription() != null) {
description = checkEmoticons(p.getDescription());
}
p.setDescription(description);
if (name.length() != p.getName().length()) {
emoticons = true;
@ -189,7 +192,7 @@ public class FavouritesDbHelper {
while (fl) {
fl = false;
for (FavouritePoint fp : fdb.getFavouritePoints()) {
if (fp.getName().equals(name)) {
if (fp.getName().equals(name) && p.getLatitude() != fp.getLatitude() && p.getLongitude() != fp.getLongitude()) {
number++;
index = " (" + number + ")";
name = p.getName() + index;
@ -423,7 +426,14 @@ public class FavouritesDbHelper {
public List<FavoriteGroup> getFavoriteGroups() {
return favoriteGroups;
}
public FavoriteGroup getGroup(FavouritePoint p) {
if (flatGroups.containsKey(p.getCategory())) {
return flatGroups.get(p.getCategory());
} else {
return null;
}
}
private FavouritePoint findFavoriteByAllProperties(String category, String name, double lat, double lon){
if (flatGroups.containsKey(category)) {

View file

@ -273,7 +273,7 @@ public class GPXUtilities {
}
// Trend channel approach for elevation gain/loss, Hardy 2015-09-22
// Self-adjusting turnarund threshold added for testing 2015-09-25: Current rule is now: "All up/down trends of amplitude <X are ignored to smooth the noise, where X is the maximum observed hdop value of any point which contributed to the current trend (but at least 5 m as the minimum noise threshold)".
// Self-adjusting turnarund threshold added for testing 2015-09-25: Current rule is now: "All up/down trends of amplitude <X are ignored to smooth the noise, where X is the maximum observed DOP value of any point which contributed to the current trend (but at least 5 m as the minimum noise threshold)".
if (!Double.isNaN(point.ele)) {
// Init channel
if (channelBase == 99999) {
@ -286,12 +286,12 @@ public class GPXUtilities {
if (point.ele > channelTop) {
channelTop = point.ele;
if (!Double.isNaN(point.hdop)) {
channelThres = Math.max(channelThres, point.hdop);
channelThres = Math.max(channelThres, 2.0*point.hdop); //Try empirical 2*hdop, may better serve very flat tracks, or high dop tracks
}
} else if (point.ele < channelBottom) {
channelBottom = point.ele;
if (!Double.isNaN(point.hdop)) {
channelThres = Math.max(channelThres, point.hdop);
channelThres = Math.max(channelThres, 2.0*point.hdop);
}
}
// Turnaround (breakout) detection

View file

@ -1,13 +1,14 @@
package net.osmand.plus;
import net.osmand.PlatformUtil;
import net.osmand.access.AccessibleToast;
import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
import net.osmand.plus.osmo.OsMoPlugin;
import android.app.AlarmManager;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
@ -18,17 +19,9 @@ import android.os.IBinder;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.os.SystemClock;
import android.support.v4.app.NotificationCompat.Builder;
import android.support.v7.app.NotificationCompat;
import android.util.Log;
import android.widget.Toast;
import net.osmand.PlatformUtil;
import net.osmand.access.AccessibleToast;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
import net.osmand.plus.osmo.OsMoPlugin;
public class NavigationService extends Service implements LocationListener {
public static class NavigationServiceBinder extends Binder {
@ -36,8 +29,6 @@ public class NavigationService extends Service implements LocationListener {
}
// global id don't conflict with others
private final static int NOTIFICATION_SERVICE_ID = 5;
public final static String OSMAND_STOP_SERVICE_ACTION = "OSMAND_STOP_SERVICE_ACTION"; //$NON-NLS-1$
public static int USED_BY_NAVIGATION = 1;
public static int USED_BY_GPX = 2;
public static int USED_BY_LIVE = 4;
@ -49,16 +40,13 @@ public class NavigationService extends Service implements LocationListener {
private int serviceOffInterval;
private String serviceOffProvider;
private int serviceError;
private OsmandSettings settings;
private Handler handler;
private static WakeLock lockStatic;
private PendingIntent pendingIntent;
private BroadcastReceiver broadcastReceiver;
private BroadcastReceiver saveBroadcastReceiver;
private int usedBy = 0;
protected int usedBy = 0;
private OsmAndLocationProvider locationProvider;
@Override
@ -85,6 +73,10 @@ public class NavigationService extends Service implements LocationListener {
public int getServiceOffInterval() {
return serviceOffInterval;
}
public int getUsedBy() {
return usedBy;
}
public String getServiceOffProvider() {
return serviceOffProvider;
@ -122,7 +114,7 @@ public class NavigationService extends Service implements LocationListener {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
handler = new Handler();
OsmandApplication app = (OsmandApplication) getApplication();
final OsmandApplication app = (OsmandApplication) getApplication();
settings = app.getSettings();
usedBy = intent.getIntExtra(USAGE_INTENT, 0);
if ((usedBy & USED_BY_NAVIGATION) != 0) {
@ -162,71 +154,32 @@ public class NavigationService extends Service implements LocationListener {
// registering icon at top level
// Leave icon visible even for navigation for proper display
// if (!startedForNavigation) {
showNotificationInStatusBar(app);
// }
startForeground(NotificationHelper.NOTIFICATION_SERVICE_ID,
app.getNotificationHelper().buildNotificationInStatusBar().build());
return START_REDELIVER_INTENT;
}
private void showNotificationInStatusBar(OsmandApplication cl) {
broadcastReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (settings.SAVE_GLOBAL_TRACK_TO_GPX.get()) {
settings.SAVE_GLOBAL_TRACK_TO_GPX.set(false);
}
OsMoPlugin osmoPlugin = OsmandPlugin.getEnabledPlugin(OsMoPlugin.class);
if (osmoPlugin != null) {
if (osmoPlugin.getTracker().isEnabledTracker()) {
osmoPlugin.getTracker().disableTracker();
}
}
OsmandMonitoringPlugin monitoringPlugin =
OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class);
if (monitoringPlugin != null) {
monitoringPlugin.stopRecording();
}
NavigationService.this.stopSelf();
}
};
registerReceiver(broadcastReceiver, new IntentFilter(OSMAND_STOP_SERVICE_ACTION));
//Show currently active wake-up interval
int soi = settings.SERVICE_OFF_INTERVAL.get();
String nt = getString(R.string.service_stop_background_service) + ". " + getString(R.string.gps_wake_up_timer) + ": ";
if (soi == 0) {
nt = nt + getString(R.string.int_continuosly);
} else if (soi <= 90000) {
nt = nt + Integer.toString(soi / 1000) + " " + getString(R.string.int_seconds);
} else {
nt = nt + Integer.toString(soi / 1000 / 60) + " " + getString(R.string.int_min);
protected void stopService() {
if (settings.SAVE_GLOBAL_TRACK_TO_GPX.get()) {
settings.SAVE_GLOBAL_TRACK_TO_GPX.set(false);
}
// Notification notification = new Notification(R.drawable.bgs_icon, "", //$NON-NLS-1$
// System.currentTimeMillis());
//
// notification.setLatestEventInfo(this, Version.getAppName(cl) + " " + getString(R.string.osmand_service), nt,
// broadcast);
// notification.flags = Notification.FLAG_NO_CLEAR;
// startForeground(NOTIFICATION_SERVICE_ID, notification);
Intent contentIntent = new Intent(this, MapActivity.class);
PendingIntent contentPendingIntent = PendingIntent.getActivity(this, 0, contentIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
final Builder notificationBuilder = new NotificationCompat.Builder(
this).setContentTitle(Version.getAppName(cl))
.setContentText(getString(R.string.osmand_service))
.setSmallIcon(R.drawable.bgs_icon)
// .setLargeIcon(Helpers.getBitmap(R.drawable.mirakel, getBaseContext()))
.setContentIntent(contentPendingIntent)
.setOngoing(true);
// .addAction(R.drawable.ic_action_rec_stop, stop, stopPendingIntent)
// .addAction(R.drawable.ic_action_save, pause, savePendingIntent);
startForeground(NOTIFICATION_SERVICE_ID, notificationBuilder.build());
OsMoPlugin osmoPlugin = OsmandPlugin.getEnabledPlugin(OsMoPlugin.class);
if (osmoPlugin != null) {
if (osmoPlugin.getTracker().isEnabledTracker()) {
osmoPlugin.getTracker().disableTracker();
}
}
OsmandMonitoringPlugin monitoringPlugin =
OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class);
if (monitoringPlugin != null) {
monitoringPlugin.stopRecording();
}
NavigationService.this.stopSelf();
}
@Override
public void onCreate() {
super.onCreate();
@ -257,21 +210,7 @@ public class NavigationService extends Service implements LocationListener {
AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);
alarmManager.cancel(pendingIntent);
// remove notification
removeNotification();
}
private void removeNotification() {
NotificationManager mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
mNotificationManager.cancel(NOTIFICATION_SERVICE_ID);
if (broadcastReceiver != null) {
unregisterReceiver(broadcastReceiver);
broadcastReceiver = null;
}
if (saveBroadcastReceiver != null) {
unregisterReceiver(saveBroadcastReceiver);
saveBroadcastReceiver = null;
}
((OsmandApplication) getApplication()).getNotificationHelper().removeServiceNotification();
stopForeground(Boolean.TRUE);
}
@ -310,14 +249,16 @@ public class NavigationService extends Service implements LocationListener {
@Override
public void onTaskRemoved(Intent rootIntent) {
if (((OsmandApplication) getApplication()).getNavigationService() != null &&
((OsmandApplication) getApplication()).getSettings().DISABLE_RECORDING_ONCE_APP_KILLED.get()) {
OsmandApplication app = ((OsmandApplication) getApplication());
if (app.getNavigationService() != null &&
app.getSettings().DISABLE_RECORDING_ONCE_APP_KILLED.get()) {
OsMoPlugin plugin = OsmandPlugin.getEnabledPlugin(OsMoPlugin.class);
if (plugin != null) {
if (plugin.getTracker().isEnabledTracker()) {
plugin.getTracker().disableTracker();
}
}
app.getNotificationHelper().removeServiceNotificationCompletely();
NavigationService.this.stopSelf();
}
}

View file

@ -0,0 +1,170 @@
package net.osmand.plus;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.monitoring.OsmandMonitoringPlugin;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.support.v4.app.NotificationCompat.Builder;
import android.support.v7.app.NotificationCompat;
public class NotificationHelper {
public final static int NOTIFICATION_SERVICE_ID = 5;
public final static String OSMAND_STOP_SERVICE_ACTION = "OSMAND_STOP_SERVICE_ACTION"; //$NON-NLS-1$
public final static String OSMAND_STOP_GPX_SERVICE_ACTION = "OSMAND_STOP_GPX_SERVICE_ACTION"; //$NON-NLS-1$
public final static String OSMAND_START_GPX_SERVICE_ACTION = "OSMAND_START_GPX_SERVICE_ACTION"; //$NON-NLS-1$
public final static String OSMAND_SAVE_GPX_SERVICE_ACTION = "OSMAND_SAVE_GPX_SERVICE_ACTION"; //$NON-NLS-1$
private OsmandApplication app;
private BroadcastReceiver saveBroadcastReceiver;
private BroadcastReceiver stopBroadcastReceiver;
private BroadcastReceiver startBroadcastReceiver;
public NotificationHelper(OsmandApplication app) {
this.app = app;
init();
}
private void init() {
saveBroadcastReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
final OsmandMonitoringPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class);
if (plugin != null) {
plugin.saveCurrentTrack();
}
}
};
app.registerReceiver(saveBroadcastReceiver, new IntentFilter(OSMAND_SAVE_GPX_SERVICE_ACTION));
startBroadcastReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
final OsmandMonitoringPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class);
if (plugin != null) {
plugin.startGPXMonitoring(null);
}
}
};
app.registerReceiver(startBroadcastReceiver, new IntentFilter(OSMAND_START_GPX_SERVICE_ACTION));
stopBroadcastReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
final OsmandMonitoringPlugin plugin = OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class);
if (plugin != null) {
plugin.stopRecording();
}
}
};
app.registerReceiver(stopBroadcastReceiver, new IntentFilter(OSMAND_STOP_GPX_SERVICE_ACTION));
}
public Builder buildNotificationInStatusBar() {
NavigationService service = app.getNavigationService();
String notificationText ;
int icon = R.drawable.bgs_icon;
OsmandMonitoringPlugin monitoringPlugin = OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class);
if(monitoringPlugin == null && service == null) {
return null;
}
if (service != null && service.getUsedBy() != NavigationService.USED_BY_GPX) {
int soi = service.getServiceOffInterval();
notificationText = app.getString(R.string.osmand_running_in_background);
String s = "";
if ((service.getUsedBy() & NavigationService.USED_BY_NAVIGATION) != 0) {
if (s.length() > 0) {
s += ", ";
}
s += app.getString(R.string.shared_string_navigation).toLowerCase();
}
if ((service.getUsedBy() & NavigationService.USED_BY_GPX) != 0) {
if (s.length() > 0) {
s += ", ";
}
s += app.getString(R.string.shared_string_trip_recording).toLowerCase();
}
if ((service.getUsedBy() & NavigationService.USED_BY_LIVE) != 0) {
if (s.length() > 0) {
s += ", ";
}
s += app.getString(R.string.osmo);
}
notificationText += " (" + s + "). ";
notificationText += app.getString(R.string.gps_wake_up_timer) + ": ";
if (soi == 0) {
notificationText = notificationText + app.getString(R.string.int_continuosly);
} else if (soi <= 90000) {
notificationText = notificationText + Integer.toString(soi / 1000) + " " + app.getString(R.string.int_seconds);
} else {
notificationText = notificationText + Integer.toString(soi / 1000 / 60) + " " + app.getString(R.string.int_min);
}
} else {
notificationText = app.getString(R.string.shared_string_trip_recording);
float dst = app.getSavingTrackHelper().getDistance();
notificationText += " ("+OsmAndFormatter.getFormattedDistance(dst, app)+")";
icon = R.drawable.ic_action_polygom_dark;
}
Intent contentIntent = new Intent(app, MapActivity.class);
PendingIntent contentPendingIntent = PendingIntent.getActivity(app, 0, contentIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
final Builder notificationBuilder = new NotificationCompat.Builder(app)
.setContentTitle(Version.getAppName(app)).setContentText(notificationText).setSmallIcon(icon)
.setContentIntent(contentPendingIntent).setOngoing(service != null);
if (monitoringPlugin != null) {
Intent saveIntent = new Intent(OSMAND_SAVE_GPX_SERVICE_ACTION);
PendingIntent savePendingIntent = PendingIntent.getBroadcast(app, 0, saveIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
if(service != null && service.getUsedBy() == NavigationService.USED_BY_GPX) {
Intent stopIntent = new Intent(OSMAND_STOP_GPX_SERVICE_ACTION);
PendingIntent stopPendingIntent = PendingIntent.getBroadcast(app, 0, stopIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
notificationBuilder.addAction(R.drawable.ic_action_rec_stop,
app.getString(R.string.shared_string_control_stop), stopPendingIntent);
notificationBuilder.addAction(R.drawable.ic_action_save, app.getString(R.string.shared_string_save),
savePendingIntent);
} else if(service == null) {
Intent startIntent = new Intent(OSMAND_START_GPX_SERVICE_ACTION);
PendingIntent startPendingIntent = PendingIntent.getBroadcast(app, 0, startIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
notificationBuilder.addAction(R.drawable.ic_action_rec_start,
app.getString(R.string.shared_string_control_start), startPendingIntent);
notificationBuilder.addAction(R.drawable.ic_action_save, app.getString(R.string.shared_string_save),
savePendingIntent);
}
}
return notificationBuilder;
}
public void showNotification() {
NotificationManager mNotificationManager = (NotificationManager) app.getSystemService(Context.NOTIFICATION_SERVICE);
Builder newNotification = buildNotificationInStatusBar();
if(newNotification != null) {
mNotificationManager.notify(NOTIFICATION_SERVICE_ID, newNotification.build());
}
}
public void removeServiceNotification() {
NotificationManager mNotificationManager = (NotificationManager) app.getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.cancel( NOTIFICATION_SERVICE_ID);
Builder newNotification = buildNotificationInStatusBar();
if(newNotification != null) {
mNotificationManager.notify(NOTIFICATION_SERVICE_ID, newNotification.build());
}
}
public void removeServiceNotificationCompletely() {
NotificationManager mNotificationManager = (NotificationManager) app.getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.cancel( NOTIFICATION_SERVICE_ID);
}
}

View file

@ -89,6 +89,7 @@ public class OsmandApplication extends Application {
CommandPlayer player;
GpxSelectionHelper selectedGpxHelper;
SavingTrackHelper savingTrackHelper;
NotificationHelper notificationHelper;
LiveMonitoringHelper liveMonitoringHelper;
TargetPointsHelper targetPointsHelper;
WaypointHelper waypointHelper;
@ -165,7 +166,7 @@ public class OsmandApplication extends Application {
public IconsCache getIconsCache() {
return iconsCache;
}
@Override
public void onTerminate() {
super.onTerminate();
@ -175,6 +176,7 @@ public class OsmandApplication extends Application {
if(DashRateUsFragment.shouldShow(osmandSettings)) {
osmandSettings.RATE_US_STATE.set(DashRateUsFragment.RateUsState.IGNORED);
}
getNotificationHelper().removeServiceNotification();
}
public RendererRegistry getRendererRegistry() {
@ -218,6 +220,10 @@ public class OsmandApplication extends Application {
public SavingTrackHelper getSavingTrackHelper() {
return savingTrackHelper;
}
public NotificationHelper getNotificationHelper() {
return notificationHelper;
}
public LiveMonitoringHelper getLiveMonitoringHelper() {
return liveMonitoringHelper;
@ -699,7 +705,8 @@ public class OsmandApplication extends Application {
//TODO: fallback to custom USED_BY_GPX interval in case all other sleep mode purposes have been stopped
getSettings().SERVICE_OFF_INTERVAL.set(0);
getNavigationService().addUsageIntent(intent);
}
getNotificationHelper().showNotification();
}
}

View file

@ -182,6 +182,7 @@ public class TargetPointsHelper {
if (sz > 0) {
settings.deleteIntermediatePoint(sz - 1);
pointToNavigate = intermediatePoints.remove(sz - 1);
pointToNavigate.intermediate = false;
settings.setPointToNavigate(pointToNavigate.getLatitude(), pointToNavigate.getLongitude(),
pointToNavigate.pointDescription);
}

View file

@ -66,6 +66,7 @@ import net.osmand.plus.dashboard.DashboardOnMap;
import net.osmand.plus.helpers.GpxImportHelper;
import net.osmand.plus.helpers.WakeLockHelper;
import net.osmand.plus.mapcontextmenu.MapContextMenu;
import net.osmand.plus.mapcontextmenu.editors.FavoritePointEditor;
import net.osmand.plus.render.RendererRegistry;
import net.osmand.plus.resources.ResourceManager;
import net.osmand.plus.routing.RoutingHelper;
@ -126,6 +127,7 @@ public class MapActivity extends AccessibleActivity {
private DashboardOnMap dashboardOnMap = new DashboardOnMap(this);
private MapContextMenu contextMenuOnMap;
private FavoritePointEditor favoritePointEditor;
private AppInitializeListener initListener;
private IMapDownloaderCallback downloaderCallback;
private DrawerLayout drawerLayout;
@ -638,6 +640,7 @@ public class MapActivity extends AccessibleActivity {
protected void onStart() {
super.onStart();
wakeLockHelper.onStart(this);
getMyApplication().getNotificationHelper().showNotification();
}
protected void setProgressDlg(Dialog progressDlg) {
@ -668,10 +671,14 @@ public class MapActivity extends AccessibleActivity {
getMyApplication().unsubscribeInitListener(initListener);
mapViewTrackingUtilities.setMapView(null);
cancelNotification();
if(getMyApplication().getNavigationService() == null) {
getMyApplication().getNotificationHelper().removeServiceNotificationCompletely();
}
app.getResourceManager().getMapTileDownloader().removeDownloaderCallback(mapView);
if (atlasMapRendererView != null) {
atlasMapRendererView.handleOnDestroy();
}
}
private void cancelNotification() {
@ -978,6 +985,13 @@ public class MapActivity extends AccessibleActivity {
return contextMenuOnMap;
}
public FavoritePointEditor getFavoritePointEditor() {
if (favoritePointEditor == null) {
favoritePointEditor = new FavoritePointEditor(app, this);
}
return favoritePointEditor;
}
public void openDrawer() {
drawerLayout.openDrawer(Gravity.LEFT);
}

View file

@ -1,24 +1,10 @@
package net.osmand.plus.activities;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.PointF;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import java.io.File;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import net.londatiga.android.ActionItem;
import net.londatiga.android.QuickAction;
@ -59,11 +45,24 @@ import net.osmand.util.MapUtils;
import org.apache.commons.logging.Log;
import java.io.File;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
public class MapActivityActions implements DialogProvider {
private static final Log LOG = PlatformUtil.getLog(MapActivityActions.class);

View file

@ -349,6 +349,7 @@ public class SavingTrackHelper extends SQLiteOpenHelper {
if (record) {
insertData(location.getLatitude(), location.getLongitude(), location.getAltitude(), location.getSpeed(),
location.getAccuracy(), locationTime, settings);
ctx.getNotificationHelper().showNotification();
}
}

View file

@ -370,9 +370,6 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
}
misc.addPreference(nativeCheckbox);
final CheckBoxPreference openGlRender = createCheckBoxPreference(settings.USE_OPENGL_RENDER, R.string.use_opengl_render,R.string.use_opengl_render_descr);
misc.addPreference(openGlRender);
int nav = getResources().getConfiguration().navigation;
if (nav == Configuration.NAVIGATION_DPAD || nav == Configuration.NAVIGATION_TRACKBALL ||
nav == Configuration.NAVIGATION_WHEEL ||
@ -457,9 +454,10 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
@Override
public void onClick(DialogInterface dialog, int which) {
Intent intent = getIntent();
finish();
startActivity(intent);
android.os.Process.killProcess(android.os.Process.myPid());
// Intent intent = getIntent();
// finish();
// startActivity(intent);
}
});
bld.show();

View file

@ -34,8 +34,7 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
private DashboardOnMap dashboard;
private OsmandSettings settings;
private OsmandApplication app;
// by default turn off causing unexpected movements due to network establishing
private boolean isMapLinkedToLocation = false;
private boolean isMapLinkedToLocation = true;
private boolean followingMode;
private boolean routePlanningMode;
private boolean showViewAngle = false;

View file

@ -53,6 +53,10 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity {
R.string.use_magnetic_sensor,
R.string.use_magnetic_sensor_descr));
final CheckBoxPreference openGlRender = createCheckBoxPreference(settings.USE_OPENGL_RENDER, R.string.use_opengl_render,R.string.use_opengl_render_descr);
cat.addPreference(openGlRender);
cat.addPreference(createCheckBoxPreference(settings.BETA_TESTING_LIVE_UPDATES,
"Live updates", "Beta testing for live updates"));
Preference pref = new Preference(this);

View file

@ -167,14 +167,14 @@ public class TestVoiceActivity extends OsmandActionBarActivity {
}
private void addButtons(final LinearLayout ll, CommandPlayer p) {
addButton(ll, "New route has been calculated (11350m & 2h30m5sec)", builder(p).newRouteCalculated(11350, 9005));
addButton(ll, "New route has been calculated (150m & 2m5sec)", builder(p).newRouteCalculated(150, 125));
addButton(ll, "New route has been calculated (11350m & 2h3m5sec)", builder(p).newRouteCalculated(11350, 7385));
addButton(ll, "New route has been calculated (150m & 1m5sec)", builder(p).newRouteCalculated(150, 65));
addButton(ll, "Route recalculated (23150m & 350sec)", builder(p).routeRecalculated(23150, 350));
addButton(ll, "After 1520m turn slightly left", builder(p).prepareTurn(AbstractPrologCommandPlayer.A_LEFT_SL, 1520, street(p, "")));
addButton(ll, "In 450m turn sharply left onto 'Hauptstra"+"\u00df"+"e', then bear right", builder(p).turn(AbstractPrologCommandPlayer.A_LEFT_SH, 450, street(p, "Hauptstra<EFBFBD>e")).then().bearRight(street(p, "")));
addButton(ll, "Turn left, then in 100m turn slightly right", builder(p).turn(AbstractPrologCommandPlayer.A_LEFT, street(p, "")).then().turn(AbstractPrologCommandPlayer.A_RIGHT_SL, 100, street(p, "")));
addButton(ll, "After 3100 turn right onto 'SR 80'", builder(p).prepareTurn(AbstractPrologCommandPlayer.A_RIGHT, 3100, street(p, "SR 80")));
addButton(ll, "After 3100m turn right onto 'SR 80'", builder(p).prepareTurn(AbstractPrologCommandPlayer.A_RIGHT, 3100, street(p, "SR 80")));
addButton(ll, "In 370m turn slightly right onto 'F23' 'Main Street', then bear left", builder(p).turn(AbstractPrologCommandPlayer.A_RIGHT_SL, 370, street(p, "Main Street", "F23")).then().bearLeft(street(p, "")));
addButton(ll, "Turn sharply right onto 'Main Street'", builder(p).turn(AbstractPrologCommandPlayer.A_RIGHT_SH, street(p, "Main Street")));

View file

@ -21,9 +21,9 @@ import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.base.FavoriteImageDrawable;
import net.osmand.plus.mapcontextmenu.sections.AmenityInfoMenuController;
import net.osmand.plus.mapcontextmenu.sections.FavouritePointMenuController;
import net.osmand.plus.mapcontextmenu.sections.MenuController;
import net.osmand.plus.mapcontextmenu.details.AmenityMenuController;
import net.osmand.plus.mapcontextmenu.details.FavouritePointMenuController;
import net.osmand.plus.mapcontextmenu.details.MenuController;
import net.osmand.plus.render.RenderingIcons;
import net.osmand.plus.routing.RoutingHelper;
import net.osmand.plus.views.OsmandMapLayer;
@ -119,7 +119,7 @@ public class MapContextMenu {
Amenity a = (Amenity) object;
if (a.getSubType() != null && a.getType() != null) {
PoiType pt = a.getType().getPoiTypeByKeyName(a.getSubType());
if (pt != null && pt.getOsmTag().equals("place")) {
if (pt != null && pt.getOsmTag() != null && pt.getOsmTag().equals("place")) {
res = false;
}
}
@ -290,7 +290,7 @@ public class MapContextMenu {
MenuController menuController = null;
if (object != null) {
if (object instanceof Amenity) {
menuController = new AmenityInfoMenuController(app, activity, (Amenity)object);
menuController = new AmenityMenuController(app, activity, (Amenity)object);
if (!Algorithms.isEmpty(typeStr)) {
menuController.addPlainMenuItem(R.drawable.ic_action_info_dark, typeStr);
}
@ -310,9 +310,11 @@ public class MapContextMenu {
public void buttonFavoritePressed() {
if (object != null && object instanceof FavouritePoint) {
mapActivity.getMapActions().editFavoritePoint((FavouritePoint)object);
mapActivity.getFavoritePointEditor().edit((FavouritePoint)object);
//mapActivity.getMapActions().editFavoritePoint((FavouritePoint) object);
} else {
mapActivity.getMapActions().addFavouritePoint(pointDescription.getLat(), pointDescription.getLon());
mapActivity.getFavoritePointEditor().add(pointDescription);
//mapActivity.getMapActions().addFavouritePoint(pointDescription.getLat(), pointDescription.getLon());
}
}

View file

@ -33,14 +33,14 @@ import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.mapcontextmenu.sections.MenuController;
import net.osmand.plus.mapcontextmenu.details.MenuController;
import net.osmand.plus.views.AnimateDraggingMapThread;
import org.apache.commons.logging.Log;
import static android.util.TypedValue.COMPLEX_UNIT_DIP;
import static net.osmand.plus.mapcontextmenu.sections.MenuBuilder.SHADOW_HEIGHT_BOTTOM_DP;
import static net.osmand.plus.mapcontextmenu.sections.MenuBuilder.SHADOW_HEIGHT_TOP_DP;
import static net.osmand.plus.mapcontextmenu.details.MenuBuilder.SHADOW_HEIGHT_BOTTOM_DP;
import static net.osmand.plus.mapcontextmenu.details.MenuBuilder.SHADOW_HEIGHT_TOP_DP;
public class MapContextMenuFragment extends Fragment {

View file

@ -1,4 +1,4 @@
package net.osmand.plus.mapcontextmenu.sections;
package net.osmand.plus.mapcontextmenu.details;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
@ -27,11 +27,11 @@ import java.util.Map;
import static android.util.TypedValue.COMPLEX_UNIT_DIP;
public class AmenityInfoMenuBuilder extends MenuBuilder {
public class AmenityMenuBuilder extends MenuBuilder {
private final Amenity amenity;
public AmenityInfoMenuBuilder(OsmandApplication app, final Amenity amenity) {
public AmenityMenuBuilder(OsmandApplication app, final Amenity amenity) {
super(app);
this.amenity = amenity;
}

View file

@ -1,14 +1,14 @@
package net.osmand.plus.mapcontextmenu.sections;
package net.osmand.plus.mapcontextmenu.details;
import android.app.Activity;
import net.osmand.data.Amenity;
import net.osmand.plus.OsmandApplication;
public class AmenityInfoMenuController extends MenuController {
public class AmenityMenuController extends MenuController {
public AmenityInfoMenuController(OsmandApplication app, Activity activity, final Amenity amenity) {
super(new AmenityInfoMenuBuilder(app, amenity), activity);
public AmenityMenuController(OsmandApplication app, Activity activity, final Amenity amenity) {
super(new AmenityMenuBuilder(app, amenity), activity);
}
@Override

View file

@ -1,4 +1,4 @@
package net.osmand.plus.mapcontextmenu.sections;
package net.osmand.plus.mapcontextmenu.details;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
@ -70,23 +70,23 @@ public class FavouritePointMenuBuilder extends MenuBuilder {
textView.setAutoLinkMask(Linkify.ALL);
textView.setLinksClickable(true);
if (isDescription) {
textView.setMinLines(1);
textView.setMaxLines(5);
}
// if (isDescription) {
// textView.setMinLines(1);
// textView.setMaxLines(5);
// }
textView.setText(text);
if (textColor > 0) {
textView.setTextColor(view.getResources().getColor(textColor));
}
if (isDescription) {
textView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
//todo: implement edit fav description dialog
//POIMapLayer.showDescriptionDialog(view.getContext(), app, fav);
}
});
}
// if (isDescription) {
// textView.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// //todo: implement edit fav description dialog
// //POIMapLayer.showDescriptionDialog(view.getContext(), app, fav);
// }
// });
// }
LinearLayout.LayoutParams llTextViewParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
llTextViewParams.setMargins(0, 0, dpToPx(10f), 0);

View file

@ -1,4 +1,4 @@
package net.osmand.plus.mapcontextmenu.sections;
package net.osmand.plus.mapcontextmenu.details;
import android.app.Activity;

View file

@ -1,4 +1,4 @@
package net.osmand.plus.mapcontextmenu.sections;
package net.osmand.plus.mapcontextmenu.details;
import android.content.Context;
import android.graphics.Bitmap;

View file

@ -1,4 +1,4 @@
package net.osmand.plus.mapcontextmenu.sections;
package net.osmand.plus.mapcontextmenu.details;
import android.app.Activity;
import android.view.View;

View file

@ -0,0 +1,58 @@
package net.osmand.plus.mapcontextmenu.editors;
import android.os.Bundle;
import net.osmand.data.FavouritePoint;
import net.osmand.data.PointDescription;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.activities.MapActivity;
public class FavoritePointEditor extends PointEditor {
private FavouritePoint favorite;
public static final String FRAGMENT_NAME = "FavoritePointEditorFragment";
public FavoritePointEditor(OsmandApplication app, MapActivity mapActivity) {
super(app, mapActivity);
}
@Override
public void saveState(Bundle bundle) {
}
@Override
public void restoreState(Bundle bundle) {
}
@Override
public String getFragmentName() {
return FRAGMENT_NAME;
}
public FavouritePoint getFavorite() {
return favorite;
}
public void add(PointDescription point) {
if (point == null) {
return;
}
isNew = true;
favorite = new FavouritePoint(point.getLat(), point.getLon(), point.getName(), app.getSettings().LAST_FAV_CATEGORY_ENTERED.get());
favorite.setDescription("");
FavoritePointEditorFragment.showInstance(mapActivity);
}
public void edit(FavouritePoint favorite) {
if (favorite == null) {
return;
}
isNew = false;
this.favorite = favorite;
FavoritePointEditorFragment.showInstance(mapActivity);
}
}

View file

@ -0,0 +1,180 @@
package net.osmand.plus.mapcontextmenu.editors;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.res.Resources;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import net.osmand.data.FavouritePoint;
import net.osmand.plus.FavouritesDbHelper;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.base.FavoriteImageDrawable;
import net.osmand.util.Algorithms;
public class FavoritePointEditorFragment extends PointEditorFragment {
private FavoritePointEditor editor;
private FavouritePoint favorite;
FavouritesDbHelper helper;
private boolean saved;
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
helper = getMyApplication().getFavorites();
editor = getMapActivity().getFavoritePointEditor();
favorite = editor.getFavorite();
}
@Override
public PointEditor getEditor() {
return editor;
}
@Override
public String getToolbarTitle() {
if (editor.isNew()) {
return getMapActivity().getResources().getString(R.string.favourites_context_menu_add);
} else {
return getMapActivity().getResources().getString(R.string.favourites_context_menu_edit);
}
}
public static void showInstance(final MapActivity mapActivity) {
FavoritePointEditor editor = mapActivity.getFavoritePointEditor();
//int slideInAnim = editor.getSlideInAnimation();
//int slideOutAnim = editor.getSlideOutAnimation();
FavoritePointEditorFragment fragment = new FavoritePointEditorFragment();
mapActivity.getSupportFragmentManager().beginTransaction()
//.setCustomAnimations(slideInAnim, slideOutAnim, slideInAnim, slideOutAnim)
.add(R.id.fragmentContainer, fragment, editor.getFragmentName())
.addToBackStack(null).commit();
}
@Override
protected boolean wasSaved() {
return saved;
}
@Override
protected void save(final boolean needDismiss) {
final FavouritePoint point = new FavouritePoint(favorite.getLatitude(), favorite.getLongitude(), getName(), getCategory());
point.setDescription(getDescription());
AlertDialog.Builder builder = FavouritesDbHelper.checkDuplicates(point, helper, getMapActivity());
if (favorite.getName().equals(point.getName()) &&
favorite.getCategory().equals(point.getCategory()) &&
Algorithms.stringsEqual(favorite.getDescription(), point.getDescription())) {
if (needDismiss) {
dismiss(true);
}
return;
}
if (builder != null) {
builder.setPositiveButton(R.string.shared_string_ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (editor.isNew()) {
doAddFavorite(point.getName(), point.getCategory(), point.getDescription());
} else {
helper.editFavouriteName(favorite, point.getName(), point.getCategory(), point.getDescription());
}
getMapActivity().getMapView().refreshMap(true);
if (needDismiss) {
dismiss(true);
}
}
});
builder.create().show();
} else {
if (editor.isNew()) {
doAddFavorite(point.getName(), point.getCategory(), point.getDescription());
} else {
helper.editFavouriteName(favorite, point.getName(), point.getCategory(), point.getDescription());
}
getMapActivity().getMapView().refreshMap(true);
if (needDismiss) {
dismiss(true);
}
}
saved = true;
}
private void doAddFavorite(String name, String category, String description) {
favorite.setName(name);
favorite.setCategory(category);
favorite.setDescription(description);
helper.addFavourite(favorite);
}
@Override
protected void delete(final boolean needDismiss) {
final Resources resources = this.getResources();
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setMessage(getString(R.string.favourites_remove_dialog_msg, favorite.getName()));
builder.setNegativeButton(R.string.shared_string_no, null);
builder.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
helper.deleteFavourite(favorite);
if (needDismiss) {
dismiss(true);
}
getMapActivity().getMapView().refreshMap(true);
}
});
builder.create().show();
}
@Override
public String getHeaderText() {
return getMapActivity().getResources().getString(R.string.favourites_edit_dialog_title);
}
@Override
public String getNameValue() {
return favorite.getName();
}
@Override
public String getCategoryValue() {
return favorite.getCategory();
}
@Override
public String getDescriptionValue() {
return favorite.getDescription();
}
@Override
public Drawable getNameIcon() {
return FavoriteImageDrawable.getOrCreate(getMapActivity(), favorite.getColor(), getMapActivity().getMapView().getCurrentRotatedTileBox().getDensity());
}
@Override
public Drawable getCategoryIcon() {
FavouritesDbHelper helper = getMyApplication().getFavorites();
FavouritesDbHelper.FavoriteGroup group = helper.getGroup(favorite);
if (group != null) {
return getIcon(R.drawable.ic_action_folder_stroke, group.color);
} else {
return null;
}
}
public Drawable getIcon(int resId, int color) {
OsmandApplication app = getMyApplication();
Drawable d = app.getResources().getDrawable(resId).mutate();
d.clearColorFilter();
d.setColorFilter(color, PorterDuff.Mode.SRC_IN);
return d;
}
}

View file

@ -0,0 +1,63 @@
package net.osmand.plus.mapcontextmenu.editors;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.helpers.AndroidUiHelper;
public abstract class PointEditor {
protected OsmandApplication app;
protected final MapActivity mapActivity;
protected Object object;
protected boolean isNew;
private boolean portraitMode;
private boolean largeDevice;
public PointEditor(OsmandApplication app, MapActivity mapActivity) {
this.app = app;
this.mapActivity = mapActivity;
portraitMode = AndroidUiHelper.isOrientationPortrait(mapActivity);
largeDevice = AndroidUiHelper.isXLargeDevice(mapActivity);
}
public boolean isNew() {
return isNew;
}
public boolean isLandscapeLayout() {
return !portraitMode && !largeDevice;
}
public int getSlideInAnimation() {
if (isLandscapeLayout()) {
return R.anim.slide_in_left;
} else {
return R.anim.slide_in_bottom;
}
}
public int getSlideOutAnimation() {
if (isLandscapeLayout()) {
return R.anim.slide_out_left;
} else {
return R.anim.slide_out_bottom;
}
}
public abstract void saveState(Bundle bundle);
public abstract void restoreState(Bundle bundle);
public abstract String getFragmentName();
public void hide() {
Fragment fragment = mapActivity.getSupportFragmentManager().findFragmentByTag(getFragmentName());
if (fragment != null)
((PointEditorFragment)fragment).dismiss();
}
}

View file

@ -0,0 +1,215 @@
package net.osmand.plus.mapcontextmenu.editors;
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v7.widget.Toolbar;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import net.osmand.plus.FavouritesDbHelper;
import net.osmand.plus.IconsCache;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.widgets.AutoCompleteTextViewEx;
import net.osmand.util.Algorithms;
import java.util.List;
public abstract class PointEditorFragment extends Fragment {
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
getEditor().saveState(outState);
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
if (savedInstanceState != null)
getEditor().restoreState(savedInstanceState);
View view = inflater.inflate(R.layout.point_editor_fragment, container, false);
Toolbar toolbar = (Toolbar) view.findViewById(R.id.toolbar);
toolbar.setTitle(getToolbarTitle());
toolbar.setNavigationIcon(getMyApplication().getIconsCache().getIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha));
toolbar.setTitleTextColor(getResources().getColor(getResIdFromAttribute(getMapActivity(), R.attr.pstsTextColor)));
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dismiss();
}
});
Button saveButton = (Button)toolbar.findViewById(R.id.save_button);
saveButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
savePressed();
}
});
ImageButton deleteButton = (ImageButton)toolbar.findViewById(R.id.delete_button);
deleteButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
deletePressed();
}
});
if (getEditor().isNew()) {
deleteButton.setVisibility(View.GONE);
} else {
saveButton.setVisibility(View.GONE);
}
TextView headerCaption = (TextView) view.findViewById(R.id.header_caption);
headerCaption.setText(getHeaderText());
TextView nameCaption = (TextView) view.findViewById(R.id.name_caption);
nameCaption.setText(getNameText());
TextView categoryCaption = (TextView) view.findViewById(R.id.category_caption);
categoryCaption.setText(getCategoryText());
EditText nameEdit = (EditText) view.findViewById(R.id.name_edit);
nameEdit.setText(getNameValue());
AutoCompleteTextViewEx categoryEdit = (AutoCompleteTextViewEx) view.findViewById(R.id.category_edit);
categoryEdit.setText(getCategoryValue());
categoryEdit.setThreshold(1);
final FavouritesDbHelper helper = getMyApplication().getFavorites();
List<FavouritesDbHelper.FavoriteGroup> gs = helper.getFavoriteGroups();
String[] list = new String[gs.size()];
for(int i = 0; i < list.length; i++) {
list[i] =gs.get(i).name;
}
categoryEdit.setAdapter(new ArrayAdapter<>(getMapActivity(), R.layout.list_textview, list));
EditText descriptionEdit = (EditText) view.findViewById(R.id.description_edit);
if (getDescriptionValue() != null) {
descriptionEdit.setText(getDescriptionValue());
}
ImageView nameImage = (ImageView) view.findViewById(R.id.name_image);
nameImage.setImageDrawable(getNameIcon());
ImageView categoryImage = (ImageView) view.findViewById(R.id.category_image);
categoryImage.setImageDrawable(getCategoryIcon());
ImageView descriptionImage = (ImageView) view.findViewById(R.id.description_image);
descriptionImage.setImageDrawable(getRowIcon(R.drawable.ic_action_note_dark));
return view;
}
public Drawable getRowIcon(int iconId) {
IconsCache iconsCache = getMyApplication().getIconsCache();
boolean light = getMyApplication().getSettings().isLightContent();
return iconsCache.getIcon(iconId,
light ? R.color.icon_color : R.color.icon_color_light);
}
@Override
public void onDestroyView() {
if (!wasSaved() && !getEditor().isNew()) {
save(false);
}
super.onDestroyView();
}
protected void savePressed() {
save(true);
}
protected void deletePressed() {
delete(true);
}
protected abstract boolean wasSaved();
protected abstract void save(boolean needDismiss);
protected abstract void delete(boolean needDismiss);
static int getResIdFromAttribute(final Context ctx, final int attr) {
if (attr == 0)
return 0;
final TypedValue typedvalueattr = new TypedValue();
ctx.getTheme().resolveAttribute(attr, typedvalueattr, true);
return typedvalueattr.resourceId;
}
public abstract PointEditor getEditor();
public abstract String getToolbarTitle();
protected MapActivity getMapActivity() {
return (MapActivity)getActivity();
}
protected OsmandApplication getMyApplication() {
if (getActivity() == null) {
return null;
}
return (OsmandApplication) getActivity().getApplication();
}
public void dismiss() {
dismiss(false);
}
public void dismiss(boolean includingMenu) {
if (includingMenu) {
//getMapActivity().getSupportFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
getMapActivity().getSupportFragmentManager().popBackStack();
getMapActivity().getMapLayers().getContextMenuLayer().hideMapContextMenuMarker();
getMapActivity().getContextMenu().hide();
} else {
getMapActivity().getSupportFragmentManager().popBackStack();
}
}
public abstract String getHeaderText();
public String getNameText() {
return getMapActivity().getResources().getString(R.string.favourites_edit_dialog_name);
}
public String getCategoryText() {
return getMapActivity().getResources().getString(R.string.favourites_edit_dialog_category);
}
public abstract String getNameValue();
public abstract String getCategoryValue();
public abstract String getDescriptionValue();
public abstract Drawable getNameIcon();
public abstract Drawable getCategoryIcon();
public String getName() {
EditText nameEdit = (EditText) getView().findViewById(R.id.name_edit);
return nameEdit.getText().toString().trim();
}
public String getCategory() {
AutoCompleteTextViewEx categoryEdit = (AutoCompleteTextViewEx) getView().findViewById(R.id.category_edit);
return categoryEdit.getText().toString().trim();
}
public String getDescription() {
EditText descriptionEdit = (EditText) getView().findViewById(R.id.description_edit);
String res = descriptionEdit.getText().toString().trim();
return Algorithms.isEmpty(res) ? null : res;
}
}

View file

@ -1,29 +1,8 @@
package net.osmand.plus.monitoring;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.content.IntentFilter;
import android.support.v4.app.NotificationCompat;
import android.util.DisplayMetrics;
import android.view.View;
import android.view.WindowManager;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.TextView;
import gnu.trove.list.array.TIntArrayList;
import java.util.List;
import net.osmand.Location;
import net.osmand.ValueHolder;
@ -44,16 +23,27 @@ import net.osmand.plus.views.MapInfoLayer;
import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
import net.osmand.plus.views.OsmandMapTileView;
import net.osmand.plus.views.mapwidgets.TextInfoWidget;
import java.text.DateFormat;
import java.util.Date;
import java.util.List;
import gnu.trove.list.array.TIntArrayList;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.util.DisplayMetrics;
import android.view.View;
import android.view.WindowManager;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.TextView;
public class OsmandMonitoringPlugin extends OsmandPlugin {
private static final String ID = "osmand.monitoring";
private static final int notificationId = ID.hashCode();
public final static String OSMAND_SAVE_SERVICE_ACTION = "OSMAND_SAVE_SERVICE_ACTION";
private OsmandSettings settings;
private OsmandApplication app;
@ -327,11 +317,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
SavingTrackHelper helper = app.getSavingTrackHelper();
helper.saveDataToGpx(app.getAppCustomization().getTracksDir());
helper.close();
DateFormat timeFormat = android.text.format.DateFormat.getTimeFormat(app);
final String formattedTime =
timeFormat.format(new Date(helper.getLastTimeUpdated()));
showNotification(app, String.format(app.getString(R.string.saved_at_time),
formattedTime));
app.getNotificationHelper().showNotification();
} finally {
isSaving = false;
}
@ -344,10 +330,6 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
public void stopRecording(){
settings.SAVE_GLOBAL_TRACK_TO_GPX.set(false);
if (app.getNavigationService() != null) {
NotificationManager mNotificationManager =
(NotificationManager) app.getNavigationService()
.getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.cancel(notificationId);
app.getNavigationService().stopIfNeeded(app, NavigationService.USED_BY_GPX);
}
}
@ -372,13 +354,9 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
}
app.startNavigationService(NavigationService.USED_BY_GPX);
showNotification(map, null);
}
};
if(choice.value) {
if(choice.value || map == null) {
runnable.run();
} else {
showIntervalChooseDialog(map, app.getString(R.string.save_track_interval_globally) + " : %s",
@ -392,32 +370,6 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
}
}
private static void showNotification(Context context, String contentText) {
String stop = context.getResources().getString(R.string.shared_string_control_stop);
Intent stopIntent = new Intent(NavigationService.OSMAND_STOP_SERVICE_ACTION);
PendingIntent stopPendingIntent = PendingIntent.getBroadcast(context, 0, stopIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
String save = context.getResources().getString(R.string.shared_string_save);
Intent saveIntent = new Intent(OSMAND_SAVE_SERVICE_ACTION);
PendingIntent savePendingIntent = PendingIntent.getBroadcast(context, 0, saveIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
BroadcastReceiver saveBroadcastReceiver = new SaveBroadcastReceiver();
context.registerReceiver(saveBroadcastReceiver, new IntentFilter(OSMAND_SAVE_SERVICE_ACTION));
final NotificationCompat.Builder notificationBuilder =
new android.support.v7.app.NotificationCompat.Builder(context)
.setContentTitle(context.getResources().getString(R.string.map_widget_monitoring))
.setContentText(contentText)
.setSmallIcon(R.drawable.ic_action_polygom_dark)
// .setLargeIcon(Helpers.getBitmap(R.drawable.mirakel, getBaseContext()))
.setOngoing(true)
.addAction(R.drawable.ic_action_rec_stop, stop, stopPendingIntent)
.addAction(R.drawable.ic_action_save, save, savePendingIntent);
NotificationManager mNotificationManager =
(NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(notificationId, notificationBuilder.build());
}
public static void showIntervalChooseDialog(final Context uiCtx, final String patternMsg,
String title, final int[] seconds, final int[] minutes, final ValueHolder<Boolean> choice, final ValueHolder<Integer> v, OnClickListener onclick){
@ -519,14 +471,4 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
R.string.record_plugin_name, 11);
}
private static class SaveBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
final OsmandMonitoringPlugin plugin = OsmandPlugin
.getEnabledPlugin(OsmandMonitoringPlugin.class);
if (plugin != null) {
plugin.saveCurrentTrack();
}
}
}
}

View file

@ -1,28 +1,20 @@
package net.osmand.plus.monitoring;
import net.osmand.plus.OsmAndTaskManager.OsmAndTaskRunnable;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.SavingTrackHelper;
import net.osmand.plus.activities.SettingsBaseActivity;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceCategory;
import android.preference.PreferenceScreen;
import android.view.Window;
import net.osmand.plus.NavigationService;
import net.osmand.plus.OsmAndTaskManager.OsmAndTaskRunnable;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
import net.osmand.plus.activities.SavingTrackHelper;
import net.osmand.plus.activities.SettingsBaseActivity;
public class SettingsMonitoringActivity extends SettingsBaseActivity {
private CheckBoxPreference routeServiceEnabled;
@ -30,7 +22,6 @@ public class SettingsMonitoringActivity extends SettingsBaseActivity {
public static final int[] BG_SECONDS = new int[]{0, 30, 60, 90};
public static final int[] BG_MINUTES = new int[]{2, 3, 5, 10, 15, 30, 60, 90};
private final static boolean REGISTER_BG_SETTINGS = false;
private static final int[] SECONDS = OsmandMonitoringPlugin.SECONDS;
private static final int[] MINUTES = OsmandMonitoringPlugin.MINUTES;
@ -49,9 +40,6 @@ public class SettingsMonitoringActivity extends SettingsBaseActivity {
createLoggingSection(grp);
createLiveSection(grp);
if(REGISTER_BG_SETTINGS) {
registerBackgroundSettings();
}
profileDialog();
}
@ -152,51 +140,7 @@ public class SettingsMonitoringActivity extends SettingsBaseActivity {
}
}
private void registerBackgroundSettings() {
PreferenceCategory cat = new PreferenceCategory(this);
cat.setTitle(R.string.osmand_service);
getPreferenceScreen().addPreference(cat);
if(broadcastReceiver != null) {
unregisterReceiver(broadcastReceiver);
broadcastReceiver = null;
}
routeServiceEnabled = new CheckBoxPreference(this);
broadcastReceiver = new BroadcastReceiver(){
@Override
public void onReceive(Context context, Intent intent) {
routeServiceEnabled.setChecked(false);
}
};
registerReceiver(broadcastReceiver, new IntentFilter(NavigationService.OSMAND_STOP_SERVICE_ACTION));
routeServiceEnabled.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
Intent serviceIntent = new Intent(SettingsMonitoringActivity.this, NavigationService.class);
if ((Boolean) newValue) {
ComponentName name = startService(serviceIntent);
if (name == null) {
routeServiceEnabled.setChecked(getMyApplication().getNavigationService() != null);
}
} else {
if(!stopService(serviceIntent)){
routeServiceEnabled.setChecked(getMyApplication().getNavigationService() != null);
}
}
return true;
}
});
routeServiceEnabled.setTitle(R.string.background_router_service);
routeServiceEnabled.setSummary(R.string.background_router_service_descr);
routeServiceEnabled.setKey(OsmandSettings.SERVICE_OFF_ENABLED);
cat.addPreference(routeServiceEnabled);
cat.addPreference(createTimeListPreference(settings.SERVICE_OFF_INTERVAL, BG_SECONDS, BG_MINUTES, 1000,
R.string.background_service_int, R.string.background_service_int_descr));
}
}

View file

@ -51,7 +51,6 @@ import android.graphics.Shader.TileMode;
import android.os.Handler;
import android.os.Looper;
import android.util.DisplayMetrics;
import android.util.FloatMath;
import android.view.WindowManager;
public class OsmandRenderer {
@ -184,8 +183,8 @@ public class OsmandRenderer {
Bitmap bmp, RenderingRuleSearchRequest render, final MapTileDownloader mapTileDownloader) {
long now = System.currentTimeMillis();
if (rc.width > 0 && rc.height > 0 && searchResultHandler != null) {
rc.cosRotateTileSize = FloatMath.cos((float) Math.toRadians(rc.rotate)) * TILE_SIZE;
rc.sinRotateTileSize = FloatMath.sin((float) Math.toRadians(rc.rotate)) * TILE_SIZE;
rc.cosRotateTileSize = (float) (Math.cos(Math.toRadians(rc.rotate)) * TILE_SIZE);
rc.sinRotateTileSize = (float) (Math.sin(Math.toRadians(rc.rotate)) * TILE_SIZE);
try {
if(Looper.getMainLooper() != null && library.useDirectRendering()) {
final Handler h = new Handler(Looper.getMainLooper());
@ -249,8 +248,8 @@ public class OsmandRenderer {
cv.drawColor(rc.defaultColor);
}
if (objects != null && !objects.isEmpty() && rc.width > 0 && rc.height > 0) {
rc.cosRotateTileSize = FloatMath.cos((float) Math.toRadians(rc.rotate)) * TILE_SIZE;
rc.sinRotateTileSize = FloatMath.sin((float) Math.toRadians(rc.rotate)) * TILE_SIZE;
rc.cosRotateTileSize = (float) (Math.cos((float) Math.toRadians(rc.rotate)) * TILE_SIZE);
rc.sinRotateTileSize = (float) (Math.sin((float) Math.toRadians(rc.rotate)) * TILE_SIZE);
// put in order map
List<MapDataObjectPrimitive> pointsArray = new ArrayList<OsmandRenderer.MapDataObjectPrimitive>();

View file

@ -29,7 +29,6 @@ import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Typeface;
import android.util.FloatMath;
public class TextRenderer {
@ -145,13 +144,13 @@ public class TextRenderer {
}
// determine difference close to 180/0 degrees
if (Math.abs(FloatMath.sin(tRot - sRot)) < 0.3) {
if (Math.abs(Math.sin(tRot - sRot)) < 0.3) {
// rotate t box
// (calculate offset for t center suppose we rotate around s center)
float diff = (float) (-Math.atan2(tRect.centerX() - sRect.centerX(), tRect.centerY() - sRect.centerY()) + Math.PI / 2);
diff -= sRot;
double left = sRect.centerX() + dist * FloatMath.cos(diff) - tRect.width() / 2;
double top = sRect.centerY() - dist * FloatMath.sin(diff) - tRect.height() / 2;
double left = sRect.centerX() + dist * Math.cos(diff) - tRect.width() / 2;
double top = sRect.centerY() - dist * Math.sin(diff) - tRect.height() / 2;
QuadRect nRect = new QuadRect(left, top, left + tRect.width(), top + tRect.height());
return QuadRect.intersects(nRect, sRect);
}
@ -458,7 +457,7 @@ public class TextRenderer {
boolean inside = points[i].x >= 0 && points[i].x <= rc.width &&
points[i].x >= 0 && points[i].y <= rc.height;
if (i > 0) {
float d = FloatMath.sqrt(fsqr(points[i].x - points[i - 1].x) +
float d = (float) Math.sqrt(fsqr(points[i].x - points[i - 1].x) +
fsqr(points[i].y - points[i - 1].y));
distances[i-1]= d;
roadLength += d;

View file

@ -110,7 +110,7 @@ public class VoiceRouter {
protected CommandBuilder getNewCommandPlayerToPlay(){
if(player == null || mute){
if(player == null){
return null;
}
lastAnnouncement = System.currentTimeMillis();

View file

@ -76,6 +76,7 @@ public class DownloadedRegionsLayer extends OsmandMapLayer {
public void layerOnPostExecute() {
view.refreshMap();
}
public boolean queriedBoxContains(final RotatedTileBox queriedData, final RotatedTileBox newBox) {
if (newBox.getZoom() < ZOOM_TO_SHOW_BORDERS) {
if (queriedData != null && queriedData.getZoom() < ZOOM_TO_SHOW_BORDERS) {

View file

@ -9,7 +9,6 @@ import org.apache.commons.logging.Log;
import android.content.Context;
import android.graphics.PointF;
import android.util.FloatMath;
import android.view.MotionEvent;
@ -96,7 +95,7 @@ public class MultiTouchSupport {
Float x2 = (Float) getX.invoke(event, 1);
Float y1 = (Float) getY.invoke(event, 0);
Float y2 = (Float) getY.invoke(event, 1);
float distance = FloatMath.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
float distance = (float) Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
float angle = 0;
boolean angleDefined = false;
if(x1 != x2 || y1 != y2) {

View file

@ -31,7 +31,6 @@ import android.graphics.Path;
import android.graphics.PointF;
import android.graphics.PorterDuff.Mode;
import android.graphics.PorterDuffColorFilter;
import android.util.FloatMath;
public class RouteLayer extends OsmandMapLayer {
@ -204,7 +203,7 @@ public class RouteLayer extends OsmandMapLayer {
canvas.drawPath(pth, actionPaint);
double angleRad = Math.atan2(y - py, x - px);
double angle = (angleRad * 180 / Math.PI) + 90f;
double distSegment = FloatMath.sqrt((y - py) * (y - py) + (x - px) * (x - px));
double distSegment = Math.sqrt((y - py) * (y - py) + (x - px) * (x - px));
if (distSegment == 0) {
continue;
}
@ -285,7 +284,7 @@ public class RouteLayer extends OsmandMapLayer {
int y = lst.get(i + 3);
float angleRad = (float) Math.atan2(y - py, x - px);
float angle = (float) (angleRad * 180 / Math.PI) + 90f;
float distSegment = FloatMath.sqrt((y - py) * (y - py) + (x - px) * (x - px));
float distSegment = (float) Math.sqrt((y - py) * (y - py) + (x - px) * (x - px));
if(distSegment == 0) {
continue;
}

View file

@ -12,7 +12,6 @@ import android.graphics.Path;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.util.FloatMath;
public class TurnPathHelper {
@ -216,22 +215,22 @@ public class TurnPathHelper {
float tsRad = (float) ((to - step / 8 + 180) * Math.PI / 180f);
float tsRad2 = (float) ((to + step / 8 + 180) * Math.PI / 180f);
pathForTurn.arcTo(r, prev, to - step / 6 - prev + init );
pathForTurn.lineTo(cx + (r1 + 10) * FloatMath.sin(tsRad), cy - (r1 + 10) * FloatMath.cos(tsRad));
pathForTurn.lineTo(cx + (r1 + 10) * FloatMath.sin(tsRad2), cy - (r1 + 10) * FloatMath.cos(tsRad2));
pathForTurn.lineTo(cx + (r1 + 10) * (float) Math.sin(tsRad), cy - (r1 + 10) * (float) Math.cos(tsRad));
pathForTurn.lineTo(cx + (r1 + 10) * (float) Math.sin(tsRad2), cy - (r1 + 10) * (float) Math.cos(tsRad2));
// not necessary for next arcTo
//pathForTurn.lineTo(cx + (r1 + 0) * FloatMath.sin(tsRad2), cy - (r1 + 0) * FloatMath.cos(tsRad2));
//pathForTurn.lineTo(cx + (r1 + 0) * (float) Math.sin(tsRad2), cy - (r1 + 0) * (float) Math.cos(tsRad2));
prev = to + step / 6 + init;
}
}
float angleRad = (float) ((180 + sweepAngle) * Math.PI / 180f);
pathForTurn.lineTo(cx + (r1 + 4) * FloatMath.sin(angleRad), cy - (r1 + 4) * FloatMath.cos(angleRad));
pathForTurn.lineTo(cx + (r1 + 6) * FloatMath.sin(angleRad + angleToRot/2), cy - (r1 + 6) * FloatMath.cos(angleRad + angleToRot/2));
pathForTurn.lineTo(cx + (r1 + 14) * FloatMath.sin(angleRad - angleToRot/2), cy - (r1 + 12) * FloatMath.cos(angleRad - angleToRot/2));
pathForTurn.lineTo(cx + (r1 + 6) * FloatMath.sin(angleRad - 3*angleToRot/2), cy - (r1 + 6) * FloatMath.cos(angleRad - 3*angleToRot/2));
pathForTurn.lineTo(cx + (r1 + 4) * FloatMath.sin(angleRad - angleToRot), cy - (r1 + 4) * FloatMath.cos(angleRad - angleToRot));
pathForTurn.lineTo(cx + r2 * FloatMath.sin(angleRad - angleToRot), cy - r2 * FloatMath.cos(angleRad - angleToRot));
pathForTurn.lineTo(cx + (r1 + 4) * (float) Math.sin(angleRad), cy - (r1 + 4) * (float) Math.cos(angleRad));
pathForTurn.lineTo(cx + (r1 + 6) * (float) Math.sin(angleRad + angleToRot/2), cy - (r1 + 6) * (float) Math.cos(angleRad + angleToRot/2));
pathForTurn.lineTo(cx + (r1 + 14) * (float) Math.sin(angleRad - angleToRot/2), cy - (r1 + 12) * (float) Math.cos(angleRad - angleToRot/2));
pathForTurn.lineTo(cx + (r1 + 6) * (float) Math.sin(angleRad - 3*angleToRot/2), cy - (r1 + 6) * (float) Math.cos(angleRad - 3*angleToRot/2));
pathForTurn.lineTo(cx + (r1 + 4) * (float) Math.sin(angleRad - angleToRot), cy - (r1 + 4) * (float) Math.cos(angleRad - angleToRot));
pathForTurn.lineTo(cx + r2 * (float) Math.sin(angleRad - angleToRot), cy - r2 * (float) Math.cos(angleRad - angleToRot));
r.set(cx - r2, cy - r2, cx + r2, cy + r2);
pathForTurn.arcTo(r, 360 + sweepAngle + 90, -sweepAngle);

View file

@ -32,6 +32,9 @@ import alice.tuprolog.Struct;
import alice.tuprolog.Term;
import alice.tuprolog.Theory;
import alice.tuprolog.Var;
import android.content.Context;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;
public abstract class AbstractPrologCommandPlayer implements CommandPlayer, StateChangedListener<ApplicationMode> {
@ -51,6 +54,8 @@ public abstract class AbstractPrologCommandPlayer implements CommandPlayer, Stat
public static final String A_RIGHT_SL = "right_sl";
public static final String A_RIGHT_KEEP = "right_keep";
protected static final String DELAY_CONST = "delay_";
private static final String WEAR_ALERT = "WEAR_ALERT";
/** Must be sorted array! */
private final int[] sortedVoiceVersions;
private AudioFocusHelper mAudioFocusHelper;
@ -93,6 +98,22 @@ public abstract class AbstractPrologCommandPlayer implements CommandPlayer, Stat
return new String[] { "alice.tuprolog.lib.BasicLibrary",
"alice.tuprolog.lib.ISOLibrary"/*, "alice.tuprolog.lib.IOLibrary"*/};
}
public void sendAlertToAndroidWear(Context ctx, String message) {
int notificationId = 1;
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(ctx)
.setSmallIcon(R.drawable.icon)
.setContentTitle(ctx.getString(R.string.app_name))
.setContentText(message)
.setGroup(WEAR_ALERT);
// Get an instance of the NotificationManager service
NotificationManagerCompat notificationManager =
NotificationManagerCompat.from(ctx);
// Build the notification and issues it with notification manager.
notificationManager.notify(notificationId, notificationBuilder.build());
}
@Override
public void stateChanged(ApplicationMode change) {

View file

@ -5,11 +5,14 @@ import java.util.Arrays;
import java.util.List;
import net.osmand.PlatformUtil;
import net.osmand.plus.R;
import org.apache.commons.logging.Log;
import alice.tuprolog.Struct;
import alice.tuprolog.Term;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;
public class CommandBuilder {
@ -250,6 +253,7 @@ public class CommandBuilder {
this.commandPlayer.playCommands(this);
}
protected List<String> execute(){
alreadyExecuted = true;
return this.commandPlayer.execute(listStruct);

View file

@ -1,29 +0,0 @@
package net.osmand.plus.voice;
import java.io.File;
import net.osmand.IndexConstants;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import android.app.Activity;
public class CommandPlayerFactory {
public static CommandPlayer createCommandPlayer(String voiceProvider, OsmandApplication osmandApplication, Activity ctx)
throws CommandPlayerException {
if (voiceProvider != null) {
File parent = osmandApplication.getAppPath(IndexConstants.VOICE_INDEX_DIR);
File voiceDir = new File(parent, voiceProvider);
if (!voiceDir.exists()) {
throw new CommandPlayerException(ctx.getString(R.string.voice_data_unavailable));
}
if (MediaCommandPlayerImpl.isMyData(voiceDir)) {
return new MediaCommandPlayerImpl(osmandApplication, voiceProvider);
} else if (TTSCommandPlayerImpl.isMyData(voiceDir)) {
return new TTSCommandPlayerImpl(ctx, voiceProvider);
}
throw new CommandPlayerException(ctx.getString(R.string.voice_data_not_supported));
}
return null;
}
}

View file

@ -8,6 +8,7 @@ import java.util.List;
import net.osmand.PlatformUtil;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.routing.VoiceRouter;
import org.apache.commons.logging.Log;
@ -30,12 +31,14 @@ public class MediaCommandPlayerImpl extends AbstractPrologCommandPlayer implemen
private MediaPlayer mediaPlayer;
// indicates that player is ready to play first file
private List<String> filesToPlay = Collections.synchronizedList(new ArrayList<String>());
private VoiceRouter vrt;
public MediaCommandPlayerImpl(OsmandApplication ctx, String voiceProvider)
public MediaCommandPlayerImpl(OsmandApplication ctx, VoiceRouter vrt, String voiceProvider)
throws CommandPlayerException
{
super(ctx, voiceProvider, CONFIG_FILE, MEDIA_VOICE_VERSION);
this.vrt = vrt;
}
@Override
@ -57,6 +60,14 @@ public class MediaCommandPlayerImpl extends AbstractPrologCommandPlayer implemen
// Called from the calculating route thread.
@Override
public synchronized void playCommands(CommandBuilder builder) {
if(vrt.isMute()) {
StringBuilder bld = new StringBuilder();
for (String s : builder.execute()) {
bld.append(s).append(' ');
}
sendAlertToAndroidWear(ctx, bld.toString());
return;
}
filesToPlay.addAll(builder.execute());
// If we have not already started to play audio, start.

View file

@ -14,6 +14,7 @@ import net.osmand.PlatformUtil;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.activities.SettingsActivity;
import net.osmand.plus.routing.VoiceRouter;
import net.osmand.util.Algorithms;
import org.apache.commons.logging.Log;
@ -69,10 +70,12 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
private TextToSpeech mTts;
private Context mTtsContext;
private HashMap<String, String> params = new HashMap<String, String>();
private VoiceRouter vrt;
protected TTSCommandPlayerImpl(Activity ctx, String voiceProvider)
public TTSCommandPlayerImpl(Activity ctx, VoiceRouter vrt, String voiceProvider)
throws CommandPlayerException {
super((OsmandApplication) ctx.getApplicationContext(), voiceProvider, CONFIG_FILE, TTS_VOICE_VERSION);
this.vrt = vrt;
if (Algorithms.isEmpty(language)) {
throw new CommandPlayerException(
ctx.getString(R.string.voice_data_corrupted));
@ -100,20 +103,21 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
// Called from the calculating route thread.
@Override
public synchronized void playCommands(CommandBuilder builder) {
if (mTts != null) {
final List<String> execute = builder.execute(); //list of strings, the speech text, play it
StringBuilder bld = new StringBuilder();
for (String s : execute) {
bld.append(s).append(' ');
}
final List<String> execute = builder.execute(); //list of strings, the speech text, play it
StringBuilder bld = new StringBuilder();
for (String s : execute) {
bld.append(s).append(' ');
}
sendAlertToPebble(bld.toString());
if (mTts != null && !vrt.isMute()) {
if (ttsRequests++ == 0)
requestAudioFocus();
log.debug("ttsRequests="+ttsRequests);
sendAlertToPebble(bld.toString());
params.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID,""+System.currentTimeMillis());
mTts.speak(bld.toString(), TextToSpeech.QUEUE_ADD, params);
// Audio focus will be released when onUtteranceCompleted() completed is called by the TTS engine.
} else {
sendAlertToAndroidWear(ctx, bld.toString());
}
}
@ -124,35 +128,20 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer {
}
}
public void sendAlertToPebble(String message) {
public void sendAlertToPebble(String bld) {
final Intent i = new Intent("com.getpebble.action.SEND_NOTIFICATION");
final Map<String, Object> data = new HashMap<String, Object>();
data.put("title", "Voice");
data.put("body", message);
data.put("body", bld.toString());
final JSONObject jsonData = new JSONObject(data);
final String notificationData = new JSONArray().put(jsonData).toString();
i.putExtra("messageType", PEBBLE_ALERT);
i.putExtra("sender", "OsmAnd");
i.putExtra("notificationData", notificationData);
mTtsContext.sendBroadcast(i);
log.info("Send message to pebble " + message);
log.info("Send message to pebble " + bld.toString());
}
public void sendAlertToAndroidWear(String message) {
int notificationId = 1;
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(mTtsContext)
.setSmallIcon(R.drawable.icon)
.setContentTitle(mTtsContext.getString(R.string.app_name))
.setContentText(message)
.setGroup(WEAR_ALERT);
// Get an instance of the NotificationManager service
NotificationManagerCompat notificationManager =
NotificationManagerCompat.from(mTtsContext);
// Build the notification and issues it with notification manager.
notificationManager.notify(notificationId, notificationBuilder.build());
}
private void initializeEngine(final Context ctx, final Activity act)
{