├── LICENSE
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── mapitall
│ │ └── SwiftAddress
│ │ └── ExampleInstrumentedTest.kt
│ ├── main
│ ├── AndroidManifest.xml
│ ├── ic_launcher-playstore.png
│ ├── java
│ │ └── com
│ │ │ └── mapitall
│ │ │ └── SwiftAddress
│ │ │ ├── AddressMarkerWindow.kt
│ │ │ ├── BackgroundImagery
│ │ │ ├── BackgroundImagery.kt
│ │ │ ├── BackgroundImageryFragment.kt
│ │ │ ├── ChangeBackgroundImageryFragment.kt
│ │ │ ├── DownloadHouseNumbersFragment.kt
│ │ │ └── DownloadTilesFragment.kt
│ │ │ ├── ChangeBackgroundImageryFragment.kt
│ │ │ ├── ClassicMainActivity.kt
│ │ │ ├── DownloadTilesFragment.kt
│ │ │ ├── GPSTracker.kt
│ │ │ ├── ImageMarkerWindow.kt
│ │ │ ├── InstantAutoComplete.kt
│ │ │ ├── Keypad.kt
│ │ │ ├── MainActivity.kt
│ │ │ ├── Map.kt
│ │ │ ├── NoteMarkerWindow.kt
│ │ │ ├── Parent.kt
│ │ │ ├── PolylineMarkerWindow.kt
│ │ │ ├── Settings.kt
│ │ │ └── StoreHouseNumbers.kt
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ ├── add_photo.xml
│ │ ├── address.xml
│ │ ├── address_downloaded.xml
│ │ ├── audio.xml
│ │ ├── backspace.xml
│ │ ├── bing_satellite.webp
│ │ ├── camera.xml
│ │ ├── center_focus.xml
│ │ ├── check.xml
│ │ ├── clear.xml
│ │ ├── cross.xml
│ │ ├── crosshair.xml
│ │ ├── download.xml
│ │ ├── gear_settings.xml
│ │ ├── horizontal_bar.xml
│ │ ├── house.xml
│ │ ├── house_foreground.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── left_arrow.xml
│ │ ├── left_gradient.xml
│ │ ├── map.xml
│ │ ├── mapbox_satellite.webp
│ │ ├── menu.xml
│ │ ├── microphone.xml
│ │ ├── minus.xml
│ │ ├── north_icon.xml
│ │ ├── note.xml
│ │ ├── osm_carto.webp
│ │ ├── plus.xml
│ │ ├── point.xml
│ │ ├── recover.xml
│ │ ├── right_arrow.xml
│ │ ├── right_gradient.xml
│ │ ├── ripple_image.xml
│ │ ├── rounded_button.xml
│ │ ├── rounded_image_button.xml
│ │ ├── rounded_image_view.xml
│ │ ├── rounded_layout.xml
│ │ ├── rounded_layout_ripple.xml
│ │ ├── save.xml
│ │ ├── slide_menu.xml
│ │ ├── undo.xml
│ │ ├── up_arrow.xml
│ │ └── upload.xml
│ │ ├── layout
│ │ ├── activity_background_imagery.xml
│ │ ├── activity_classic_main.xml
│ │ ├── activity_keypad.xml
│ │ ├── activity_main.xml
│ │ ├── activity_mini_keypad.xml
│ │ ├── activity_mini_keypad_relative.xml
│ │ ├── activity_parent.xml
│ │ ├── activity_settings.xml
│ │ ├── address_press_layout.xml
│ │ ├── address_press_layout_linear.xml
│ │ ├── fragment_background_imagery.xml
│ │ ├── fragment_change_background_imagery_fragement.xml
│ │ ├── fragment_download_tiles.xml
│ │ ├── image_press_layout_linear.xml
│ │ ├── nav_header.xml
│ │ ├── note_press_layout_linear.xml
│ │ └── polyline_press_layout_linear.xml
│ │ ├── menu
│ │ ├── mini_keypad_menu.xml
│ │ └── nav_header_menu.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── values-night
│ │ ├── colors.xml
│ │ └── themes.xml
│ │ ├── values
│ │ ├── arrays.xml
│ │ ├── attributes.xml
│ │ ├── colors.xml
│ │ ├── dimentions.xml
│ │ ├── keys.xml
│ │ ├── purple_backround.xml
│ │ ├── strings.xml
│ │ └── themes.xml
│ │ └── xml
│ │ ├── paths.xml
│ │ └── root_preferences.xml
│ └── test
│ └── java
│ └── com
│ └── mapitall
│ └── SwiftAddress
│ └── ExampleUnitTest.kt
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── local.properties
└── settings.gradle
/README.md:
--------------------------------------------------------------------------------
1 | # SwiftAddress
2 | **THIS APPLICATION IS NO LONGER BEING DEVELOPED.**
3 |
4 | Feel free to fork it and continue its development if you want. Note: The apk file in the Releases page is out of date. If you want the latest version, please download android studio and build this project yourself.
5 |
6 | In android studio , the "build" button doesn't work but the "run" button does.
7 |
8 | If you want to generate an apk file, you should run this command:
9 |
10 | ```
11 | ./gradlew :app:assembleRelease
12 | ```
13 |
14 | You can then sign the generated apk in the terminal using `apksigner`. This is all mentioned in this guide:
15 |
16 | https://developer.android.com/studio/build/building-cmdline
17 |
18 | If you want to know more about this app **no longer being developed**, follow this link:
19 |
20 | https://lists.openstreetmap.org/pipermail/talk/2021-May/086565.html
21 |
22 | **WARNING: If you decide to take surveys with this app, please, please test if it works first. Either take a small survey (e.g. a 10 minute one) and open the files in JOSM and check that everything works, or simply add some fake addresses, notes and images and see if you can open this data in JOSM. You could lose data if you don't test that this application works.**
23 |
24 | This application is designed to be able to efficiently collect housenumbers for OSM.
25 |
26 | ~~It is still a work in progress.~~
27 |
28 | ## Missing features
29 |
30 | * Hasn't been tested on any emulators (I couldn't get them to work). Currently the only device it has been tested on is my own phone (Pocophone F1, lineage os 17.1)
31 | * Audio notes
32 | * fix add note dialog showing up when long press is being consumed by one of the arrows
33 | * Be able to request permissions more than once on startup
34 | * Display location marker as soon as location is found by device (currently location is only shown on app startup)
35 | * More imagery layers, nicer layout to switch between imageries (possibly custom imageries too)
36 | * Upload directly to OSM
37 |
38 | And probably a few more features I haven't listed here
39 |
40 | ## Information
41 |
42 | Minimum android version is Android 5.0 (Lolipop).
43 |
44 | To find areas with missing housenumbers, use [OSM Inspector](https://tools.geofabrik.de/osmi/?view=geometry&lon=-12.00000&lat=25.00000&zoom=3) or [qa.poole.ch](http://qa.poole.ch/) (check "has addresses" to see all the areas that you should avoid).
45 |
46 | ## Images
47 |
48 | Most icons are provided by Google Material Icons, which are under Apache License.
49 |
50 | The icon for an address and note on the map is provided by streetcomplete, and they are licensed under CC-BY-SA.
51 |
52 | The icon for an image on the map (camera.xml) is provided by [Elegant Themes]( http://www.elegantthemes.com/blog/freebie-of-the-week/beautiful-flat-icons-for-free), however the camera icon was found on [Wikipedia](https://en.m.wikipedia.org/wiki/File:Circle-icons-camera.svg). The license of this camera icon is GNU GPL Version 2.
53 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | id 'kotlin-android'
4 | id 'kotlin-parcelize'
5 | }
6 |
7 | android {
8 | compileSdkVersion 30
9 | buildToolsVersion "30.0.2"
10 |
11 | defaultConfig {
12 | applicationId "com.mapitall.SwiftAddress"
13 | minSdkVersion 21
14 | targetSdkVersion 30
15 | versionCode 8
16 | versionName "0.3.0"
17 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
18 | }
19 |
20 | buildTypes {
21 | release {
22 | minifyEnabled false
23 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
24 | }
25 | }
26 | compileOptions {
27 | sourceCompatibility JavaVersion.VERSION_1_8
28 | targetCompatibility JavaVersion.VERSION_1_8
29 | }
30 | kotlinOptions {
31 | jvmTarget = '1.8'
32 | }
33 | }
34 |
35 | repositories {
36 | mavenCentral()
37 | }
38 |
39 |
40 | dependencies {
41 | implementation "org.jetbrains.kotlin:kotlin-stdlib:1.4.32"
42 | implementation 'androidx.core:core-ktx:1.3.2'
43 | implementation 'androidx.appcompat:appcompat:1.2.0'
44 | implementation 'com.google.android.material:material:1.3.0'
45 | implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
46 | implementation 'androidx.legacy:legacy-support-v4:1.0.0'
47 | testImplementation 'junit:junit:4.13.2'
48 | androidTestImplementation 'androidx.test.ext:junit:1.1.2'
49 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
50 | implementation 'org.osmdroid:osmdroid-android:6.1.10'
51 | implementation 'com.github.MKergall:osmbonuspack:6.6.0'
52 | implementation 'androidx.preference:preference-ktx:1.1.1'
53 | implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0'
54 | implementation "com.github.mancj:SlideUp-Android:2.2.8"
55 | implementation 'ru.ztrap:RxSlideUp2:2.0.1' //optional, for reactive listeners based on RxJava-2
56 | implementation 'androidx.exifinterface:exifinterface:1.3.2'
57 | implementation 'de.westnordost:osmapi-overpass:1.3'
58 | }
59 |
60 | configurations {
61 | all*.exclude group: 'net.sf.kxml', module: 'kxml2'
62 |
63 | cleanedAnnotations
64 | compile.exclude group: 'org.jetbrains', module:'annotations'
65 | compile.exclude group: 'com.intellij', module:'annotations'
66 | compile.exclude group: 'org.intellij', module:'annotations'
67 | }
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/mapitall/SwiftAddress/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.mapitall.SwiftAddress
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.mapitall.SwiftAddress", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
32 |
35 |
38 |
41 |
44 |
45 |
46 |
51 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IpswichMapper/SwiftAddress/6c86200f96d2117d82fbbc563272fbcb1e86c009/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/main/java/com/mapitall/SwiftAddress/AddressMarkerWindow.kt:
--------------------------------------------------------------------------------
1 | package com.mapitall.SwiftAddress
2 |
3 | import android.annotation.SuppressLint
4 | import android.app.AlertDialog
5 | import android.content.Context
6 | import android.util.Log
7 | import android.view.View
8 | import android.view.ViewGroup
9 | import android.view.inputmethod.InputMethodManager
10 | import android.widget.*
11 | import androidx.core.content.ContextCompat
12 | import androidx.core.widget.addTextChangedListener
13 | import org.osmdroid.util.GeoPoint
14 | import org.osmdroid.views.overlay.infowindow.InfoWindow
15 |
16 | class AddressMarkerWindow(pressLayoutId : Int,
17 | private val mapClass: Map,
18 | private val context: Context,
19 | private val ID : Long,
20 | private val mainActivity: MainActivity,
21 | private var houseNumber : String = "",
22 | private var street : String = "",
23 | private var houseName: String,
24 | private val downloaded: Boolean = false) :
25 | InfoWindow(pressLayoutId, mapClass.mapView) {
26 |
27 | private val TAG = "MarkerWindow"
28 | private val storeHouseNumbersObject = StoreHouseNumbers(context)
29 |
30 | val houseNumberEditText = mView.findViewById(R.id.housenumber_edit_text)
31 | val streetNameEditText = mView.findViewById(R.id.street_name_edit_text)
32 | val houseNameEditText = mView.findViewById(R.id.house_name_edit_text)
33 | // val houseNameEditText = mView.findViewById(R.id.housename_edit_text)
34 |
35 | @SuppressLint("SetTextI18n")
36 | override fun onOpen(item: Any?) {
37 | closeAllInfoWindowsOn(mapView)
38 |
39 | if (houseNumber != "") houseNumberEditText.setText(houseNumber)
40 | if (street != "") streetNameEditText.setText(street)
41 |
42 | Log.i(TAG, "InfoWindow Opened.")
43 |
44 | mView.setOnClickListener {
45 | close()
46 | }
47 |
48 | if (houseName != "") houseNameEditText.setText(houseName)
49 |
50 | val moveButton = mView.findViewById