From b673c0767f27faa1d5e86a305f3a3734ff2d80be Mon Sep 17 00:00:00 2001 From: wiecktobi Date: Mon, 18 May 2020 11:00:20 +0200 Subject: [PATCH] Fixed --- android/.idea/misc.xml | 2 +- android/app/build.gradle | 8 ++++++-- android/app/src/main/AndroidManifest.xml | 1 + android/app/src/main/java/de/hft/geotracker/Login.kt | 7 ++++--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/android/.idea/misc.xml b/android/.idea/misc.xml index dfd2c79..b6ea2b1 100644 --- a/android/.idea/misc.xml +++ b/android/.idea/misc.xml @@ -1,6 +1,6 @@ - + diff --git a/android/app/build.gradle b/android/app/build.gradle index cf67e9b..cb3d488 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -26,6 +26,10 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } } @@ -47,6 +51,6 @@ dependencies { implementation "android.arch.navigation:navigation-fragment-ktx:2.2.2" implementation "android.arch.navigation:navigation-ui-ktx:2.2.2" - implementation 'com.squareup.retrofit2:retrofit:2.1.0' - implementation 'com.squareup.retrofit2:converter-gson:2.1.0' + implementation 'com.squareup.retrofit2:retrofit:2.8.1' + implementation 'com.squareup.retrofit2:converter-gson:2.8.1' } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index f4a3ae1..9ef0dfd 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -2,6 +2,7 @@ + diff --git a/android/app/src/main/java/de/hft/geotracker/Login.kt b/android/app/src/main/java/de/hft/geotracker/Login.kt index 30af167..f9e942f 100644 --- a/android/app/src/main/java/de/hft/geotracker/Login.kt +++ b/android/app/src/main/java/de/hft/geotracker/Login.kt @@ -6,6 +6,7 @@ import androidx.fragment.app.Fragment import android.widget.TextView import android.widget.Toast import androidx.appcompat.app.AppCompatActivity +import okhttp3.HttpUrl import retrofit2.Call import retrofit2.Callback import retrofit2.Response @@ -27,8 +28,8 @@ class Login : AppCompatActivity() { val retrofit = Retrofit.Builder() .baseUrl("http://plesk.icaotix.de:5000") - .addConverterFactory(GsonConverterFactory.create()) - .build() + .addConverterFactory(GsonConverterFactory.create()) + .build() service = retrofit.create(GeofenceService::class.java) login = findViewById(R.id.button_create_account) @@ -58,7 +59,7 @@ class Login : AppCompatActivity() { var headers = response.headers() var authentication = headers.get("Authorization") - token = JWToken(authentication) + token = JWToken(authentication!!) println(response.code()) println(token.token)