Commit graph

17169 commits

Author SHA1 Message Date
Hans-Christoph Steiner
9bb03894a5 generate OpenStreetMap shortlinks using current char set (~ instead of @)
OpenStreetMap has changed the shortlink charset to use ~ instead of @ to be
support services like Twitter where @ has meaning.  OpenStreetMap still will
parse the old format, but only generates new shortlinks using "~".  This
commit changes OsmAnd to have the same behavior.

References:
https://wiki.openstreetmap.org/wiki/Shortlink#Code_for_encoding_.26_decoding
e84b2bd22f/app/assets/javascripts/application.js (L188)

---------------- OsmAnd-java/src/net/osmand/util/MapUtils.java ----------------
2015-01-21 11:25:51 +01:00
Hans-Christoph Steiner
50eed92015 parse lat/lon/zoom from OpenStreetMap shortlinks
This is a nice format of shortlink since it uses a public, offline algorithm
to generate them.  So Osmand can get what it needs from the shortlink
without going online.

https://wiki.openstreetmap.org/wiki/Shortlink
2015-01-21 11:25:51 +01:00
Hans-Christoph Steiner
8d927de6ac if incoming URL was properly parsed, remove GeoIntentActivity from backstack
When a user clicks on a URL that OsmAnd claims, they will first go to the
GeoIntentActivity, which will show them the processing, and any errors,
then it'll take them to the map.  Since the map will stay in the same task
as the original Activity where the user clicked it, the user is very likely
to be clicking on the back button.  Calling finish() here gives them one
less thing to click back on, since GeoIntentActivity will be removed.

closes #1037 https://github.com/osmandapp/Osmand/pull/1037
2015-01-21 11:25:51 +01:00
Hans-Christoph Steiner
2537d92a6a update MapUtils.decodeShortLinkString() to also parse zoom
This method is used to parse the custom OpenStreetMap shortlink algorithm
that encodes lat, lon, and zoom.  The previous version,
MapUtils.decodeShortLocString(), only parsed lat, lon from the shortlink.
2015-01-21 11:25:51 +01:00
Hans-Christoph Steiner
50abbb0d57 consolidate IntentFilter for matching HTTP map URIs with no specific path
This puts them all into a single <intent-filter> to improve readability and
reduce the number of IntentFilters used.  This also adds some new domains:

