Compare commits
4 Commits
46da74fa89
...
v0.4.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 7848f9ad2d | |||
| 230421065b | |||
| e22e748b28 | |||
| 339ee7629b |
@@ -1,6 +1,7 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
|
||||
+2
-2
@@ -23,8 +23,8 @@ android {
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 34
|
||||
compileSdkVersion 34
|
||||
versionCode 9
|
||||
versionName "0.4.0"
|
||||
versionCode 10
|
||||
versionName "0.4.1"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
<queries>
|
||||
<package android:name="com.nextcloud.client" />
|
||||
<!-- To see if Google Maps is installed, as it needs a specific intent Uri) -->
|
||||
<package android:name="com.google.android.apps.maps" />
|
||||
</queries>
|
||||
|
||||
<application
|
||||
|
||||
+4
-2
@@ -25,6 +25,7 @@ import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
@@ -101,7 +102,8 @@ public class LoginActivity extends NextcloudMapsStyledActivity {
|
||||
|
||||
@Override
|
||||
public void onError(Exception ex) {
|
||||
// TODO handle errors
|
||||
Toast.makeText(LoginActivity.this, R.string.login_error, Toast.LENGTH_SHORT).show();
|
||||
progress.setVisibility(View.GONE);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -114,7 +116,7 @@ public class LoginActivity extends NextcloudMapsStyledActivity {
|
||||
}
|
||||
});
|
||||
} catch (AccountImportCancelledException e) {
|
||||
e.printStackTrace();
|
||||
progress.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package it.danieleverducci.nextcloudmaps.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
|
||||
import androidx.preference.PreferenceManager;
|
||||
import it.danieleverducci.nextcloudmaps.activity.main.GeofavoriteAdapter;
|
||||
@@ -50,7 +51,7 @@ public class SettingsManager {
|
||||
|
||||
public static boolean isUseGoogleMaps(Context context) {
|
||||
return PreferenceManager.getDefaultSharedPreferences(context)
|
||||
.getBoolean(SETTING_USE_GOOGLE_MAPS, true);
|
||||
.getBoolean(SETTING_USE_GOOGLE_MAPS, isGoogleMapsInstalled(context));
|
||||
}
|
||||
|
||||
public static void setUseGoogleMaps(Context context, boolean value) {
|
||||
@@ -65,4 +66,13 @@ public class SettingsManager {
|
||||
.putFloat(SETTING_LAST_MAP_POSITION_ZOOM, (float)zoom)
|
||||
.apply();
|
||||
}
|
||||
|
||||
private static boolean isGoogleMapsInstalled(Context context) {
|
||||
try {
|
||||
context.getPackageManager().getApplicationInfo("com.google.android.apps.maps", 0);
|
||||
return true;
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
<!-- Login Activity -->
|
||||
<string name="choose_account">Scegli account</string>
|
||||
<string name="login_error">Si è verificato un errore durante la login</string>
|
||||
|
||||
<!-- Geofavorites list -->
|
||||
<string name="new_geobookmark">Nuovo geosegnalibro</string>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
<!-- Login Activity -->
|
||||
<string name="choose_account">Choose account</string>
|
||||
<string name="login_error">An error has occurred during the login</string>
|
||||
|
||||
<!-- Geofavorites list -->
|
||||
<string name="new_geobookmark">New geofavorite</string>
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:9.2.1'
|
||||
classpath 'com.android.tools.build:gradle:9.3.0'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#Sun Feb 20 08:50:37 CET 2022
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
Reference in New Issue
Block a user