Compare commits

..

19 commits
V4.0 ... master

Author SHA1 Message Date
Pander
9c04973664
add Dutch translation (#27) 2025-06-27 07:07:44 +02:00
woheller69
f05dcd1ef8 V4.3 2025-06-27 06:59:27 +02:00
woheller69
fbeb0ce6f2 share link: do not start activity, just modify link with geo: data 2025-06-01 17:58:11 +02:00
woheller69
19515c20c6 handle copying of text
fixes #23
2025-05-28 15:53:47 +02:00
Fjuro
bbfbea0b79
Update Czech translations (#19) 2025-05-23 06:17:00 +02:00
woheller69
b7c798fc3a handle configChanges #20 2025-05-12 14:51:00 +02:00
woheller69
1a851e4cb7 remove dependenciesInfo block 2025-04-28 08:55:52 +02:00
woheller69
2b6621e227 make app name not translatable #17 2025-04-28 08:53:55 +02:00
chaoscalm
5faaf6b591
Update values-it (#17)
* Update strings.xml

* Update strings.xml
2025-04-28 08:45:11 +02:00
woheller69
80ba774035 allow opening http sites in external browser with warning.
#16
2025-04-26 14:57:34 +02:00
woheller69
e5fffc6d53 add fa translation again 2025-04-26 08:15:06 +02:00
woheller69
0490431c22 remove fa translation 2025-04-26 08:13:10 +02:00
woheller69
bb4e9213cc V4.2 fix build 2025-04-26 08:07:27 +02:00
woheller69
9f0687e9a0 V4.1 2025-04-25 08:23:38 +02:00
woheller69
3a3080cc38 Merge remote-tracking branch 'origin/master' 2025-04-25 08:22:36 +02:00
woheller69
93b0d5b683 V4.1 2025-04-25 08:22:20 +02:00
woheller69
2e95c1303f
Merge pull request #15 from alr86/master
🇮🇷 Persian translation(again :)
2025-04-22 06:01:46 +02:00
Alireza Rashidi
b4bfbecbcc
Create strings.xml 2025-04-22 01:05:31 +03:30
woheller69
254bc347d8 allow placeinfo #11 2025-04-15 22:10:09 +02:00
30 changed files with 122 additions and 51 deletions

View file

@ -2,12 +2,18 @@ apply plugin: 'com.android.application'
android {
compileSdk 34
dependenciesInfo {
// Disable including dependency metadata when building APKs
includeInApk = false
// Disable including dependency metadata when building Android App Bundles
includeInBundle = false
}
defaultConfig {
applicationId "us.spotco.maps"
minSdkVersion 21
targetSdk 34
versionCode 40
versionName "4.0"
versionCode 43
versionName "4.3"
}
buildTypes {
debug {
@ -22,8 +28,9 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lint {
lintOptions {
abortOnError false
disable 'MissingTranslation'
}
}

View file

@ -14,6 +14,7 @@
android:theme="@android:style/Theme.DeviceDefault">
<activity
android:name=".MainActivity"
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|uiMode"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

View file

@ -20,6 +20,8 @@ import android.Manifest;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.ActivityNotFoundException;
import android.content.ClipData;
import android.content.ClipDescription;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
@ -158,7 +160,6 @@ public class MainActivity extends Activity {
});
mapsWebView.setWebViewClient(new WebViewClient() {
//Keep these in sync!
@Override
public WebResourceResponse shouldInterceptRequest(final WebView view, WebResourceRequest request) {
if (request.getUrl().toString().equals("about:blank")) {
@ -184,6 +185,7 @@ public class MainActivity extends Activity {
allowed = true;
}
}
if (request.getUrl().getHost().equals("gstatic.com") && request.getUrl().getPath().startsWith("/local/placeinfo/")) allowed = true;
if (!allowed) {
Log.d(TAG, "[shouldInterceptRequest][NOT ON ALLOWLIST] Blocked access to " + request.getUrl().getHost());
return new WebResourceResponse("text/javascript", "UTF-8", null); //Deny URLs not on ALLOWLIST
@ -222,7 +224,19 @@ public class MainActivity extends Activity {
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
} else if (request.getUrl().toString().startsWith("http://")){
new AlertDialog.Builder(context)
.setTitle(R.string.title_open_link)
.setIcon(R.drawable.ic_warning) // Set the alert icon
.setMessage(context.getString(R.string.text_warning_link) + "\n\n" + context.getString(R.string.text_open_link, request.getUrl().toString()))
.setNegativeButton(android.R.string.cancel, null)
.setPositiveButton(
android.R.string.ok,
(dialogInterface, i) ->
startActivity(new Intent(Intent.ACTION_VIEW, request.getUrl()))
)
.create()
.show();
}
return true; //Deny URLs that aren't HTTPS
}
@ -245,7 +259,7 @@ public class MainActivity extends Activity {
if (!allowed) {
Log.d(TAG, "[shouldOverrideUrlLoading][NOT ON ALLOWLIST] Blocked access to " + request.getUrl().getHost());
if (request.getUrl().toString().startsWith("https://")) {
(new AlertDialog.Builder(context)
new AlertDialog.Builder(context)
.setTitle(R.string.title_open_link)
.setMessage(context.getString(R.string.text_open_link, request.getUrl().toString()))
.setNegativeButton(android.R.string.cancel, null)
@ -254,9 +268,8 @@ public class MainActivity extends Activity {
(dialogInterface, i) ->
startActivity(new Intent(Intent.ACTION_VIEW, request.getUrl()))
)
)
.create()
.show();
.create()
.show();
}
return true; //Deny URLs not on ALLOWLIST
@ -431,20 +444,33 @@ public class MainActivity extends Activity {
private void initShareLinkListener() {
ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
clipboard.addPrimaryClipChangedListener(new ClipboardManager.OnPrimaryClipChangedListener() {
@Override
public void onPrimaryClipChanged() {
String url = mapsWebView.getUrl();
String regex = "@(-?d*\\d+.\\d+),(-?d*\\d+.\\d+)";
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(url);
if (m.find()) {
String latlon = m.group(1) + "," + m.group(2);
try {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("geo:" + latlon + "?q=" + latlon)));
} catch (ActivityNotFoundException ignored) {
Toast.makeText(context, R.string.no_app_installed, Toast.LENGTH_SHORT).show();
clipboard.addPrimaryClipChangedListener(() -> {
if (!clipboard.hasPrimaryClip()) return;
ClipDescription description = clipboard.getPrimaryClipDescription();
if (description == null) return;
// Only process plain text
if (description.hasMimeType(ClipDescription.MIMETYPE_TEXT_PLAIN)) {
try {
CharSequence copiedText = clipboard.getPrimaryClip().getItemAt(0).getText();
if (copiedText == null) return;
// Match coordinates in copied text (e.g., "40.7128,74.0060" or "40.7128 -74.006")
Pattern p = Pattern.compile("(-?\\d*\\.\\d+),\\s*(-?\\d*\\.\\d+)");
Matcher m = p.matcher(copiedText);
if (m.find()) {
String latlon = m.group(1) + "," + m.group(2);
String clipContent = "geo:" + latlon + "?q=" + latlon;
ClipData newClip = ClipData.newPlainText("Geo URI", clipContent);
clipboard.setPrimaryClip(newClip);
}
} catch (ActivityNotFoundException e) {
// Show "No app installed" message if no app can handle the geo intent
Toast.makeText(context, R.string.no_app_installed, Toast.LENGTH_SHORT).show();
} catch (Exception e) {
Log.e(TAG, "Error processing clipboard content", e);
}
}
});

View file

@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,5.99L19.53,19H4.47L12,5.99M12,2L1,21h22L12,2L12,2z"
android:fillColor="@android:color/holo_red_dark"/>
<path
android:pathData="M13,16l-2,0l0,2l2,0z"
android:fillColor="#000000"/>
<path
android:pathData="M13,10l-2,0l0,5l2,0z"
android:fillColor="#000000"/>
</vector>

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">GMaps WV</string>
<string name="title_location_permission">إذن الموقع</string>
<string name="error_no_gps">الرجاء تفعيل GPS</string>
<string name="intent_string">افتح في webview مقيد</string>

View file

@ -3,7 +3,6 @@
<string name="intent_string">Отворете в ограничен уеб изглед</string>
<string name="text_location_permission">Моля, дайте разрешение за местоположение и натиснете бутона отново.</string>
<string name="no_app_installed">Няма инсталирано приложение</string>
<string name="app_name">GMaps уеб изглед</string>
<string name="error_no_gps">Моля, активирайте GPS</string>
<string name="title_location_permission">Разрешение за местоположение</string>
</resources>

View file

@ -1,9 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">GMaps WV</string>
<string name="app_name" translatable="false">GMaps WV</string>
<string name="intent_string">Otevřít v omezeném webovém zobrazení</string>
<string name="title_location_permission">Oprávnění k poloze</string>
<string name="text_location_permission">Udělte prosím oprávnění k poloze a znovu stiskněte tlačítko.</string>
<string name="error_no_gps">Povolte prosím polohové služby</string>
<string name="title_location_permission">Přístup k poloze</string>
<string name="text_location_permission">Udělte přístup oprávnění k poloze a znovu stiskněte tlačítko.</string>
<string name="error_no_gps">Zapněte prosím polohové služby</string>
<string name="no_app_installed">Není nainstalována žádná aplikace</string>
</resources>
<string name="title_open_link">Otevřít odkaz</string>
<string name="text_open_link">Otevřít v externím prohlížeči? %s</string>
<string name="text_warning_link">VAROVÁNÍ: Tento odkaz není zabezpečený!</string>
<string name="dialog_StarOnGitHub">Líbí se vám tato aplikace? Dejte jí prosím hvězdičku na GitHubu nebo kupte vývojáři kávu přes PayPal.</string>
<string name="dialog_Later_button">Možná později</string>
</resources>

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">GMaps WV</string>
<string name="intent_string">Im eingeschränktem Webview öffnen</string>
<string name="title_location_permission">Standortfreigabe</string>
<string name="text_location_permission">Bitte die Standordfreigabe gewähren und die Funktion erneut aufrufen.</string>
@ -8,6 +7,7 @@
<string name="no_app_installed">Keine App installiert</string>
<string name="title_open_link">Link öffnen</string>
<string name="text_open_link">In externem Browser öffnen? %s</string>
<string name="text_warning_link">ACHTUNG: Dieser Link ist nicht sicher!</string>
<string name="dialog_StarOnGitHub">Mögen Sie diese App? Bitte vergeben Sie einen Stern auf GitHub oder spendieren Sie dem Entwickler einen Kaffee über PayPal.</string>
<string name="dialog_Later_button">Vielleicht später</string>
</resources>

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">GMaps WV</string>
<string name="intent_string">Abrir con webview restringido</string>
<string name="title_location_permission">Permiso de ubicación</string>
<string name="text_location_permission">Por favor, concede permisos de ubicación y presiona el botón nuevamente.</string>

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">GMaps veebivaade</string>
<string name="intent_string">Ava piiratud veebivaatena</string>
<string name="title_location_permission">Õigused asukoha tuvastamiseks</string>
<string name="text_location_permission">Palun anna rakendusele õigused asukoha tuvastamiseks ja vajuta uuesti nuppu.</string>

View file

@ -0,0 +1,11 @@
<resources>
<string name="intent_string">بازکردن در مشاهده‌گر وب محدود شده</string>
<string name="title_location_permission">دسترسی مکان</string>
<string name="text_location_permission">لطفا دسترسی مکان را داده و دوباره روی دکمه ضربه بزنید</string>
<string name="error_no_gps">لطفا مکان‌یاب را روشن کنید</string>
<string name="no_app_installed">برنامه‌ای نصب نشده</string>
<string name="title_open_link">بازکردن پیوند</string>
<string name="text_open_link">بازکردن در مرورگر خارجی؟ %s</string>
<string name="dialog_StarOnGitHub">این برنامه رو دوست داشتید؟ لطفا به ما در گیت‌هاب ستاره دهید و یا در پی‌پال برای برنامه‌نویس قهوه بخرید</string>
<string name="dialog_Later_button">شاید بعدا</string>
</resources>

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">GMaps WV</string>
<string name="title_location_permission">Accès à la localisation</string>
<string name="text_location_permission">Veuillez donner l\'accès à la localisation et appuyer à nouveau sur le bouton.</string>
<string name="error_no_gps">Veuillez activer le GPS</string>

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">GMaps WV</string>
<string name="intent_string">Abrir nunha webview con restricións</string>
<string name="title_location_permission">Permiso de localización</string>
<string name="text_location_permission">Concede permiso para a localización e preme outra vez no botón.</string>

View file

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="intent_string">प्रतिबंधित वेबव्यू में खोलें</string>
<string name="app_name">जीमैप्स डब्ल्यू वी</string>
<string name="title_location_permission">स्थान अनुमति</string>
<string name="text_location_permission">कृपया स्थान की अनुमति दें और पुनः दबाएँ।</string>
<string name="error_no_gps">कृपया जीपीएस सक्रिय करें</string>

View file

@ -3,7 +3,6 @@
<string name="error_no_gps">Molimo aktivirajte GPS</string>
<string name="title_location_permission">Dozvola za lokaciju</string>
<string name="no_app_installed">Nema instalirane aplikacije</string>
<string name="app_name">GMaps WV</string>
<string name="intent_string">Otvori u ograničenom web prikazu</string>
<string name="text_location_permission">Molimo Vas dajte dopuštenje za lokaciju i ponovo pritisnite gumb.</string>
</resources>

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">GMaps WV</string>
<string name="intent_string">Buka dengan tampilan-web terbatas</string>
<string name="title_location_permission">Izinkan akses lokasi</string>
<string name="text_location_permission">Mohon berikan izin akses lokasi dan tekan tombol kembali.</string>

View file

@ -1,9 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="intent_string">Apri in una webview ristretta</string>
<string name="title_location_permission">Permessi di localizzazione</string>
<string name="text_location_permission">Attiva i permessi di localizzazione e premi nuovamente il pulsante.</string>
<string name="error_no_gps">Per favore, attiva il GPS</string>
<string name="no_app_installed">Nessuna app installata</string>
<string name="app_name">Mappe Google WV</string>
<string name="intent_string">Apri in una webview ristretta</string>
<string name="title_location_permission">Permessi di localizzazione</string>
</resources>
<string name="title_open_link">Apri link</string>
<string name="text_open_link">Vuoi aprire? %s</string>
<string name="text_warning_link">ATTENZIONE: Link non sicuro!</string>
<string name="dialog_StarOnGitHub">Ti piace quest\'app? Dai una stella su Github oppure offri un caffè allo sviluppatore tramite PayPal.</string>
<string name="dialog_Later_button">Forse più tardi</string>
</resources>

View file

@ -5,5 +5,4 @@
<string name="intent_string">നിയന്ത്രിത വെബ്‌വ്യൂവിൽ തുറക്കുക</string>
<string name="text_location_permission">സ്ഥാന അനുമതി നൽകി വീണ്ടും അമർത്തുക.</string>
<string name="no_app_installed">ഒരു പ്രയോഗവും സ്ഥാപിച്ചിട്ടില്ല</string>
<string name="app_name">ജിമാപ്സ് ഡബ്ല്യുവി</string>
</resources>

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="intent_string">Openen in beperkte Webview</string>
<string name="title_location_permission">Locatierechten</string>
<string name="text_location_permission">A.u.b. locatierechten toekennen en deze knop opnieuw indrukken.</string>
<string name="error_no_gps">A.u.b. GPS activeren</string>
<string name="no_app_installed">Geen app is geïnstalleerd</string>
<string name="title_open_link">Link openen</string>
<string name="text_open_link">Openen in externe webbrowser? %s</string>
<string name="text_warning_link">WAARSCHUWING: Deze link is niet veilig!</string>
<string name="dialog_StarOnGitHub">Vind je deze app leuk of handig? Geef een ster op GitHub of doneer een koffie aan de ontwikkelaar via PayPal.</string>
<string name="dialog_Later_button">Misschien later</string>
</resources>

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">GMaps WV</string>
<string name="intent_string">Otwórz w chronionym webview</string>
<string name="title_location_permission">Dostęp do lokalizacji</string>
<string name="text_location_permission">Prosimy udzielić dostępu do lokalizacji i nacisnąć przycisk ponownie.</string>

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">GMaps WV</string>
<string name="intent_string">Abrir em WebView restrito</string>
<string name="title_location_permission">Permissão de localização</string>
<string name="text_location_permission">Conceda a permissão de localização e toque no botão novamente.</string>

View file

@ -1,5 +1,4 @@
<resources>
<string name="app_name">GMaps WV</string>
<string name="intent_string">Abrir em WebView restrito</string>
<string name="title_location_permission">Permissão de localização</string>
<string name="text_location_permission">Conceda a permissão de localização e toque no botão novamente.</string>

View file

@ -5,7 +5,6 @@
<string name="error_no_gps">Пожалуйста, активируйте GPS</string>
<string name="dialog_StarOnGitHub">Вам нравится это приложение? Пожалуйста, поставьте звёздочку на GitHub или купите разработчику кофе через PayPal.</string>
<string name="dialog_Later_button">Может быть позже</string>
<string name="app_name">GMaps WV</string>
<string name="text_location_permission">Пожалуйста, дайте разрешение на определение местоположения и нажмите кнопку еще раз.</string>
<string name="no_app_installed">Приложение не установлено</string>
</resources>

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Gmaps wv</string>
<string name="intent_string">தடைசெய்யப்பட்ட வெப்வியூவில் திறக்கவும்</string>
<string name="error_no_gps">சி.பி.எச்சை செயல்படுத்தவும்</string>
<string name="title_location_permission">இருப்பிட இசைவு</string>

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">GMaps WV</string>
<string name="intent_string">Відкрити в обмеженому вебпереглядачі</string>
<string name="title_location_permission">Дозвіл на місцезнаходження</string>
<string name="text_location_permission">Будь ласка, надайте дозвіл на визначення місцезнаходження та натисніть кнопку ще раз.</string>

View file

@ -2,7 +2,6 @@
<resources>
<string name="error_no_gps">请激活 GPS</string>
<string name="title_location_permission">位置权限</string>
<string name="app_name">GMaps WV</string>
<string name="no_app_installed">App未安装</string>
<string name="intent_string">在受限的WebView中打开</string>
<string name="text_location_permission">请授予位置权限,然后再次按下按钮。</string>

View file

@ -1,5 +1,5 @@
<resources>
<string name="app_name">GMaps WV</string>
<string name="app_name" translatable="false">GMaps WV</string>
<string name="intent_string">Open in restricted webview</string>
<string name="title_location_permission">Location permission</string>
<string name="text_location_permission">Please grant location permission and press button again.</string>
@ -7,6 +7,7 @@
<string name="no_app_installed">No app installed</string>
<string name="title_open_link">Open link</string>
<string name="text_open_link">Open in external browser? %s</string>
<string name="text_warning_link">WARNING: This link is not secure!</string>
<string name="dialog_StarOnGitHub">Do you like this app? Please give a star on GitHub or buy the developer a coffee via PayPal.</string>
<string name="dialog_Later_button">Maybe later</string>
</resources>

View file

@ -0,0 +1,2 @@
Allow placeinfo images
Translations

View file

@ -0,0 +1,2 @@
Allow placeinfo images
Translations

View file

@ -0,0 +1,2 @@
Bugfixes
Translation update