├── app ├── .gitignore ├── src │ ├── main │ │ ├── ic_playstore.png │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── configure_0.png │ │ │ │ ├── configure_1.png │ │ │ │ ├── configure_2.png │ │ │ │ ├── configure_3.png │ │ │ │ ├── configure_4.png │ │ │ │ └── ic_launcher_foreground.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 │ │ │ ├── drawable-hdpi │ │ │ │ └── ic_osmand_logo.png │ │ │ ├── drawable-mdpi │ │ │ │ ├── ic_osmand_logo.png │ │ │ │ └── ic_sync_action.xml │ │ │ ├── drawable-xhdpi │ │ │ │ └── ic_osmand_logo.png │ │ │ ├── drawable-xxhdpi │ │ │ │ └── ic_osmand_logo.png │ │ │ ├── values │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── styles.xml │ │ │ │ └── strings.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── layout │ │ │ │ ├── settings_activity.xml │ │ │ │ ├── dialog_install_osm_and.xml │ │ │ │ ├── activity_intro_welcome.xml │ │ │ │ ├── activity_intro_directory.xml │ │ │ │ ├── activity_intro_install_osmand.xml │ │ │ │ └── activity_intro_configure_osmand.xml │ │ │ ├── menu │ │ │ │ └── settings_activity.xml │ │ │ ├── drawable-v24 │ │ │ │ └── folder.xml │ │ │ └── xml │ │ │ │ └── root_preferences.xml │ │ ├── java │ │ │ └── org │ │ │ │ └── decsync │ │ │ │ └── osmand │ │ │ │ ├── external │ │ │ │ ├── PlatformUtil.java │ │ │ │ ├── Algorithms.java │ │ │ │ ├── ColorDialogs.java │ │ │ │ ├── OsmAndAidlHelper.java │ │ │ │ └── GPXUtilities.java │ │ │ │ ├── model │ │ │ │ ├── OsmandCategory.kt │ │ │ │ ├── AppDatabase.kt │ │ │ │ ├── FavoriteDao.kt │ │ │ │ ├── CategoryDao.kt │ │ │ │ ├── DecsyncFavorite.kt │ │ │ │ ├── OsmandFavorite.kt │ │ │ │ ├── DecsyncCategory.kt │ │ │ │ └── DecsyncItem.kt │ │ │ │ ├── PrefUtils.kt │ │ │ │ ├── Utils.kt │ │ │ │ ├── SettingsActivity.kt │ │ │ │ ├── DecsyncListeners.kt │ │ │ │ ├── DiffUtil.kt │ │ │ │ ├── DecsyncUtils.kt │ │ │ │ └── IntroActivity.kt │ │ └── AndroidManifest.xml │ └── test │ │ └── java │ │ └── org │ │ └── decsync │ │ └── osmand │ │ └── ModelTest.kt ├── proguard-rules.pro ├── build.gradle └── schemas │ └── org.decsync.osmand.model.AppDatabase │ └── 1.json ├── settings.gradle ├── screenshots ├── Screenshot_0.png ├── Screenshot_1.png ├── Screenshot_2.png ├── Screenshot_3.png └── Screenshot_4.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── README.md ├── gradle.properties ├── .gitignore ├── gradlew.bat ├── gradlew ├── svg └── logo.svg └── LICENSE.txt /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | rootProject.name = "OsmAnd DecSync" -------------------------------------------------------------------------------- /app/src/main/ic_playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/ic_playstore.png -------------------------------------------------------------------------------- /screenshots/Screenshot_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/screenshots/Screenshot_0.png -------------------------------------------------------------------------------- /screenshots/Screenshot_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/screenshots/Screenshot_1.png -------------------------------------------------------------------------------- /screenshots/Screenshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/screenshots/Screenshot_2.png -------------------------------------------------------------------------------- /screenshots/Screenshot_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/screenshots/Screenshot_3.png -------------------------------------------------------------------------------- /screenshots/Screenshot_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/screenshots/Screenshot_4.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/configure_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/drawable/configure_0.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/configure_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/drawable/configure_1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/configure_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/drawable/configure_2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/configure_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/drawable/configure_3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/configure_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/drawable/configure_4.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_osmand_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/drawable-hdpi/ic_osmand_logo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_osmand_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/drawable-mdpi/ic_osmand_logo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_osmand_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/drawable-xhdpi/ic_osmand_logo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_osmand_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/drawable-xxhdpi/ic_osmand_logo.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/39aldo39/OsmAnd-DecSync/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 30sp 4 | 16sp 5 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Oct 20 18:50:54 CEST 2020 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/layout/settings_activity.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/menu/settings_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/folder.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | OsmAnd DecSync 2 | ============== 3 | 4 | OsmAnd DecSync is an Android application which synchronizes the favorites of [OsmAnd](https://osmand.net) using [DecSync](https://github.com/39aldo39/DecSync) without requiring a server. To start synchronizing, all you have to do is synchronize your selected DecSync directory, using for example [Syncthing](https://syncthing.net). 5 | 6 | Donations 7 | --------- 8 | 9 | ### PayPal 10 | [![](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4V96AFD3S4TPJ) 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_sync_action.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFA033 4 | #EE5622 5 | #008BF8 6 | 7 | #2f7af5 8 | 9 | #20000000 10 | #EF6C00 11 | #0277BD 12 | #F9A825 13 | #009688 14 | #404040 15 | -------------------------------------------------------------------------------- /app/src/main/java/org/decsync/osmand/external/PlatformUtil.java: -------------------------------------------------------------------------------- 1 | package org.decsync.osmand.external; 2 | 3 | // Stripped from net.osmand.PlatformUtil 4 | // 5 | 6 | import org.xmlpull.v1.XmlPullParser; 7 | import org.xmlpull.v1.XmlPullParserException; 8 | 9 | public class PlatformUtil { 10 | public static XmlPullParser newXMLPullParser() throws XmlPullParserException{ 11 | org.kxml2.io.KXmlParser xmlParser = new org.kxml2.io.KXmlParser(); 12 | xmlParser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true); 13 | return xmlParser; 14 | } 15 | } -------------------------------------------------------------------------------- /app/src/main/java/org/decsync/osmand/model/OsmandCategory.kt: -------------------------------------------------------------------------------- 1 | package org.decsync.osmand.model 2 | 3 | sealed class OsmandCategoryOrDefault { 4 | abstract val name: String 5 | abstract val colorTag: String 6 | abstract val visible: Boolean 7 | } 8 | 9 | data class OsmandCategory( 10 | override val name: String, override val colorTag: String, override val visible: Boolean 11 | ) : OsmandCategoryOrDefault() { 12 | fun toDecsyncCategory(id: String): DecsyncCategory { 13 | return DecsyncCategory(id, name, colorTag, visible) 14 | } 15 | } 16 | 17 | object DefaultOsmandCategory : OsmandCategoryOrDefault() { 18 | override val name = "Favorites" 19 | override val colorTag = "yellow" 20 | override val visible = true 21 | } -------------------------------------------------------------------------------- /app/src/main/java/org/decsync/osmand/model/AppDatabase.kt: -------------------------------------------------------------------------------- 1 | package org.decsync.osmand.model 2 | 3 | import android.content.Context 4 | import androidx.room.Database 5 | import androidx.room.Room 6 | import androidx.room.RoomDatabase 7 | 8 | @Database(entities = [DecsyncFavorite::class, DecsyncCategory::class], version = 1) 9 | abstract class AppDatabase : RoomDatabase() { 10 | abstract fun favoriteDao(): FavoriteDao 11 | abstract fun categoryDao(): CategoryDao 12 | 13 | companion object { 14 | private const val DATABASE_NAME = "db" 15 | 16 | fun createDatabase(context: Context): AppDatabase { 17 | return Room.databaseBuilder(context.applicationContext, AppDatabase::class.java, DATABASE_NAME).build() 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /app/src/main/java/org/decsync/osmand/model/FavoriteDao.kt: -------------------------------------------------------------------------------- 1 | package org.decsync.osmand.model 2 | 3 | import androidx.room.* 4 | 5 | @Dao 6 | abstract class FavoriteDao { 7 | @get:Query("SELECT * FROM favorites") 8 | abstract val all: List 9 | 10 | @Query("SELECT * FROM favorites where favId = :favId") 11 | abstract fun findById(favId: String): DecsyncFavorite? 12 | 13 | @Insert(onConflict = OnConflictStrategy.REPLACE) 14 | abstract fun insert(vararg favorites: DecsyncFavorite) 15 | 16 | @Update 17 | abstract fun update(vararg favorites: DecsyncFavorite) 18 | 19 | @Delete 20 | abstract fun delete(vararg favorites: DecsyncFavorite) 21 | 22 | @Query("DELETE FROM favorites") 23 | abstract fun deleteAll() 24 | } -------------------------------------------------------------------------------- /app/src/main/java/org/decsync/osmand/model/CategoryDao.kt: -------------------------------------------------------------------------------- 1 | package org.decsync.osmand.model 2 | 3 | import androidx.room.* 4 | 5 | @Dao 6 | abstract class CategoryDao { 7 | @get:Query("SELECT * FROM categories") 8 | abstract val all: List 9 | 10 | @Query("SELECT * FROM categories where catId = :catId") 11 | abstract fun findById(catId: String): DecsyncCategory? 12 | 13 | @Insert(onConflict = OnConflictStrategy.REPLACE) 14 | abstract fun insert(vararg categories: DecsyncCategory) 15 | 16 | @Update 17 | abstract fun update(vararg categories: DecsyncCategory) 18 | 19 | @Delete 20 | abstract fun delete(vararg categories: DecsyncCategory) 21 | 22 | @Query("DELETE FROM categories") 23 | abstract fun deleteAll() 24 | } -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 15 | -------------------------------------------------------------------------------- /app/src/main/java/org/decsync/osmand/model/DecsyncFavorite.kt: -------------------------------------------------------------------------------- 1 | package org.decsync.osmand.model 2 | 3 | import androidx.room.Entity 4 | import androidx.room.Index 5 | import androidx.room.PrimaryKey 6 | 7 | @Entity(tableName = "favorites", 8 | indices = [(Index(value = ["favId"], unique = true))]) 9 | data class DecsyncFavorite( 10 | @PrimaryKey val favId: String, 11 | var lat: Double, var lon: Double, 12 | var name: String, var description: String?, 13 | var catId: String? 14 | ) { 15 | companion object { 16 | fun default(favId: String): DecsyncFavorite = DecsyncFavorite(favId, 0.0, 0.0, favId, null, null) 17 | } 18 | 19 | @ExperimentalStdlibApi 20 | fun getMapsFavorite(): Maps.Favorite { 21 | return Maps.Favorite(favId, lat, lon, name, description, catId) { catId } 22 | } 23 | } -------------------------------------------------------------------------------- /app/src/main/java/org/decsync/osmand/model/OsmandFavorite.kt: -------------------------------------------------------------------------------- 1 | package org.decsync.osmand.model 2 | 3 | data class OsmandFavorite( 4 | val lat: Double, val lon: Double, 5 | val name: String, val description: String?, 6 | val catName: String, val colorTag: String, val visible: Boolean 7 | ) { 8 | fun getCategory(): OsmandCategoryOrDefault { 9 | if (catName == DefaultOsmandCategory.name && 10 | colorTag == DefaultOsmandCategory.colorTag && 11 | visible == DefaultOsmandCategory.visible) { 12 | return DefaultOsmandCategory 13 | } 14 | return OsmandCategory(catName, colorTag, visible) 15 | } 16 | 17 | fun toDecsyncFavorite(id: String, catId: String?): DecsyncFavorite { 18 | return DecsyncFavorite(id, lat, lon, name, description, catId) 19 | } 20 | } -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true 20 | # Kotlin code style for this project: "official" or "obsolete": 21 | kotlin.code.style=official -------------------------------------------------------------------------------- /app/src/main/java/org/decsync/osmand/model/DecsyncCategory.kt: -------------------------------------------------------------------------------- 1 | package org.decsync.osmand.model 2 | 3 | import androidx.room.Entity 4 | import androidx.room.Index 5 | import androidx.room.PrimaryKey 6 | import org.decsync.osmand.Utils 7 | 8 | sealed class DecsyncCategoryOrDefault { 9 | abstract val name: String 10 | abstract val colorTag: String 11 | abstract val visible: Boolean 12 | } 13 | 14 | @Entity(tableName = "categories", 15 | indices = [(Index(value = ["catId"], unique = true))]) 16 | data class DecsyncCategory( 17 | @PrimaryKey val catId: String, 18 | override var name: String, override var colorTag: String, override var visible: Boolean 19 | ) : DecsyncCategoryOrDefault() { 20 | companion object { 21 | fun default(catId: String): DecsyncCategory = DecsyncCategory(catId, catId, "black", true) 22 | } 23 | 24 | @ExperimentalStdlibApi 25 | fun getMapsCategory(): Maps.Category { 26 | val colorString = Utils.colorStringForTag(colorTag) 27 | return Maps.Category(catId, name, colorString, visible) 28 | } 29 | } 30 | 31 | object DefaultDecsyncCategory : DecsyncCategoryOrDefault() { 32 | override val name = "Favorites" 33 | override val colorTag = "yellow" 34 | override val visible = true 35 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/res/xml/root_preferences.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 6 | 8 | 9 | 10 | 11 | 12 | 17 | 18 | 19 | 20 | 24 | 25 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | *.aab 5 | 6 | # Files for the ART/Dalvik VM 7 | *.dex 8 | 9 | # Java class files 10 | *.class 11 | 12 | # Generated files 13 | bin/ 14 | gen/ 15 | out/ 16 | # Uncomment the following line in case you need and you don't have the release build type files in your app 17 | # release/ 18 | 19 | # Gradle files 20 | .gradle/ 21 | build/ 22 | 23 | # Local configuration file (sdk path, etc) 24 | local.properties 25 | 26 | # Proguard folder generated by Eclipse 27 | proguard/ 28 | 29 | # Log Files 30 | *.log 31 | 32 | # Android Studio Navigation editor temp files 33 | .navigation/ 34 | 35 | # Android Studio captures folder 36 | captures/ 37 | 38 | # IntelliJ 39 | *.iml 40 | .idea 41 | 42 | # Keystore files 43 | # Uncomment the following lines if you do not want to check your keystore files in. 44 | #*.jks 45 | #*.keystore 46 | 47 | # External native build folder generated in Android Studio 2.2 and later 48 | .externalNativeBuild 49 | 50 | # Google Services (e.g. APIs or Firebase) 51 | # google-services.json 52 | 53 | # Freeline 54 | freeline.py 55 | freeline/ 56 | freeline_project_description.json 57 | 58 | # fastlane 59 | fastlane/report.xml 60 | fastlane/Preview.html 61 | fastlane/screenshots 62 | fastlane/test_output 63 | fastlane/readme.md 64 | 65 | # Version control 66 | vcs.xml 67 | 68 | # lint 69 | lint/intermediates/ 70 | lint/generated/ 71 | lint/outputs/ 72 | lint/tmp/ 73 | # lint/reports/ 74 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_install_osm_and.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 20 | 21 | 27 | 28 | 29 | 30 | 36 | 37 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-android-extensions' 4 | apply plugin: 'kotlin-kapt' 5 | 6 | android { 7 | compileSdkVersion 31 8 | 9 | defaultConfig { 10 | applicationId "org.decsync.osmand" 11 | minSdkVersion 21 12 | targetSdkVersion 31 13 | versionCode 2 14 | versionName "0.2" 15 | } 16 | 17 | buildTypes { 18 | release { 19 | minifyEnabled false 20 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 21 | } 22 | } 23 | } 24 | 25 | kapt { 26 | arguments { 27 | arg("room.schemaLocation", "$projectDir/schemas") 28 | } 29 | } 30 | 31 | dependencies { 32 | implementation fileTree(dir: "libs", include: ["*.jar"]) 33 | implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" 34 | implementation 'androidx.core:core-ktx:1.7.0' 35 | implementation 'androidx.appcompat:appcompat:1.4.0' 36 | implementation 'androidx.preference:preference-ktx:1.1.1' 37 | implementation 'androidx.room:room-runtime:2.4.0' 38 | implementation 'androidx.work:work-runtime:2.7.1' 39 | implementation 'com.google.android.material:material:1.4.0' 40 | kapt 'androidx.room:room-compiler:2.4.0' 41 | implementation "net.osmand:android-aidl-lib:master-snapshot@aar" 42 | implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.1" 43 | implementation "org.decsync:libdecsync:2.2.1" 44 | implementation "net.sf.kxml:kxml2:2.3.0" 45 | implementation 'com.github.AppIntro:AppIntro:6.1.0' 46 | 47 | testImplementation 'junit:junit:4.13.2' 48 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_intro_welcome.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 25 | 26 | 31 | 32 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_intro_directory.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 25 | 26 | 31 | 32 |