OsmAnd~ (net.osmand.plus): More WIP, still some things to fix
This commit is contained in:
parent
3689c9796d
commit
60ba39c0f2
|
@ -6,120 +6,123 @@ Issue Tracker:https://github.com/osmandapp/Osmand/issues
|
|||
Donate:https://code.google.com/p/osmand/#Please_support_the_project
|
||||
|
||||
Auto Name:OsmAnd~
|
||||
Summary:Maps & navigation; online and off
|
||||
Summary:Maps and navigation; online and off
|
||||
Description:
|
||||
Osmand~'s features can be extended by enabling the plugins
|
||||
via the settings, which include online
|
||||
maps from many sources, tracking, OSM editing and accessibility enhancements.
|
||||
Map data of both vector
|
||||
and raster types can be stored on the phone memory card for offline usage, and
|
||||
navigation by default uses offline methods.
|
||||
Map data packages for many territories can be downloaded from
|
||||
within the app and there is a desktop program available on the website as well
|
||||
for creating your own.
|
||||
Osmand~'s features can be extended by enabling the plugins via the settings,
|
||||
which include online maps from many sources, tracking, OSM editing and
|
||||
accessibility enhancements.
|
||||
|
||||
The "~" is appended to differentiate it from the developers' builds.
|
||||
Map data of both vector and raster types can be stored on the phone memory
|
||||
card for offline usage, and navigation by default uses offline methods. Map
|
||||
data packages for many territories can be downloaded from within the app and
|
||||
there is a desktop program available on the website as well for creating your
|
||||
own.
|
||||
.
|
||||
|
||||
Repo Type:srclib
|
||||
Repo:OsmAnd
|
||||
#Repo Type:git
|
||||
#Repo:https://github.com/osmandapp/Osmand
|
||||
Repo Type:git
|
||||
Repo:https://github.com/mvdan/OsmAnd-submodules
|
||||
|
||||
Build:0.6.5,34
|
||||
commit=v0.6.5
|
||||
subdir=OsmAnd
|
||||
encoding=utf-8
|
||||
prebuild=mkdir assets && \
|
||||
mkdir raw
|
||||
# Old builds with the old repo
|
||||
#Build:0.6.5,34
|
||||
# commit=v0.6.5
|
||||
# subdir=OsmAnd
|
||||
# encoding=utf-8
|
||||
# prebuild=mkdir assets && \
|
||||
# mkdir raw
|
||||
#
|
||||
#Build:0.6.6,36
|
||||
# commit=v0.6.6_2
|
||||
# subdir=OsmAnd
|
||||
# encoding=utf-8
|
||||
# prebuild=mkdir raw
|
||||
#
|
||||
#Build:0.6.7,37
|
||||
# commit=v0.6.7
|
||||
# subdir=OsmAnd
|
||||
# encoding=utf-8
|
||||
# patch=code37.patch
|
||||
# prebuild=mkdir raw
|
||||
#
|
||||
#Build:0.6.8,39
|
||||
# commit=v0.6.8
|
||||
# subdir=OsmAnd
|
||||
# encoding=utf-8
|
||||
# prebuild=mkdir raw
|
||||
#
|
||||
#Build:0.6.8',41
|
||||
# disable=No corresponding source for whatever this is
|
||||
# commit=unknown - see disabled
|
||||
#
|
||||
#Build:0.6.9,42
|
||||
# commit=v0.6.9
|
||||
# subdir=OsmAnd
|
||||
# encoding=utf-8
|
||||
# prebuild=mkdir raw
|
||||
#
|
||||
#Build:0.6.9',43
|
||||
# disable=No corresponding source for whatever this is
|
||||
# commit=unknown - see disabled
|
||||
#
|
||||
#Build:0.8.1,65
|
||||
# commit=d62472532d8
|
||||
# subdir=OsmAnd
|
||||
# target=android-8
|
||||
# update=force
|
||||
# encoding=utf-8
|
||||
# forceversion=yes
|
||||
# prebuild=cd ../DataExtractionOSM && \
|
||||
# ant compile build && \
|
||||
# cd ../OsmAnd/ && \
|
||||
# sed -i 's/debuggable="true"/debuggable="false"/g' AndroidManifest.xml && \
|
||||
# cp ../DataExtractionOSM/build/OsmAndMapCreator.jar libs/ && \
|
||||
# zip -d libs/OsmAndMapCreator.jar net/osmand/LogUtil.class && \
|
||||
# cp -r ../DataExtractionOSM/build/lib/ libs/
|
||||
# buildjni=no
|
||||
#
|
||||
#Build:0.8.2,71
|
||||
# commit=50a4733475cd
|
||||
# subdir=OsmAnd
|
||||
# submodules=yes
|
||||
# target=android-8
|
||||
# update=force
|
||||
# encoding=utf-8
|
||||
# forceversion=yes
|
||||
# forcevercode=yes
|
||||
# prebuild=sed -i 's/debuggable="true"/debuggable="false"/g' AndroidManifest.xml && \
|
||||
# cd ../DataExtractionOSM && \
|
||||
# ant compile build && \
|
||||
# cd ../OsmAnd/ && \
|
||||
# sed -i 's/app_version">[^<]*/app_version">0.8.2-fdroid/' res/values/no_translate.xml && \
|
||||
# cp ../DataExtractionOSM/build/OsmAndMapCreator.jar libs/ && \
|
||||
# zip -d libs/OsmAndMapCreator.jar net/osmand/LogUtil.class && \
|
||||
# cp -r ../DataExtractionOSM/build/lib/ libs/
|
||||
# buildjni=yes
|
||||
|
||||
Build:0.6.6,36
|
||||
commit=v0.6.6_2
|
||||
subdir=OsmAnd
|
||||
encoding=utf-8
|
||||
prebuild=mkdir raw
|
||||
|
||||
Build:0.6.7,37
|
||||
commit=v0.6.7
|
||||
subdir=OsmAnd
|
||||
encoding=utf-8
|
||||
patch=code37.patch
|
||||
prebuild=mkdir raw
|
||||
|
||||
Build:0.6.8,39
|
||||
commit=v0.6.8
|
||||
subdir=OsmAnd
|
||||
encoding=utf-8
|
||||
prebuild=mkdir raw
|
||||
|
||||
Build:0.6.8',41
|
||||
disable=No corresponding source for whatever this is
|
||||
commit=unknown - see disabled
|
||||
|
||||
Build:0.6.9,42
|
||||
commit=v0.6.9
|
||||
subdir=OsmAnd
|
||||
encoding=utf-8
|
||||
prebuild=mkdir raw
|
||||
|
||||
Build:0.6.9',43
|
||||
disable=No corresponding source for whatever this is
|
||||
commit=unknown - see disabled
|
||||
|
||||
Build:0.8.1,65
|
||||
commit=d62472532d8
|
||||
subdir=OsmAnd
|
||||
target=android-8
|
||||
update=force
|
||||
encoding=utf-8
|
||||
forceversion=yes
|
||||
prebuild=cd ../DataExtractionOSM && \
|
||||
ant compile build && \
|
||||
cd ../OsmAnd/ && \
|
||||
sed -i 's/debuggable="true"/debuggable="false"/g' AndroidManifest.xml && \
|
||||
cp ../DataExtractionOSM/build/OsmAndMapCreator.jar libs/ && \
|
||||
zip -d libs/OsmAndMapCreator.jar net/osmand/LogUtil.class && \
|
||||
cp -r ../DataExtractionOSM/build/lib/ libs/
|
||||
buildjni=no
|
||||
|
||||
Build:0.8.2,71
|
||||
commit=50a4733475cd
|
||||
subdir=OsmAnd
|
||||
submodules=yes
|
||||
target=android-8
|
||||
update=force
|
||||
encoding=utf-8
|
||||
forceversion=yes
|
||||
forcevercode=yes
|
||||
prebuild=sed -i 's/debuggable="true"/debuggable="false"/g' AndroidManifest.xml && \
|
||||
cd ../DataExtractionOSM && \
|
||||
ant compile build && \
|
||||
cd ../OsmAnd/ && \
|
||||
sed -i 's/app_version">[^<]*/app_version">0.8.2-fdroid/' res/values/no_translate.xml && \
|
||||
cp ../DataExtractionOSM/build/OsmAndMapCreator.jar libs/ && \
|
||||
zip -d libs/OsmAndMapCreator.jar net/osmand/LogUtil.class && \
|
||||
cp -r ../DataExtractionOSM/build/lib/ libs/
|
||||
buildjni=yes
|
||||
|
||||
Build:1.6.5,170
|
||||
Build:1.6.5,165
|
||||
disable=WIP
|
||||
commit=f261ae846932c5f
|
||||
subdir=OsmAnd
|
||||
commit=1.6.5
|
||||
submodules=yes
|
||||
subdir=android/OsmAnd
|
||||
forcevercode=yes
|
||||
srclibs=OsmAnd-tools@0eaa6cf72a2683;OsmAnd-core@3a23de4a9af95;OsmAnd-resources@0135097e2a78e7
|
||||
prebuild=sed -i 's/debuggable="true"/debuggable="false"/g' AndroidManifest.xml && \
|
||||
sed -i 's/app_version">[^<]*/app_version">1.6.5/' res/values/no_translate.xml
|
||||
build=ANDROID_NDK=$$NDK$$ OSMAND_ARM_ONLY=true ./ndk-build.sh && \
|
||||
ant jar native-libs -f $$OsmAnd-tools$$/OsmAndMapCreator/build.xml && \
|
||||
ant build -f ../OsmAnd-java/build.xml
|
||||
init=rm -f ../SherlockBar/build.xml build.xml
|
||||
patch=analytics_165.diff
|
||||
prebuild=sed -i 's/debuggable="true"/debuggable="false"/' AndroidManifest.xml && \
|
||||
sed -i 's/app_version">[^<]*/app_version">1.6.5/' res/values/no_translate.xml && \
|
||||
echo -e 'NDK_TOOLCHAIN_VERSION := 4.8\nAPP_ABI := armeabi armeabi-v7a x86 mips\nOSMAND_SKIP_NEON_SUPPORT := false\nOSMAND_FORCE_NEON_SUPPORT := false\nAPP_OPTIM := release' >> jni/Application.mk
|
||||
build=sed -i 's/EXTERNAL_DEPENDENCIES=(/EXTERNAL_DEPENDENCIES=(boost-android /' full-ndk-build.sh && \
|
||||
ANDROID_SDK=$$SDK$$ ./full-ndk-build.sh && \
|
||||
ant build -f ../OsmAnd-java/build.xml && \
|
||||
ant jar native-libs -f ../../tools/OsmAndMapCreator/build.xml
|
||||
buildjni=no
|
||||
|
||||
Maintainer Notes:
|
||||
Disregard CV name, there never was a version name "1.6.5" on git.
|
||||
|
||||
No tags, but at least they use release branches.
|
||||
No UCMs apply because the bumping of version names/codes is very weird.
|
||||
.
|
||||
|
||||
Auto Update Mode:None
|
||||
Update Check Mode:RepoManifest/r1.6
|
||||
Current Version:1.7.1 alpha
|
||||
Current Version Code:170
|
||||
Update Check Mode:None
|
||||
Current Version:1.6.5
|
||||
Current Version Code:165
|
||||
|
||||
|
|
153
metadata/net.osmand.plus/analytics_165.diff
Normal file
153
metadata/net.osmand.plus/analytics_165.diff
Normal file
|
@ -0,0 +1,153 @@
|
|||
diff --git a/android/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java b/android/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java
|
||||
index 4d2c627..9608fa7 100644
|
||||
--- a/android/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java
|
||||
+++ b/android/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java
|
||||
@@ -238,7 +238,6 @@ public class DownloadIndexesThread {
|
||||
if (entry.existingBackupFile != null) {
|
||||
Algorithms.removeAllFiles(entry.existingBackupFile);
|
||||
}
|
||||
- trackEvent(entry);
|
||||
publishProgress(entry);
|
||||
}
|
||||
}
|
||||
@@ -296,17 +295,6 @@ public class DownloadIndexesThread {
|
||||
return null;
|
||||
}
|
||||
|
||||
- private void trackEvent(DownloadEntry entry) {
|
||||
- String v = Version.getAppName(app);
|
||||
- if (Version.isProductionVersion(app)) {
|
||||
- v = Version.getFullVersion(app);
|
||||
- } else {
|
||||
- v += " test";
|
||||
- }
|
||||
- new DownloadTracker().trackEvent(app, v, Version.getAppName(app),
|
||||
- entry.baseName, 1, app.getString(R.string.ga_api_key));
|
||||
- }
|
||||
-
|
||||
@Override
|
||||
public void showWarning(String warning) {
|
||||
publishProgress(warning);
|
||||
@@ -615,4 +603,4 @@ public class DownloadIndexesThread {
|
||||
}
|
||||
|
||||
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/android/OsmAnd/src/net/osmand/plus/download/DownloadTracker.java b/android/OsmAnd/src/net/osmand/plus/download/DownloadTracker.java
|
||||
deleted file mode 100644
|
||||
index 843f865..0000000
|
||||
--- a/android/OsmAnd/src/net/osmand/plus/download/DownloadTracker.java
|
||||
+++ /dev/null
|
||||
@@ -1,110 +0,0 @@
|
||||
-package net.osmand.plus.download;
|
||||
-
|
||||
-import java.io.File;
|
||||
-import java.io.IOException;
|
||||
-import java.net.HttpURLConnection;
|
||||
-import java.net.URL;
|
||||
-import java.net.URLEncoder;
|
||||
-import java.text.MessageFormat;
|
||||
-import java.util.Iterator;
|
||||
-import java.util.LinkedHashMap;
|
||||
-import java.util.Map;
|
||||
-import java.util.Map.Entry;
|
||||
-import java.util.Random;
|
||||
-
|
||||
-import net.osmand.PlatformUtil;
|
||||
-import net.osmand.plus.ClientContext;
|
||||
-import net.osmand.plus.Version;
|
||||
-
|
||||
-import org.apache.commons.logging.Log;
|
||||
-
|
||||
-public class DownloadTracker {
|
||||
- private static final Log log = PlatformUtil.getLog(DownloadTracker.class);
|
||||
-
|
||||
- private Map<String, String> getCustomVars(ClientContext ctx) {
|
||||
- Map<String, String> map = new LinkedHashMap<String, String>();
|
||||
- map.put("App", Version.getFullVersion(ctx));
|
||||
- map.put("Device", ctx.getInternalAPI().getDeviceName());
|
||||
- map.put("Brand", ctx.getInternalAPI().getBrandName());
|
||||
- map.put("Model", ctx.getInternalAPI().getModelName());
|
||||
- map.put("Package", ctx.getInternalAPI().getPackageName());
|
||||
-
|
||||
- map.put("Version name", ctx.getInternalAPI().getVersionName());
|
||||
- map.put("Version code", ctx.getInternalAPI().getVersionCode()+"");
|
||||
- return map;
|
||||
- }
|
||||
-
|
||||
- private String randomNumber() {
|
||||
- return (new Random(System.currentTimeMillis()).nextInt(100000000) + 100000000) + "";
|
||||
- }
|
||||
-
|
||||
- static final String beaconUrl = "http://www.google-analytics.com/__utm.gif";
|
||||
- static final String analyticsVersion = "4.3"; // Analytics version - AnalyticsVersion
|
||||
-
|
||||
- public void trackEvent(ClientContext a,
|
||||
- String category, String action, String label, int value, String trackingAcount) {
|
||||
- Map<String, String> parameters = new LinkedHashMap<String, String>();
|
||||
- try {
|
||||
- Map<String, String> customVariables = getCustomVars(a);
|
||||
- parameters.put("AnalyticsVersion", analyticsVersion);
|
||||
- parameters.put("utmn", randomNumber());
|
||||
- parameters.put("utmhn", "http://app.osmand.net");
|
||||
- parameters.put("utmni", "1");
|
||||
- parameters.put("utmt", "event");
|
||||
-
|
||||
- StringBuilder customVars = new StringBuilder();
|
||||
- Iterator<Entry<String, String>> customs = customVariables.entrySet().iterator();
|
||||
- for (int i = 0; i < customVariables.size(); i++) {
|
||||
- Entry<String, String> n = customs.next();
|
||||
- if (i > 0) {
|
||||
- customVars.append("*");
|
||||
- }
|
||||
- // "'" => "'0", ')' => "'1", '*' => "'2", '!' => "'3",
|
||||
- customVars.append((i + 1) + "!").append((n.getKey() + n.getValue()));
|
||||
- }
|
||||
-
|
||||
- parameters.put("utmcs", "UTF-8");
|
||||
- parameters.put("utmul", "en");
|
||||
- parameters.put("utmhid", (System.currentTimeMillis() / 1000) + "");
|
||||
- parameters.put("utmac", trackingAcount);
|
||||
- String domainHash = "app.osmand.net".hashCode() + "";
|
||||
-
|
||||
- String utma = domainHash + ".";
|
||||
- File fl = a.getAppPath(".nomedia");
|
||||
- if (fl.exists()) {
|
||||
- utma += (fl.lastModified()) + ".";
|
||||
- } else {
|
||||
- utma += (randomNumber()) + ".";
|
||||
- }
|
||||
- utma += ((System.currentTimeMillis() / 1000) + ".");
|
||||
- utma += ((System.currentTimeMillis() / 1000) + ".");
|
||||
- utma += ((System.currentTimeMillis() / 1000) + ".");
|
||||
- utma += "1";
|
||||
- parameters.put("utmcc", "__utma=" + utma + ";");
|
||||
- parameters.put("utme", MessageFormat.format("5({0}*{1}*{2})({3})", category, action, label == null ? "" : label, value)
|
||||
- + customVars);
|
||||
-
|
||||
- StringBuilder urlString = new StringBuilder(beaconUrl + "?");
|
||||
- Iterator<Entry<String, String>> it = parameters.entrySet().iterator();
|
||||
- while (it.hasNext()) {
|
||||
- Entry<String, String> e = it.next();
|
||||
- urlString.append(e.getKey()).append("=").append(URLEncoder.encode(e.getValue(), "UTF-8"));
|
||||
- if (it.hasNext()) {
|
||||
- urlString.append("&");
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- log.debug(urlString);
|
||||
- URL url = new URL(urlString.toString());
|
||||
- HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
- conn.setConnectTimeout(5000);
|
||||
- conn.setDoInput(false);
|
||||
- conn.setDoOutput(false);
|
||||
- conn.connect();
|
||||
- log.info("Response analytics is " + conn.getResponseCode() + " " + conn.getResponseMessage());
|
||||
- } catch (IOException e) {
|
||||
- log.error(e.getMessage(), e);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
-}
|
|
@ -1,3 +0,0 @@
|
|||
Repo Type:git
|
||||
Repo:https://github.com/osmandapp/OsmAnd-core
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
Repo Type:git
|
||||
Repo:https://github.com/osmandapp/OsmAnd-resources
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
Repo Type:git
|
||||
Repo:https://github.com/osmandapp/OsmAnd-tools
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
Repo Type:git
|
||||
Repo:https://github.com/osmandapp/Osmand
|
||||
|
Loading…
Reference in a new issue