diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index 2ade657577..092d47e26d 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -9,6 +9,10 @@
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
-->
+ Trip recording
+ Navigation
+ Running in background
+ GPS wake-up interval
Favorite information
Stop simulating your position
Simulate using recorded GPX or calculated route
@@ -352,21 +356,6 @@
Turn screen on
Turn on device screen (if off) when approaching a turn
Avoid roads…
- 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
-
Train routes
Tram routes
Share taxi routes
@@ -407,23 +396,6 @@
Nearby Favorites
Nearby POI
Traffic warnings
- Navigation
- 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.
-
- Searching
- 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.
-
OsmAnd background service is still running. Do you want to interrupt it, too?
Interrupt GPS background mode?
Interrupt
@@ -451,9 +423,6 @@
Configure your proxy\'s hostname (e.g. 127.0.0.1)
Proxy Port
Configure your proxy\'s port number (e.g. 8118)
- 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.
-
Trip recording
Configure how to record your trips
h
@@ -476,7 +445,6 @@
Continue Navigation
Pause Navigation
Keep
- GPS wake-up interval
Preferred language for labels on the map (if it is not available will switch to English or to local names)
Map preferred language
Local names
@@ -630,14 +598,6 @@
Connection established: %1$s
OsMo connection problem:
Unique device id
- 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
-
Calculate route between points
Restart OsMo session
Stop OsMo session
@@ -745,17 +705,6 @@
Routing preferences
Specify speech rate for TTS
Speech Rate
- 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 & usability fixes
- \n\t* Speech rate accessibility setting
-
Fast route calculation failed (%s), fallback to slow calculation.
Disable 2-phase routing for car navigation
Disable complex routing
@@ -767,8 +716,6 @@
Motorcycle
Boat
Aircraft
- Please visit https://code.google.com/p/osmand/wiki/FAQ to see frequently asked questions.
- Frequently Asked Questions
You are going to delete %1$d OSM changes. Are you sure?
Please calculate the route first
Simulate using calculated route
@@ -780,29 +727,9 @@
To long-range
Map magnifier
World basemap
- Map Styles
- 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)
-
Version :
About
Version info, licenses, project members
-
- 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
-
Zooms downloaded: %1$s
Expire (minutes): %1$s
Downloadable: %1$s
@@ -832,13 +759,6 @@
Speed limit
Speed cameras
Traffic warnings
- 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
-
Please specify OSM user and password in Settings
Clear intermediate points
Keep intermediate points
@@ -859,15 +779,6 @@
Destination %1$s
Set as destination
Select city or street first
- 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
-
Search street in neighborhood cities
Intermediate waypoints resorted to optimize their order on the way from current location to the destination.
Sort (door-to-door)
@@ -909,12 +820,6 @@
House number
Web site
Phone
- 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
-
Shows the settings to enable tracking and navigation in background (screen off) mode via periodically waking up the GPS device.
Install version
Choose application theme
@@ -923,25 +828,8 @@
Select address
Select favorite
OSM modifications
- 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
-
Hillshade layer
GPS info
- Changes in 1.1.4:
- \n\t* UI redesign
- \n\t* Bug fixes
-
Arrival time
checked
unchecked
@@ -953,13 +841,6 @@
Hillshade
Wikipedia
Hillshade overlays
- 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)
-
-
Contour lines data
Audio/Video data
Are you sure you want to stop the navigation?
@@ -993,14 +874,6 @@
An audio from the specified recording is being played.\n%1$s
Open external player
Do you want to remove this recording?
- 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
-
unavailable
Take an audio note
Take a video note
@@ -1028,11 +901,6 @@
Hide boundaries
Suppress display of regional boundaries (admin levels 5-9)
- Altitude Correction
- 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.)
-
Speed limit
GPX
No buildings found.
@@ -1043,17 +911,6 @@
Run the application in safe mode (using slower Android instead of native code).
Safe mode
The application is running in safe mode (disable it in the Settings).
- 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
-
- 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
-
Close changeset
ZXing Barcode Scanner application not installed. Search in Market?
Select a road color scheme:
@@ -1062,13 +919,6 @@
Enable the Trip recording plugin to use position logging services (GPX logging, online tracking)
Calculate possibly non-optimal route over long distances
Please enable GPS in the settings
- 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
-
Logging services
No route
Remove waypoint
@@ -1111,13 +961,6 @@
Snap to road
Interrupt music when making announcement
Interrupt music
- 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
-
OsmAnd Maps & Navigation
Global Mobile Map Viewing & Navigation for Offline and Online OSM Maps
@@ -1311,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.
- Updating Offline Maps
- 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
-
Create POI filter
Transport mode:
Select transport mode
@@ -1370,15 +1204,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
Hours
Minutes
The car was parked at:
- 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
-
Select speed of route simulation
Allocated memory %1$s MB (Android limit %2$s MB, Dalvik %3$s MB).
Allocated memory
@@ -1452,29 +1277,11 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
Plugins
Plugins activate advanced settings and additional functionality
Plugins
- 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
-
Vector maps likely display faster. May not work well on some devices.
Play commands of selected voice
Native rendering
Test voice prompts
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).
- 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
-
Send GPX files to OSM?
Visibility
Tags
@@ -1550,16 +1357,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
Use fluorescent colors to display tracks and routes
Offline editing
Always use offline editing
- 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
-
POI changes inside application do not affect downloaded map files, changes are saved to local file instead.
Uploading …
{0} POI/Notes were uploaded
@@ -1575,11 +1372,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
Online tracking web address
Log track using GPX widget or via \'Trip recording\' settings.
Show current track
- Changes in 0.7.0:
- \n\t- Offline wikipedia data with articles
- \n\t- Updated maps
- \n\t- Other small features
-
This free OsmAnd version is limited to %1$s downloads and does not support offline Wikipedia articles.
Free version
Show POI description
@@ -1616,39 +1408,8 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
Needed for openstreetmap.org submissions
Background mode
OsmAnd runs in background while screen is off
- Map Orientation
- 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
-
- Day/Night Mode
- 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)
-
- Improving OSM Data
- 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.
-
There is not enough free space to download %1$s MB (free: %2$s).
Free space now {2} MB! Download {0} file(s) ({1} MB)?
- 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
-
Transparent theme
Native library is not supported on this device.
Initializing native library…
@@ -1674,16 +1435,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
Stop simulation
Start simulation
- 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
-
File can not be renamed.
File with that name already exists.
GPX route
@@ -1704,18 +1455,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
Current map center
Origin:
Search near here
- 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
-
Route successfully saved as \'%1$s\'.
File name:
File with same name already exists.
@@ -1761,15 +1500,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
Map font size
Rendering debug info
Display rendering performance
- Recent Changes
- 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
-
Unpacking new data…
An online navigation service is selected but no Internet connection is available.
Language not supported
@@ -1802,16 +1532,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
Install more…
Minimum zoom level to use vector maps
Min. vector zoom level
- Share a Location
- 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.
-
- Favorite Points
- 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\'.
-
Online OSM map classification with images
Error occurred in offline search
Could not parse geo intent \'%s\'
@@ -1820,20 +1540,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
Select display language (please restart OsmAnd after changing)
Display language
incomplete
- Select a Map Source
- 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.
-
- Use Profile
- 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\').
-
- \'Use location\' Menu
- 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.
-
Change units of length and speed
Unit of measure
Miles/feet
@@ -1977,7 +1683,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
Use trackball
Set maximum waiting time for each background position fix
Maximum wait for fix
- Switch off OsmAnd background navigation service
Where am I?
OsmAnd navigation service
Network
diff --git a/OsmAnd/src/net/osmand/plus/AppInitializer.java b/OsmAnd/src/net/osmand/plus/AppInitializer.java
index f611803a88..ed4badcffd 100644
--- a/OsmAnd/src/net/osmand/plus/AppInitializer.java
+++ b/OsmAnd/src/net/osmand/plus/AppInitializer.java
@@ -264,6 +264,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);
diff --git a/OsmAnd/src/net/osmand/plus/NavigationService.java b/OsmAnd/src/net/osmand/plus/NavigationService.java
index 1a2740bd71..0467a0cef9 100644
--- a/OsmAnd/src/net/osmand/plus/NavigationService.java
+++ b/OsmAnd/src/net/osmand/plus/NavigationService.java
@@ -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);
}
diff --git a/OsmAnd/src/net/osmand/plus/NotificationHelper.java b/OsmAnd/src/net/osmand/plus/NotificationHelper.java
new file mode 100644
index 0000000000..989e03b69d
--- /dev/null
+++ b/OsmAnd/src/net/osmand/plus/NotificationHelper.java
@@ -0,0 +1,171 @@
+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));
+ showNotification();
+ }
+
+ 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) {
+ if(service != null && (service.getUsedBy() & NavigationService.USED_BY_GPX) != 0) {
+ 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);
+ } else {
+ 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);
+ }
+
+ Intent saveIntent = new Intent(OSMAND_SAVE_GPX_SERVICE_ACTION);
+ PendingIntent savePendingIntent = PendingIntent.getBroadcast(app, 0, saveIntent,
+ PendingIntent.FLAG_UPDATE_CURRENT);
+
+ 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());
+ }
+// if (stopBroadcastReceiver != null) {
+// app.unregisterReceiver(stopBroadcastReceiver);
+// stopBroadcastReceiver = null;
+// }
+// if (saveBroadcastReceiver != null) {
+// app.unregisterReceiver(saveBroadcastReceiver);
+// saveBroadcastReceiver = null;
+// }
+ }
+}
diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java
index ee697d2883..cda080a8cb 100644
--- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java
+++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java
@@ -89,6 +89,7 @@ public class OsmandApplication extends Application {
CommandPlayer player;
GpxSelectionHelper selectedGpxHelper;
SavingTrackHelper savingTrackHelper;
+ NotificationHelper notificationHelper;
LiveMonitoringHelper liveMonitoringHelper;
TargetPointsHelper targetPointsHelper;
WaypointHelper waypointHelper;
@@ -218,6 +219,10 @@ public class OsmandApplication extends Application {
public SavingTrackHelper getSavingTrackHelper() {
return savingTrackHelper;
}
+
+ public NotificationHelper getNotificationHelper() {
+ return notificationHelper;
+ }
public LiveMonitoringHelper getLiveMonitoringHelper() {
return liveMonitoringHelper;
@@ -699,7 +704,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();
+ }
}
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
index d9aecea7c2..449856f927 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
@@ -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);
diff --git a/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java b/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java
index fd25351515..aea630cfbd 100644
--- a/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java
+++ b/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java
@@ -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();
}
}
diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java
index 75df197183..0d71de4f23 100644
--- a/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/SettingsGeneralActivity.java
@@ -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 ||
diff --git a/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java b/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java
index e607582ae4..81f49586b1 100644
--- a/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java
+++ b/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java
@@ -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);
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java
index fe6fc2f28d..d320c44a28 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java
@@ -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 choice, final ValueHolder 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();
- }
- }
- }
}
\ No newline at end of file
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/SettingsMonitoringActivity.java b/OsmAnd/src/net/osmand/plus/monitoring/SettingsMonitoringActivity.java
index ac92f53f1a..b7955ea62f 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/SettingsMonitoringActivity.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/SettingsMonitoringActivity.java
@@ -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));
- }
+
}