Skip to content

Commit

Permalink
Fixed parsing of some geocache attributes. Updated target Android SDK.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Misiarz committed Mar 14, 2022
1 parent b185cd3 commit b95c34a
Show file tree
Hide file tree
Showing 58 changed files with 4,289 additions and 4,170 deletions.
19 changes: 14 additions & 5 deletions README.md
Expand Up @@ -11,7 +11,7 @@ GPX file created by the application is readable by following applications:
* [Cachly](http://www.cach.ly/)
* [Locus](http://www.locusmap.eu/)

_If you test the output GPX format with other applications, please, let me know so I can update the list. Thank you._
_If you test the output GPX format with other applications, please, let me know, so I can update the list. Thank you._

## Disclaimer
Be sure to read [Groundspeak's terms of use](https://www.geocaching.com/account/documents/termsofuse). By using the application you may violate some of them and your Geocaching account may be suspended or deleted.
Expand Down Expand Up @@ -131,7 +131,7 @@ Android version of the tool supports all Android version since Jelly Bean (API 1

As a bonus, the application interacts with popular Android map application called [Locus Map](http://www.locusmap.eu/). You can find shortcuts to gcUnicorn within main _Geocaching functions_ menu and within _Point view_'s share option. If you open the application from later option, latitude and longitude will be transferred from Locus directly into the gcUnicorn.

All the created GPX files are stored within `<externalStorage>/gcUnicorn`.
Up until Android Lollipop (API 21), all the created GPX files are stored within `<externalStorage>/gcUnicorn/gpx`. Starting from API 21, all the GPX files are stored within external application folder `<externalStorage>/Android/data/cz.babi.gcunicorn.android/files/gcUnicorn/gpx`.

## How to build
Clone the repository:
Expand Down Expand Up @@ -161,9 +161,9 @@ java.home=/path/to/proper/jdk
### android
To enable location picking from Google Maps, Google Places API key has to be provided during build time.

To obtain your key, follow the instruction: [Get API Key](https://developers.google.com/places/web-service/get-api-key).
To obtain your key, follow the instruction: [Get API Key](https://developers.google.com/places/web-service/get-api-key) and [Project setup](https://developers.google.com/maps/documentation/places/android-sdk/config). The application doesn't use Places API.

Once you obtain your key, you have to specify it within `/android/src/main/res/values/google_api_key.xml` file. Otherwise location picking won't work properly.
Once you obtain your key, you have to specify it within root project's `local.properties` file. Otherwise, location picking won't work properly.

## Signing
### core & webapp
Expand All @@ -190,7 +190,7 @@ If you want to use any of the methods mentioned above, you have to create `keyst

### android
_Android_ module uses standard signing described on Android [publishing](https://developer.android.com/studio/publish/app-signing) page.
To enable signing, simply create `keystore.properties` within the module directory and and specify additional (self-explanatory) properties:
To enable signing, simply create `keystore.properties` within the module directory and specify additional (self-explanatory) properties:
* `keyAlias`
* `keyPassword`
* `storeFile`
Expand Down Expand Up @@ -236,6 +236,12 @@ Once the properties are provided, signing will be enabled automatically.
* Added signing options to all modules.
* Updated dependencies to newer versions.

##### 2022-03-14: core v2.0.5 & webapp v1.0.8 & android v1.0.6
* __core__
* Fixed parsing of some attributes.
* __android__
* Added support for Android 13.

## How to contribute
Any kind of contribution is welcome. If you have any ideas, bug-fxies or improvements, just create a pull request or contact me via email. Thank you.

Expand All @@ -245,3 +251,6 @@ Any kind of contribution is welcome. If you have any ideas, bug-fxies or improve
## Acknowledgment
Special thanks to [c:geo](https://github.com/cgeo/cgeo) team for inspiring me to create the application.

## Roadmap

* A manager for already created GPX files. ETA depends on users requests..
54 changes: 24 additions & 30 deletions android/build.gradle
Expand Up @@ -18,7 +18,8 @@

buildscript {
ext {
versionAndroidTools = '3.5.2'
versionAndroidTools = '7.0.4'
versionSecrets = '2.0.1'
}

repositories {
Expand All @@ -29,45 +30,34 @@ buildscript {
dependencies {
classpath "com.android.tools.build:gradle:$versionAndroidTools"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versionKotlin"
classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:$versionSecrets"
}
}

apply plugin: 'com.android.application'
apply plugin: 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'org.jetbrains.kotlin.plugin.parcelize'
apply plugin: 'kotlin-kapt'

ext {
versionLocusApi = '0.3.0'
versionDagger = '2.19'
// https://dl.google.com/dl/android/maven2/index.html
versionAndroidSupport = '28.0.0'
// https://issuetracker.google.com/issues/37060038
// https://github.com/Gericop/Android-Support-Preference-V7-Fix
versionFixSupport = '28.0.0.0'
// Android constraint library.
versionAndroidConstraint = '1.1.3'
// Version Google play services Places.
// https://developers.google.com/android/guides/setup
versionPlayServicesPlaces = '16.0.0'
// Version Multidex.
versionMultidex = '1.0.3'
}

dependencies {
implementation project(':gcUnicorn-core')
implementation(
"org.jetbrains.kotlinx:kotlinx-coroutines-android:$versionKotlinCoroutines",
"com.android.support:support-core-ui:$versionAndroidSupport",
"com.android.support:design:$versionAndroidSupport",
"com.android.support:appcompat-v7:$versionAndroidSupport",
"com.android.support:preference-v7:$versionAndroidSupport",
"com.android.support.constraint:constraint-layout:$versionAndroidConstraint",
"androidx.legacy:legacy-support-core-ui:$versionAndroidX",
"com.google.android.material:material:$versionAndroidX",
"androidx.appcompat:appcompat:$versionAndroidX",
"androidx.preference:preference:$versionAndroidX",
"androidx.constraintlayout:constraintlayout:$versionAndroidConstraint",
"com.google.dagger:dagger:$versionDagger",
"com.asamm:locus-api-android:$versionLocusApi",
"com.takisoft.fix:preference-v7:$versionFixSupport",
"com.google.android.gms:play-services-places:$versionPlayServicesPlaces",
"com.android.support:multidex:$versionMultidex"
"androidx.preference:preference:$versionAndroidX",
"com.takisoft.preferencex:preferencex:$versionFixSupport",
"com.google.android.libraries.places:places:$versionPlaces",
"androidx.multidex:multidex:$versionMultidex",
"com.github.suchoX:PlacePicker:$versionPlacePicker",
"com.google.android.material:material:$versionMaterial",
"com.google.android.gms:play-services-maps:$versionPlayServicesMaps"
)
runtimeOnly(
"org.slf4j:slf4j-android:$versionSlf4J"
Expand All @@ -88,18 +78,22 @@ configurations.all {
}

android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
setCompileSdkVersion 32
buildToolsVersion '30.0.3'

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

buildFeatures {
viewBinding true
}

defaultConfig {
applicationId 'cz.babi.gcunicorn.android'

minSdkVersion 16
targetSdkVersion 28
targetSdkVersion 32

multiDexEnabled true

Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Expand Up @@ -16,4 +16,4 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#

version=1.0.5
version=1.0.6
29 changes: 15 additions & 14 deletions android/proguard-rules/proguard-kotlin.pro
@@ -1,14 +1,15 @@
# Kotlin
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
static void checkParameterIsNotNull(java.lang.Object, java.lang.String);
}

-keep interface kotlin.reflect.jvm.internal.impl.builtins.BuiltInsLoader
-keep class kotlin.reflect.jvm.internal.impl.serialization.deserialization.builtins.BuiltInsLoaderImpl
-keep class kotlin.reflect.jvm.internal.impl.load.java.FieldOverridabilityCondition
-keep class kotlin.reflect.jvm.internal.impl.load.java.ErasedOverridabilityCondition
-keep class kotlin.reflect.jvm.internal.impl.load.java.JavaIncompatibilityRulesOverridabilityCondition

-keepclassmembers class kotlin.Metadata {
public <methods>;
}
# Kotlin
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
static void checkParameterIsNotNull(java.lang.Object, java.lang.String);
}

-keep interface kotlin.reflect.jvm.internal.impl.builtins.BuiltInsLoader
-keep class kotlin.reflect.jvm.internal.impl.serialization.deserialization.builtins.BuiltInsLoaderImpl
-keep class kotlin.reflect.jvm.internal.impl.load.java.FieldOverridabilityCondition
-keep class kotlin.reflect.jvm.internal.impl.load.java.ErasedOverridabilityCondition
-keep class kotlin.reflect.jvm.internal.impl.load.java.JavaIncompatibilityRulesOverridabilityCondition
-keep class kotlinx.android.parcel.Parcelize

-keepclassmembers class kotlin.Metadata {
public <methods>;
}

0 comments on commit b95c34a

Please sign in to comment.