Compare commits
16 commits
v0.54.2-ex
...
main
Author | SHA1 | Date | |
---|---|---|---|
dc3f3f5ac3 | |||
1180d3cfdd | |||
ea7cadde4e | |||
817e8198b5 | |||
5f0fb91b49 | |||
b0824407b1 | |||
19cc005d60 | |||
c15e95245e | |||
8253f92149 | |||
3aa85d562e | |||
a48aaffec4 | |||
bdbf551132 | |||
4bb7346a3b | |||
17f87a9611 | |||
b7b29d20e4 | |||
3e5101aab8 |
6 changed files with 100 additions and 41 deletions
|
@ -44,17 +44,20 @@ jobs:
|
|||
export keyPassword=${{ secrets.KEY_PASSWORD }}
|
||||
./gradlew build
|
||||
./gradlew assembleRelease
|
||||
rm -rf app/build/outputs/apk/release/baselineProfiles
|
||||
rm -rf app/build/outputs/apk/release/output-metadata.json
|
||||
|
||||
- name: Upload APK to hetzner
|
||||
shell: bash
|
||||
run: |
|
||||
TAG=$( echo ${{ env.GITHUB_REF_NAME }} )
|
||||
scp app/build/outputs/apk/release/app-release.apk hetzner:~/public/apk/mapcomplete-$TAG.apk
|
||||
if [[ ! $tag =~ -sfw$ ]]; then
|
||||
ssh hetzner 'rm -f public/apk/mapcomplete-latest.apk && cp "public/apk/$(ls -v public/apk/ | tail -n 1)" public/apk/mapcomplete-latest.apk'
|
||||
fi
|
||||
# Build versions for legacy versions
|
||||
./scripts/compile_version.sh $TAG 9-PIE 28
|
||||
./scripts/compile_version.sh $TAG 10-QUINCE-TART 29
|
||||
./scripts/compile_version.sh $TAG 11-RED-VELVET-CAKE 30
|
||||
./scripts/compile_version.sh $TAG 12-SNOW-CONE 31
|
||||
./scripts/compile_version.sh $TAG 13-TIRAMISU 32
|
||||
|
||||
- name: clean intermediate files
|
||||
run: |
|
||||
rm -rf app/build/outputs/apk/release/baselineProfiles
|
||||
rm -rf app/build/outputs/apk/release/output-metadata.json
|
||||
|
||||
- name: Upload APK to forgejo releases (MapComplete)
|
||||
uses: https://source.mapcomplete.org/actions/forgejo-release@v2.6.0
|
||||
|
|
|
@ -5,9 +5,9 @@ android {
|
|||
compileSdk rootProject.ext.compileSdkVersion
|
||||
defaultConfig {
|
||||
applicationId "org.mapcomplete"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 9
|
||||
minSdk 28
|
||||
targetSdkVersion 35
|
||||
versionCode 10
|
||||
versionName "debug"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
aaptOptions {
|
||||
|
@ -75,3 +75,9 @@ try {
|
|||
} catch(Exception e) {
|
||||
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
|
||||
}
|
||||
android {
|
||||
lintOptions {
|
||||
checkReleaseBuilds false
|
||||
abortOnError false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
|
||||
<uses-sdk tools:overrideLibrary="com.getcapacitor.android, capacitor.cordova.android.plugins" />
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
|
|
|
@ -11,6 +11,7 @@ import android.view.Window;
|
|||
import android.view.WindowInsets;
|
||||
import android.window.OnBackInvokedDispatcher;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
@ -19,7 +20,7 @@ import androidx.core.view.WindowCompat;
|
|||
import com.getcapacitor.BridgeActivity;
|
||||
import com.getcapacitor.JSObject;
|
||||
import com.getcapacitor.PluginCall;
|
||||
|
||||
import android.app.Activity;
|
||||
public class MainActivity extends BridgeActivity {
|
||||
|
||||
private PluginCall locationRequest = null;
|
||||
|
@ -66,19 +67,37 @@ public class MainActivity extends BridgeActivity {
|
|||
responder.setKeepAlive(true);
|
||||
});
|
||||
|
||||
Databridge.addResponder("exit", responder -> {
|
||||
Log.i("databridge","got exit request");
|
||||
finishAffinity();
|
||||
});
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
WindowCompat.setDecorFitsSystemWindows(getWindow(), false);
|
||||
EdgeToEdge.enable(this);
|
||||
|
||||
var useInsets = Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE;
|
||||
Log.i("Insets","Using insets:"+useInsets+", sdk_int:"+Build.VERSION.SDK_INT+" "+Build.VERSION_CODES.UPSIDE_DOWN_CAKE);
|
||||
WindowCompat.setDecorFitsSystemWindows(getWindow(), !useInsets);
|
||||
if(useInsets) {
|
||||
Databridge.addResponder("insets", (responder) -> {
|
||||
var view = getWindow().getDecorView();
|
||||
var insets = view.getRootWindowInsets();
|
||||
var topInsetPxSize= insets.getInsetsIgnoringVisibility(WindowInsets.Type.statusBars()).top;
|
||||
var bottomInsetPxSize= insets.getInsetsIgnoringVisibility(WindowInsets.Type.navigationBars()).bottom;
|
||||
var topInsetPxSize = insets.getInsetsIgnoringVisibility(WindowInsets.Type.statusBars()).top;
|
||||
var bottomInsetPxSize = insets.getInsetsIgnoringVisibility(WindowInsets.Type.navigationBars()).bottom;
|
||||
|
||||
var json = "{ \"top\": "+topInsetPxSize+", \"bottom\":"+bottomInsetPxSize+"}";
|
||||
Log.i("insets","Inset sizes are:"+topInsetPxSize+" bottom:"+ bottomInsetPxSize);
|
||||
var json = "{ \"top\": " + topInsetPxSize + ", \"bottom\":" + bottomInsetPxSize + "}";
|
||||
Log.i("insets", "Inset sizes are:" + topInsetPxSize + " bottom:" + bottomInsetPxSize);
|
||||
Databridge.sendAnswerTo(responder, json);
|
||||
});
|
||||
}else{
|
||||
Log.i("insets","Not enabling insets, version to low");
|
||||
Databridge.addResponder("insets", (responder) -> {
|
||||
var json = "{ \"top\": 0, \"bottom\": 0}";
|
||||
Databridge.sendAnswerTo(responder, json);
|
||||
});
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
getOnBackInvokedDispatcher().registerOnBackInvokedCallback(OnBackInvokedDispatcher.PRIORITY_OVERLAY,
|
||||
() -> {
|
||||
System.out.println("Back button pressed");
|
||||
|
@ -88,6 +107,21 @@ public class MainActivity extends BridgeActivity {
|
|||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
|
||||
System.out.println("Back button pressed (old)");
|
||||
if (this.backbutton != null) {
|
||||
Databridge.sendAnswerTo(this.backbutton, "backbutton pressed");
|
||||
}
|
||||
}else{
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private boolean hasGeolocationPermission() {
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
MapComplete has more then 70 maps, each showing features withing a certain topic. For example:
|
||||
MapComplete has more than 70 maps, each showing features within a certain topic. For example:
|
||||
|
||||
- Restaurants, including information about vegan, vegetarian, glutenfree and lactosefree options
|
||||
- Restaurants, including information about vegan, vegetarian, gluten-free and lactose-free options
|
||||
- Shops
|
||||
- healthcare providers such as doctors, pharmacies, dentists, physical therapists,...
|
||||
- Healthcare providers such as doctors, pharmacies, dentists, physical therapists...
|
||||
- Vending machines
|
||||
- Drinking water fountains
|
||||
- Public bookcases
|
||||
- Public toilets
|
||||
- Defibrillators (AED)
|
||||
- Defibrillators (AEDs)
|
||||
- Bicycle pumps and bicycle shops
|
||||
- Artworks and status
|
||||
- Artworks and statues
|
||||
- Benches
|
||||
- Waste baskets and containers
|
||||
- Pubs
|
||||
|
@ -17,7 +17,7 @@ MapComplete has more then 70 maps, each showing features withing a certain topic
|
|||
- Charging stations
|
||||
- Surveillance cameras
|
||||
- Advertisement billboards
|
||||
- cClimbing gyms
|
||||
- Climbing gyms
|
||||
- Schools
|
||||
- Memorials
|
||||
- Hackerspaces
|
||||
|
@ -25,6 +25,5 @@ MapComplete has more then 70 maps, each showing features withing a certain topic
|
|||
|
||||
When selecting an item, all the relevant information is shown in a user-friendly way. Unknown information can be easily added by answering the questions, which will be saved into OpenStreetMap directly (this requires a free account).
|
||||
|
||||
An (anonymous) review can left for some types of features, which is hosted by https://Mangrove.reviews, an libre and open data review project.
|
||||
Images can be added via Panoramax, but will also be pulled from various sources such as Wikipedia and Mapillary.
|
||||
|
||||
An (anonymous) review can be left for some types of features, hosted by https://Mangrove.reviews, a libre and open data review project.
|
||||
Images are fetched from various sources, such as Panoramax, Wikipedia and Mapillary. New images can be contributed to Panoramax directly from within MapComplete.
|
||||
|
|
16
scripts/compile_version.sh
Executable file
16
scripts/compile_version.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#! /bin/bash
|
||||
|
||||
# Edit the 'build.gradle' file to a certain target sdk
|
||||
TAG="$1"
|
||||
LABEL="$2"
|
||||
VERSION="$3"
|
||||
|
||||
echo "Setting $VERSION"
|
||||
# sed -i "s/compileSdkVersion *[0-9]\+/compileSdkVersion $VERSION/" app/build.gradle
|
||||
sed -i "s/minSdk *[0-9]\+/minSdk $VERSION/" app/build.gradle
|
||||
sed -i "s/targetSdkVersion *[0-9]\+/targetSdkVersion $VERSION/" app/build.gradle
|
||||
|
||||
./gradlew build
|
||||
|
||||
scp app/build/outputs/apk/release/app-release.apk hetzner:~/public/apk/mapcomplete-$TAG-$LABEL.apk
|
||||
ssh hetzner "cp ~/public/apk/mapcomplete-$TAG-$LABEL.apk ~/public/apk/mapcomplete-latest-$LABEL.apk"
|
Loading…
Add table
Add a link
Reference in a new issue