* maps.yandex.com
* map.baidu.cn
* map.baidu.com
* wb.amap.com
* www.amap.com
2015-01-21 11:25:51 +01:00
Hans-Christoph Steiner
147f2adf05 add BaiduMap as a URL pattern (http://map.baidu.com)
This is a mapping service that is popular in China.
2015-01-21 11:00:46 +01:00
Hans-Christoph Steiner
baf25cbb14 include test lat/lon to 5 decimal places since that's the common format
This makes the test more realistic, since most services are using at least
this much accuracy.
2015-01-21 11:00:46 +01:00
Hans-Christoph Steiner
32f7cccd0f rework OpenStreetMap URL parsing to handle current formats
It seems this code is quite out of date, because none of the URL formats
listed in the tests seem to work.  This commit updates the URL formats in
the tests, then makes all of them parse properly.  It also changes the
parsing technique, leveraging java.net.URL's built-in parsing abilities to
assist.  Also, I plan on adding a lot more URL formats, so the current code
structure made it very difficult to add to.  So each service will be split
out into its own section, starting here.
2015-01-21 11:00:46 +01:00
Hans-Christoph Steiner
7729aa7350 remove scheme arg from GeoPointParserUtil.parse(), java.net.URI provides it
Since the first step in parse() is to create a URI instance, the scheme
should come from URI.getScheme() instead of an arg.
2015-01-21 11:00:46 +01:00
Hans-Christoph Steiner
ba15646534 old-ndk-build.sh: support standard ANDROID_HOME env var
Google has defined the ANDROID_HOME env var as the standard env var to
point to the Android SDK install.  It is not so well documented, but it is
documented here and there:

https://developer.android.com/tools/testing/testing_ui.html#builddeploy
http://books.sonatype.com/mvnref-book/reference/android-dev-sect-config-build.html
2015-01-21 11:00:46 +01:00
Hans-Christoph Steiner
56eee3216f use http://osmand.net/go URL as HTTP url for sharing
For the record, I do not think it is a good idea to share location using
HTTP, it should always be HTTPS.  There are too many privacy concerns.
@vshcherb says he plans on adding HTTPS to osmand.net, so that will be good
once it happens.
2015-01-21 11:00:46 +01:00
Hans-Christoph Steiner
01bb7d091f split geo: URL creation to MapUtils.buildGeoUrl(lat, lon, z)
This follow the pattern set by MapUtils.buildShortOsmUrl().
2015-01-21 11:00:46 +01:00
Hans-Christoph Steiner
597f4b0a89 also match OSM short hostnames: osm.org and openstreetmap.org
osm.org is the official short URL for OpenStreetMap, with proper HTTPS
coming soon.  openstreetmap.org is the temporary short URL since it already
supports HTTPS.
2015-01-21 11:00:46 +01:00
Hans-Christoph Steiner
c54d8d47e8 use HTTPS URL for sharing location
In order to maintain privacy when sharing location, this changes the shared
location link to use HTTPS, thereby hiding the location info from anyone
who might be snooping on the WiFi, ISP, internet, etc.

Unfortunately, http://osm.org does not yet work with HTTPS, but the
standard OSM URLs are short enough to fit into a text message. They are
planning on supporting https://osm.org in the future:
https://github.com/openstreetmap/operations/issues/2
2015-01-21 11:00:46 +01:00
Victor Shcherb
c90d37fcab Merge branch 'master' of github.com:osmandapp/Osmand 2015-01-21 10:56:37 +01:00
vshcherb
1a767e5109 Merge pull request #1044 from Bars107/master
Added botoom action bar for favorites
2015-01-21 10:56:08 +01:00
Victor Shcherb
3a6230a952 Merge branch 'master' of github.com:osmandapp/Osmand 2015-01-21 10:55:30 +01:00
Victor Shcherb
eaf19c09b9 Update gradle 2015-01-21 10:52:10 +01:00
xmd5a2
e209341f1c Update strings 2015-01-21 12:31:20 +03:00
Ivan Gonzalez Martin
fb6e817d29 Translated using Weblate (Spanish)
Currently translated at 100.0% (1606 of 1606 strings)
2015-01-21 10:09:11 +01:00
josep constanti
e25deb9cc7 Translated using Weblate (Catalan)
Currently translated at 100.0% (1606 of 1606 strings)
2015-01-21 08:02:09 +01:00
jan madsen
4e34918b3e Translated using Weblate (Danish)
Currently translated at 100.0% (1606 of 1606 strings)
2015-01-21 06:47:00 +01:00
Ivan Vantu5z
504a823765 Translated using Weblate (Russian)
Currently translated at 99.9% (1606 of 1606 strings)
2015-01-21 06:41:20 +01:00
Evgenii Martynenko
602b4182f1 Translated using Weblate (Russian)
Currently translated at 99.9% (1605 of 1606 strings)
2015-01-21 06:41:15 +01:00
Victor Shcherb
5b180cd1ae Update gradle 2015-01-21 03:04:32 +01:00
Victor Shcherb
b7e3eb2056 Update gradle 2015-01-21 02:58:28 +01:00
Weblate
e2358028cd Merge remote-tracking branch 'origin/master' 2015-01-21 00:53:15 +01:00
Roberto GEB
945b54b5b2 Translated using Weblate (Spanish)
Currently translated at 99.8% (1603 of 1606 strings)
2015-01-21 00:53:11 +01:00
Mirco Zorzo
d38899c73b Translated using Weblate (Italian)
Currently translated at 100.0% (1606 of 1606 strings)
2015-01-21 00:53:09 +01:00
Victor Shcherb
b0815c2b64 Merge branch 'master' of ssh://github.com/osmandapp/Osmand 2015-01-21 00:52:34 +01:00
Victor Shcherb
f4124c040b update gradle 2015-01-21 00:51:32 +01:00
Ldm Public
a0893419ab Translated using Weblate (French)
Currently translated at 100.0% (1606 of 1606 strings)
2015-01-21 00:16:26 +01:00
Viktar Palstsiuk
46c8c8818a Translated using Weblate (Belarusian)
Currently translated at 100.0% (1606 of 1606 strings)
2015-01-20 23:38:59 +01:00
Victor Shcherb
9725ec2f87 Merge branch 'master' of ssh://github.com/osmandapp/Osmand 2015-01-20 23:33:14 +01:00
Victor Shcherb
0b6738e356 Fix errors 2015-01-20 23:32:35 +01:00
Viktar Palstsiuk
30245c92d4 Translated using Weblate (Belarusian)
Currently translated at 100.0% (1604 of 1604 strings)
2015-01-20 22:46:15 +01:00
vshcherb
0c523a5226 Merge pull request #1043 from eighthave/proxy
add support for a proxy and use more HTTPS
2015-01-21 00:36:18 +03:00
ace shadow
7e0c19c7bb Translated using Weblate (Slovak)
Currently translated at 100.0% (1597 of 1597 strings)
2015-01-20 22:12:30 +01:00
vshcherb
7f58a2d753 Update SearchActivity.java 2015-01-20 16:54:39 +01:00
vshcherb
5eb82aaef5 Update SlidingTabStrip.java 2015-01-20 16:41:20 +01:00
vshcherb
a78080986f Update SlidingTabLayout.java 2015-01-20 16:39:56 +01:00
vshcherb
324207746e Update SlidingTabStrip.java 2015-01-20 16:35:57 +01:00
Hans-Christoph Steiner
385ebb8113 fix resource leak from unclosed InputStreams in DownloadOsmandIndexesHelper
fixes this stacktrace:

StrictMode  E  A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
            E  java.lang.Throwable: Explicit termination method 'end' not called
            E      at dalvik.system.CloseGuard.open(CloseGuard.java:184)
            E      at java.util.zip.Inflater.<init>(Inflater.java:82)
            E      at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:96)
            E      at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:81)
            E      at net.osmand.plus.download.DownloadOsmandIndexesHelper.downloadIndexesListFromInternet(DownloadOsmandIndexesHelper.java:112)
            E      at net.osmand.plus.download.DownloadOsmandIndexesHelper.getIndexesList(DownloadOsmandIndexesHelper.java:38)
            E      at net.osmand.plus.download.DownloadIndexesThread$1.doInBackground(DownloadIndexesThread.java:377)
            E      at net.osmand.plus.download.DownloadIndexesThread$1.doInBackground(DownloadIndexesThread.java:373)
            E      at android.os.AsyncTask$2.call(AsyncTask.java:288)
            E      at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            E      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            E      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            E      at java.lang.Thread.run(Thread.java:841)
2015-01-20 16:18:46 +01:00
Hans-Christoph Steiner
2da1458999 add a preference to allow user to set a network proxy
Some networks require a proxy to get internet beyond the firewall, and
proxies are also useful for channeling all traffic through circumvention
and privacy proxies like Tor, I2P, Psiphon, etc.  In places where the
connection to download tiles might be blocked, using a proxy can give the
user access.
2015-01-20 16:18:46 +01:00
Hans-Christoph Steiner
41f356a11a use HTTPS where supported, and on Gingerbread and above (i.e. not android-9)
To increase user privacy, especially with traffic that includes sensitive
information like location and tracking markers, HTTPS should be used
whenever possible.  It seems that HTTPS is broken for a lot of sites on
versions older than android-10/Gingerbread, so HTTPS is not used on those
old platforms.
2015-01-20 16:18:46 +01:00
Weblate
afc2949e8e Merge remote-tracking branch 'origin/master' 2015-01-20 16:02:34 +01:00
Саша Петровић
dd76b1c2ab Translated using Weblate (Serbian)
Currently translated at 21.1% (337 of 1597 strings)
2015-01-20 16:02:30 +01:00
Yannis Gyftomitros
c03e345a22 Translated using Weblate (Greek)
Currently translated at 93.8% (1499 of 1597 strings)
2015-01-20 16:02:28 +01:00
vshcherb
9ba508d9e1 Update SlidingTabStrip.java 2015-01-20 16:02:25 +01:00
Viktar Palstsiuk
be7256662b Translated using Weblate (Belarusian)
Currently translated at 100.0% (1597 of 1597 strings)
2015-01-20 15:16:15 +01:00