diff --git a/android/app/src/main/cpp/app/organicmaps/Framework.cpp b/android/app/src/main/cpp/app/organicmaps/Framework.cpp
index d749e7a390..905a6b36fe 100644
--- a/android/app/src/main/cpp/app/organicmaps/Framework.cpp
+++ b/android/app/src/main/cpp/app/organicmaps/Framework.cpp
@@ -1993,4 +1993,74 @@ Java_app_organicmaps_Framework_nativeGetKayakHotelLink(JNIEnv * env, jclass, jst
return url.empty() ? nullptr : jni::ToJavaString(env, url);
}
+JNIEXPORT jboolean JNICALL
+Java_app_organicmaps_Framework_nativeShouldShowProducts(JNIEnv * env, jclass)
+{
+ return frm()->ShouldShowProducts();
+}
+
+JNIEXPORT jobject JNICALL
+Java_app_organicmaps_Framework_nativeGetProductsConfiguration(JNIEnv * env, jclass)
+{
+ auto config = frm()->GetProductsConfiguration();
+ if (!config) return nullptr;
+
+ static jclass const productClass = jni::GetGlobalClassRef(
+ env,
+ "app/organicmaps/products/Product"
+ );
+ static jmethodID const productConstructor = jni::GetConstructorID(
+ env,
+ productClass,
+ "(Ljava/lang/String;Ljava/lang/String;)V"
+ );
+
+ jobjectArray products = jni::ToJavaArray(
+ env,
+ productClass,
+ config->GetProducts(),
+ [](JNIEnv * env, products::ProductsConfig::Product const & product)
+ {
+ jni::TScopedLocalRef const title(env, jni::ToJavaString(env, product.GetTitle()));
+ jni::TScopedLocalRef const link(env, jni::ToJavaString(env, product.GetLink()));
+
+ return env->NewObject(
+ productClass,
+ productConstructor,
+ title.get(),
+ link.get()
+ );
+ });
+
+ static jclass const productsConfigClass = jni::GetGlobalClassRef(
+ env,
+ "app/organicmaps/products/ProductsConfig"
+ );
+ static jmethodID const productsConfigConstructor = jni::GetConstructorID(
+ env,
+ productsConfigClass,
+ "(Ljava/lang/String;[Lapp/organicmaps/products/Product;)V"
+ );
+
+ jni::TScopedLocalRef const placePagePrompt(env, jni::ToJavaString(env, config->GetPlacePagePrompt()));
+ return env->NewObject(productsConfigClass, productsConfigConstructor, placePagePrompt.get(), products);
+}
+
+JNIEXPORT void JNICALL
+Java_app_organicmaps_Framework_nativeDidCloseProductsPopup(JNIEnv * env, jclass, jstring reason)
+{
+ frm()->DidCloseProductsPopup(frm()->FromString(jni::ToNativeString(env, reason)));
+}
+
+JNIEXPORT void JNICALL
+Java_app_organicmaps_Framework_nativeDidSelectProduct(JNIEnv * env, jclass, jstring title, jstring link)
+{
+ products::ProductsConfig::Product product(
+ jni::ToNativeString(env, title),
+ jni::ToNativeString(env, link)
+ );
+
+ frm()->DidSelectProduct(product);
+}
+
} // extern "C"
diff --git a/android/app/src/main/java/app/organicmaps/Framework.java b/android/app/src/main/java/app/organicmaps/Framework.java
index 63d70abde3..349431f208 100644
--- a/android/app/src/main/java/app/organicmaps/Framework.java
+++ b/android/app/src/main/java/app/organicmaps/Framework.java
@@ -15,6 +15,8 @@ import app.organicmaps.api.RequestType;
import app.organicmaps.bookmarks.data.DistanceAndAzimut;
import app.organicmaps.bookmarks.data.FeatureId;
import app.organicmaps.bookmarks.data.MapObject;
+import app.organicmaps.products.Product;
+import app.organicmaps.products.ProductsConfig;
import app.organicmaps.routing.JunctionInfo;
import app.organicmaps.routing.RouteMarkData;
import app.organicmaps.routing.RoutePointInfo;
@@ -461,4 +463,13 @@ public class Framework
@Nullable
public static native String nativeGetKayakHotelLink(@NonNull String countryIsoCode, @NonNull String uri,
long firstDaySec, long lastDaySec);
+
+ public static native boolean nativeShouldShowProducts();
+
+ @Nullable
+ public static native ProductsConfig nativeGetProductsConfiguration();
+
+ public static native void nativeDidCloseProductsPopup(String reason);
+
+ public static native void nativeDidSelectProduct(String title, String link);
}
diff --git a/android/app/src/main/java/app/organicmaps/products/Product.java b/android/app/src/main/java/app/organicmaps/products/Product.java
new file mode 100644
index 0000000000..18e354c84e
--- /dev/null
+++ b/android/app/src/main/java/app/organicmaps/products/Product.java
@@ -0,0 +1,20 @@
+package app.organicmaps.products;
+
+import androidx.annotation.Keep;
+import androidx.annotation.Nullable;
+
+// Called from JNI.
+@Keep
+@SuppressWarnings("unused")
+public class Product {
+ @Nullable
+ public String title;
+
+ @Nullable
+ public String link;
+
+ public Product(@Nullable String title, @Nullable String link) {
+ this.title = title;
+ this.link = link;
+ }
+}
diff --git a/android/app/src/main/java/app/organicmaps/products/ProductsConfig.java b/android/app/src/main/java/app/organicmaps/products/ProductsConfig.java
new file mode 100644
index 0000000000..9fb8d50f6f
--- /dev/null
+++ b/android/app/src/main/java/app/organicmaps/products/ProductsConfig.java
@@ -0,0 +1,20 @@
+package app.organicmaps.products;
+
+import androidx.annotation.Keep;
+import androidx.annotation.Nullable;
+
+// Called from JNI.
+@Keep
+@SuppressWarnings("unused")
+public class ProductsConfig {
+ public ProductsConfig(@Nullable String placePagePrompt, @Nullable Product[] products) {
+ this.placePagePrompt = placePagePrompt;
+ this.products = products;
+ }
+
+ @Nullable
+ public String placePagePrompt;
+
+ @Nullable
+ public Product[] products;
+}
diff --git a/android/app/src/main/java/app/organicmaps/util/Constants.java b/android/app/src/main/java/app/organicmaps/util/Constants.java
index a9d4f75e9a..b29d23da00 100644
--- a/android/app/src/main/java/app/organicmaps/util/Constants.java
+++ b/android/app/src/main/java/app/organicmaps/util/Constants.java
@@ -57,5 +57,13 @@ public final class Constants
public static final String XIAOMI = "XIAOMI";
}
+ public static class ProductsPopupCloseReason
+ {
+ public static final String CLOSE = "close";
+ public static final String REMIND_LATER = "remind_later";
+ public static final String ALREADY_DONATED = "already_donated";
+ public static final String SELECT_PRODUCT = "select_product";
+ }
+
private Constants() {}
}
diff --git a/android/app/src/main/java/app/organicmaps/widget/placepage/PlacePageView.java b/android/app/src/main/java/app/organicmaps/widget/placepage/PlacePageView.java
index 343a5bb475..e6489f8a05 100644
--- a/android/app/src/main/java/app/organicmaps/widget/placepage/PlacePageView.java
+++ b/android/app/src/main/java/app/organicmaps/widget/placepage/PlacePageView.java
@@ -50,6 +50,7 @@ import app.organicmaps.widget.placepage.sections.PlacePageBookmarkFragment;
import app.organicmaps.widget.placepage.sections.PlacePageLinksFragment;
import app.organicmaps.widget.placepage.sections.PlacePageOpeningHoursFragment;
import app.organicmaps.widget.placepage.sections.PlacePagePhoneFragment;
+import app.organicmaps.widget.placepage.sections.PlacePageProductsFragment;
import app.organicmaps.widget.placepage.sections.PlacePageWikipediaFragment;
import com.google.android.material.button.MaterialButton;
@@ -69,6 +70,7 @@ public class PlacePageView extends Fragment implements View.OnClickListener,
{
private static final String PREF_COORDINATES_FORMAT = "coordinates_format";
private static final String BOOKMARK_FRAGMENT_TAG = "BOOKMARK_FRAGMENT_TAG";
+ private static final String PRODUCTS_FRAGMENT_TAG = "PRODUCTS_FRAGMENT_TAG";
private static final String WIKIPEDIA_FRAGMENT_TAG = "WIKIPEDIA_FRAGMENT_TAG";
private static final String PHONE_FRAGMENT_TAG = "PHONE_FRAGMENT_TAG";
private static final String OPENING_HOURS_FRAGMENT_TAG = "OPENING_HOURS_FRAGMENT_TAG";
@@ -202,9 +204,11 @@ public class PlacePageView extends Fragment implements View.OnClickListener,
mFrame.setOnClickListener((v) -> mPlacePageViewListener.onPlacePageRequestToggleState());
mPreview = mFrame.findViewById(R.id.pp__preview);
+
mFrame.addOnLayoutChangeListener((v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> {
final int oldHeight = oldBottom - oldTop;
final int newHeight = bottom - top;
+
if (oldHeight != newHeight)
mPlacePageViewListener.onPlacePageContentChanged(mPreview.getHeight(), newHeight);
});
@@ -387,6 +391,18 @@ public class PlacePageView extends Fragment implements View.OnClickListener,
updateViewFragment(PlacePageWikipediaFragment.class, WIKIPEDIA_FRAGMENT_TAG, R.id.place_page_wikipedia_fragment, hasWikipediaEntry());
}
+ private boolean hasProductsEntry()
+ {
+ return Framework.nativeShouldShowProducts();
+ }
+
+ private void updateProductsView()
+ {
+ var hasProductsEntry = hasProductsEntry();
+
+ updateViewFragment(PlacePageProductsFragment.class, PRODUCTS_FRAGMENT_TAG, R.id.place_page_products_fragment, hasProductsEntry);
+ }
+
private void setTextAndColorizeSubtitle()
{
String text = mMapObject.getSubtitle();
@@ -480,6 +496,7 @@ public class PlacePageView extends Fragment implements View.OnClickListener,
}
updateLinksView();
updateOpeningHoursView();
+ updateProductsView();
updateWikipediaView();
updateBookmarkView();
updatePhoneView();
diff --git a/android/app/src/main/java/app/organicmaps/widget/placepage/sections/PlacePageProductsFragment.java b/android/app/src/main/java/app/organicmaps/widget/placepage/sections/PlacePageProductsFragment.java
new file mode 100644
index 0000000000..9982f0cdf8
--- /dev/null
+++ b/android/app/src/main/java/app/organicmaps/widget/placepage/sections/PlacePageProductsFragment.java
@@ -0,0 +1,107 @@
+package app.organicmaps.widget.placepage.sections;
+
+import static androidx.core.util.ObjectsCompat.requireNonNull;
+
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+
+import java.util.Objects;
+
+import app.organicmaps.Framework;
+import app.organicmaps.R;
+import app.organicmaps.products.Product;
+import app.organicmaps.products.ProductsConfig;
+import app.organicmaps.util.Constants;
+import app.organicmaps.util.UiUtils;
+import app.organicmaps.util.Utils;
+
+public class PlacePageProductsFragment extends Fragment
+{
+ @Nullable
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState)
+ {
+ return inflater.inflate(R.layout.place_page_products_fragment, container, false);
+ }
+
+ @Override
+ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState)
+ {
+ super.onViewCreated(view, savedInstanceState);
+
+ var config = Framework.nativeGetProductsConfiguration();
+ if (config != null && isValidConfig(config))
+ {
+ UiUtils.show(view);
+
+ updateView(view, config);
+ } else
+ {
+ UiUtils.hide(view);
+ }
+ }
+
+ private void updateView(@NonNull View view, @NonNull ProductsConfig config)
+ {
+ var layoutInflater = LayoutInflater.from(view.getContext());
+
+ TextView productsPrompt = requireNonNull(view.findViewById(R.id.products_prompt));
+ LinearLayout productsButtons = requireNonNull(view.findViewById(R.id.products_buttons));
+ View closeButton = requireNonNull(view.findViewById(R.id.products_close));
+ View productsRemindLater = requireNonNull(view.findViewById(R.id.products_remind_later));
+ View alreadyDonated = requireNonNull(view.findViewById(R.id.products_already_donated));
+
+ productsPrompt.setText(config.placePagePrompt);
+
+ productsButtons.removeAllViews();
+
+ for (var product : Objects.requireNonNull(config.products))
+ {
+ var button = (Button) layoutInflater.inflate(R.layout.item_product, productsButtons, false);
+ button.setText(product.title);
+ button.setOnClickListener((v) -> {
+ onProductSelected(product);
+ });
+
+ productsButtons.addView(button);
+ }
+
+ closeButton.setOnClickListener((v) -> {
+ closeWithReason(view, Constants.ProductsPopupCloseReason.CLOSE);
+ });
+
+ productsRemindLater.setOnClickListener((v) -> {
+ closeWithReason(view, Constants.ProductsPopupCloseReason.REMIND_LATER);
+ });
+
+ alreadyDonated.setOnClickListener((v) -> {
+ closeWithReason(view, Constants.ProductsPopupCloseReason.ALREADY_DONATED);
+ });
+ }
+
+ private void closeWithReason(View view, String reason)
+ {
+ Framework.nativeDidCloseProductsPopup(reason);
+ UiUtils.hide(view);
+ }
+
+ private void onProductSelected(Product product)
+ {
+ Utils.openUrl(requireActivity(), product.link);
+ Framework.nativeDidSelectProduct(product.title, product.link);
+ }
+
+ private boolean isValidConfig(@NonNull ProductsConfig config)
+ {
+ return config.products != null && config.products.length > 0;
+ }
+}
diff --git a/android/app/src/main/res/layout/item_product.xml b/android/app/src/main/res/layout/item_product.xml
new file mode 100644
index 0000000000..89bc1f430b
--- /dev/null
+++ b/android/app/src/main/res/layout/item_product.xml
@@ -0,0 +1,11 @@
+
+
diff --git a/android/app/src/main/res/layout/place_page_details.xml b/android/app/src/main/res/layout/place_page_details.xml
index 849c73be0e..697b30e800 100644
--- a/android/app/src/main/res/layout/place_page_details.xml
+++ b/android/app/src/main/res/layout/place_page_details.xml
@@ -7,6 +7,7 @@
android:background="?panel"
android:orientation="vertical">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/values-ar/strings.xml b/android/app/src/main/res/values-ar/strings.xml
index fbdec2b6fb..1f91ffc966 100644
--- a/android/app/src/main/res/values-ar/strings.xml
+++ b/android/app/src/main/res/values-ar/strings.xml
@@ -286,6 +286,9 @@
اسئلة مكررة
تبرع
+ تم التبرع
+ ذكر لاحقاً
+ دعم Organic Maps
دعم المشروع
diff --git a/android/app/src/main/res/values-az/strings.xml b/android/app/src/main/res/values-az/strings.xml
index 6fe6f7d133..ba631f6bf2 100644
--- a/android/app/src/main/res/values-az/strings.xml
+++ b/android/app/src/main/res/values-az/strings.xml
@@ -272,6 +272,9 @@
Tez-tez soruşulan suallar
Bağışlamaq
+ Artıq ianə edildi
+ Daha sonra xatırlat
+ Organic Maps-i dəstəkləmək
Bu layihəni dəstəkləyin
diff --git a/android/app/src/main/res/values-be/strings.xml b/android/app/src/main/res/values-be/strings.xml
index b4d0756562..bc51430a19 100644
--- a/android/app/src/main/res/values-be/strings.xml
+++ b/android/app/src/main/res/values-be/strings.xml
@@ -272,6 +272,9 @@
Пытанні і адказы
Падтрымаць грашыма
+ Ужо ахвяравана
+ Нагадаць пазней
+ Падтрымаць Organic Maps
Падтрымаць праект
diff --git a/android/app/src/main/res/values-bg/strings.xml b/android/app/src/main/res/values-bg/strings.xml
index c898d3b47b..81a8df744f 100644
--- a/android/app/src/main/res/values-bg/strings.xml
+++ b/android/app/src/main/res/values-bg/strings.xml
@@ -255,6 +255,9 @@
Въпроси и отговори
Дарете
+ Вече дарено
+ Напомни по-късно
+ Подкрепи Organic Maps
Подкрепете проекта
diff --git a/android/app/src/main/res/values-ca/strings.xml b/android/app/src/main/res/values-ca/strings.xml
index e79a23ab49..d66972aada 100644
--- a/android/app/src/main/res/values-ca/strings.xml
+++ b/android/app/src/main/res/values-ca/strings.xml
@@ -273,6 +273,9 @@
Preguntes més freqüents
Donatiu
+ Ja donat
+ Recorda més tard
+ Donar suport a Organic Maps
Donar suport al projecte
diff --git a/android/app/src/main/res/values-cs/strings.xml b/android/app/src/main/res/values-cs/strings.xml
index af035e4813..f4858b078d 100644
--- a/android/app/src/main/res/values-cs/strings.xml
+++ b/android/app/src/main/res/values-cs/strings.xml
@@ -254,6 +254,9 @@
Otázky a odpovědi
Darovat
+ Již darováno
+ Připomeň později
+ Podpořit Organic Maps
Podpořte projekt
diff --git a/android/app/src/main/res/values-da/strings.xml b/android/app/src/main/res/values-da/strings.xml
index 6a9fa18bbb..63b26a6b17 100644
--- a/android/app/src/main/res/values-da/strings.xml
+++ b/android/app/src/main/res/values-da/strings.xml
@@ -246,6 +246,9 @@
Spørgsmål og svar
Doner
+ Allerede doneret
+ Mind mig senere
+ Støtte Organic Maps
Støt projektet
diff --git a/android/app/src/main/res/values-de/strings.xml b/android/app/src/main/res/values-de/strings.xml
index e6802eff7a..230d97e473 100644
--- a/android/app/src/main/res/values-de/strings.xml
+++ b/android/app/src/main/res/values-de/strings.xml
@@ -271,6 +271,9 @@
Häufige Fragen und Antworten
Spenden
+ Bereits gespendet
+ Später erinnern
+ Organic Maps unterstützen
Unterstütze das Projekt
diff --git a/android/app/src/main/res/values-el/strings.xml b/android/app/src/main/res/values-el/strings.xml
index 8ed2a5a3e4..c321daa0dc 100644
--- a/android/app/src/main/res/values-el/strings.xml
+++ b/android/app/src/main/res/values-el/strings.xml
@@ -274,6 +274,9 @@
Συχνές ερωτήσεις
Δωρεά
+ Ήδη δωρεά
+ Υπενθύμισε αργότερα
+ Υποστήριξε το Organic Maps
Στηρίξτε αυτό το πρότζεκτ
diff --git a/android/app/src/main/res/values-es/strings.xml b/android/app/src/main/res/values-es/strings.xml
index ebe63946ad..f1acf04e9f 100644
--- a/android/app/src/main/res/values-es/strings.xml
+++ b/android/app/src/main/res/values-es/strings.xml
@@ -271,6 +271,9 @@
Preguntas frecuentes
Donar
+ Ya donado
+ Recordar más tarde
+ Apoyar Organic Maps
Apoye el proyecto
diff --git a/android/app/src/main/res/values-et/strings.xml b/android/app/src/main/res/values-et/strings.xml
index d79357b16b..3af9cc0e37 100644
--- a/android/app/src/main/res/values-et/strings.xml
+++ b/android/app/src/main/res/values-et/strings.xml
@@ -264,6 +264,9 @@
Korduma kippuvad küsimused
Anneta
+ Juba annetatud
+ Meenuta hiljem
+ Toetada Organic Maps
Toetage projekti
diff --git a/android/app/src/main/res/values-eu/strings.xml b/android/app/src/main/res/values-eu/strings.xml
index cdbb44f293..a17c617f28 100644
--- a/android/app/src/main/res/values-eu/strings.xml
+++ b/android/app/src/main/res/values-eu/strings.xml
@@ -272,6 +272,9 @@
Ohiko galderak
Dohaintza eman
+ Dohaintza jada emana
+ Gogoratu geroago
+ Sustatu Organic Maps
Proiektuari laguntza eman
diff --git a/android/app/src/main/res/values-fa/strings.xml b/android/app/src/main/res/values-fa/strings.xml
index 4138fa291a..2eb06ddf3f 100644
--- a/android/app/src/main/res/values-fa/strings.xml
+++ b/android/app/src/main/res/values-fa/strings.xml
@@ -239,6 +239,9 @@
پرسشهای زیاد پرسیده شده
حمایت مالی
+ قبلاً اهدا شده
+ بعداً یادآوری کن
+ پشتیبانی از Organic Maps
ﺪﯿﻨﮐ ﺖﯾﺎﻤﺣ ﻩﮊﻭﺮﭘ ﺯﺍ
diff --git a/android/app/src/main/res/values-fi/strings.xml b/android/app/src/main/res/values-fi/strings.xml
index d06fa07e50..1dc213ef5c 100644
--- a/android/app/src/main/res/values-fi/strings.xml
+++ b/android/app/src/main/res/values-fi/strings.xml
@@ -270,6 +270,9 @@
Usein kysytyt kysymykset
Lahjoita
+ Jo lahjoitettu
+ Muistuta myöhemmin
+ Tukea Organic Maps
Tue projektia
diff --git a/android/app/src/main/res/values-fr/strings.xml b/android/app/src/main/res/values-fr/strings.xml
index 41907a045e..6888bc41d9 100644
--- a/android/app/src/main/res/values-fr/strings.xml
+++ b/android/app/src/main/res/values-fr/strings.xml
@@ -276,6 +276,9 @@
Foire aux questions
Faire un don
+ Déjà donné
+ Rappeler plus tard
+ Soutenir Organic Maps
Soutenir le projet
diff --git a/android/app/src/main/res/values-hi/strings.xml b/android/app/src/main/res/values-hi/strings.xml
index 5c967ad0a4..c13ed9823d 100644
--- a/android/app/src/main/res/values-hi/strings.xml
+++ b/android/app/src/main/res/values-hi/strings.xml
@@ -284,6 +284,9 @@
अक्सर पूछे जाने वाले प्रश्नों
दान देना
+ पहले से दान
+ बाद में याद दिलाना
+ Organic Maps का समर्थन करें
परियोजना का समर्थन करें
diff --git a/android/app/src/main/res/values-hu/strings.xml b/android/app/src/main/res/values-hu/strings.xml
index a9b7797a2e..5438300ce7 100644
--- a/android/app/src/main/res/values-hu/strings.xml
+++ b/android/app/src/main/res/values-hu/strings.xml
@@ -264,6 +264,9 @@
Gyakran Ismételt Kérdések
Adományozás
+ Már adományozva
+ Emlékeztessen később
+ Organic Maps támogatása
A projekt támogatása
diff --git a/android/app/src/main/res/values-in/strings.xml b/android/app/src/main/res/values-in/strings.xml
index e1f52fa98e..33e75588e5 100644
--- a/android/app/src/main/res/values-in/strings.xml
+++ b/android/app/src/main/res/values-in/strings.xml
@@ -251,6 +251,9 @@
Pertanyaan dan jawaban
Menyumbangkan
+ Sudah disumbang
+ Ingatkan nanti
+ Mendukung Organic Maps
Mendukung proyek
diff --git a/android/app/src/main/res/values-it/strings.xml b/android/app/src/main/res/values-it/strings.xml
index ee792dec02..f610e8299f 100644
--- a/android/app/src/main/res/values-it/strings.xml
+++ b/android/app/src/main/res/values-it/strings.xml
@@ -259,6 +259,9 @@
Domande frequenti
Donare
+ Già donato
+ Ricorda più tardi
+ Supportare Organic Maps
Sostieni il progetto
diff --git a/android/app/src/main/res/values-iw/strings.xml b/android/app/src/main/res/values-iw/strings.xml
index 4e06d698b2..cf73a5e1e0 100644
--- a/android/app/src/main/res/values-iw/strings.xml
+++ b/android/app/src/main/res/values-iw/strings.xml
@@ -273,6 +273,9 @@
שאלות ותשובות
לתרום
+ כבר נתרם
+ הזכר מאוחר יותר
+ לתמוך ב-Organic Maps
תמכו בפרויקט
diff --git a/android/app/src/main/res/values-ja/strings.xml b/android/app/src/main/res/values-ja/strings.xml
index 59756b2447..46e6c0debb 100644
--- a/android/app/src/main/res/values-ja/strings.xml
+++ b/android/app/src/main/res/values-ja/strings.xml
@@ -274,6 +274,9 @@
よくある質問
寄付
+ 寄付済み
+ 後でリマインド
+ Organic Maps を支援
プロジェクトを支援する
diff --git a/android/app/src/main/res/values-ko/strings.xml b/android/app/src/main/res/values-ko/strings.xml
index eeb28a7dd6..d020badc5a 100644
--- a/android/app/src/main/res/values-ko/strings.xml
+++ b/android/app/src/main/res/values-ko/strings.xml
@@ -249,6 +249,9 @@
질문과 답변
기부
+ 기부완료
+ 나중에 알림
+ Organic Maps 지원하기
프로젝트 지원
diff --git a/android/app/src/main/res/values-lv/strings.xml b/android/app/src/main/res/values-lv/strings.xml
index 7896ad6417..6853cee1f2 100644
--- a/android/app/src/main/res/values-lv/strings.xml
+++ b/android/app/src/main/res/values-lv/strings.xml
@@ -273,6 +273,8 @@
Biežāk uzdotie jautājumi
Ziedot
+ Atgādināt vēlāk
+ Atbalstīt Organic Maps
Atbalstiet projektu
diff --git a/android/app/src/main/res/values-mr/strings.xml b/android/app/src/main/res/values-mr/strings.xml
index ddf8d91c24..3b7c214a7a 100644
--- a/android/app/src/main/res/values-mr/strings.xml
+++ b/android/app/src/main/res/values-mr/strings.xml
@@ -243,6 +243,9 @@
मदत
वारंवार विचारलेले प्रश्न
+ आधीच दान केले
+ नंतर आठवण करून द्या
+ Organic Maps ला समर्थन द्या
प्रकल्पाला पाठठिंबा द्या
diff --git a/android/app/src/main/res/values-nb/strings.xml b/android/app/src/main/res/values-nb/strings.xml
index d6b79258ba..1b235d91cf 100644
--- a/android/app/src/main/res/values-nb/strings.xml
+++ b/android/app/src/main/res/values-nb/strings.xml
@@ -271,6 +271,9 @@
Spørsmål og svar
Donere
+ Allerede donert
+ Påminn senere
+ Støtte Organic Maps
Støtt prosjektet
diff --git a/android/app/src/main/res/values-nl/strings.xml b/android/app/src/main/res/values-nl/strings.xml
index 8f0a3ee819..0813dce7e6 100644
--- a/android/app/src/main/res/values-nl/strings.xml
+++ b/android/app/src/main/res/values-nl/strings.xml
@@ -271,6 +271,9 @@
Vragen en antwoorden
Doneer
+ Reeds gedoneerd
+ Herinner later
+ Ondersteun Organic Maps
Steun het project
diff --git a/android/app/src/main/res/values-pl/strings.xml b/android/app/src/main/res/values-pl/strings.xml
index 20ce08d142..68e156e087 100644
--- a/android/app/src/main/res/values-pl/strings.xml
+++ b/android/app/src/main/res/values-pl/strings.xml
@@ -273,6 +273,9 @@
Pytania i odpowiedzi
Wspomóż
+ Już przekazano
+ Przypomnij później
+ Wspierać Organic Maps
Wesprzyj projekt
diff --git a/android/app/src/main/res/values-pt/strings.xml b/android/app/src/main/res/values-pt/strings.xml
index 3635852394..79f1e33895 100644
--- a/android/app/src/main/res/values-pt/strings.xml
+++ b/android/app/src/main/res/values-pt/strings.xml
@@ -259,6 +259,9 @@
Perguntas frequentes
Doar
+ Já doei
+ Lembre-me mais tarde
+ Apoie o Organic Maps
Apoie o projeto
diff --git a/android/app/src/main/res/values-ro/strings.xml b/android/app/src/main/res/values-ro/strings.xml
index 56aca32923..3ac6ad63fb 100644
--- a/android/app/src/main/res/values-ro/strings.xml
+++ b/android/app/src/main/res/values-ro/strings.xml
@@ -257,6 +257,9 @@
Întrebări frecvente
Donează
+ Deja donat
+ Amintește mai târziu
+ Susține Organic Maps
Susține proiectul
diff --git a/android/app/src/main/res/values-ru/strings.xml b/android/app/src/main/res/values-ru/strings.xml
index 9c8faddc3b..11fdafc167 100644
--- a/android/app/src/main/res/values-ru/strings.xml
+++ b/android/app/src/main/res/values-ru/strings.xml
@@ -276,6 +276,9 @@
Вопросы и ответы
Поддержать деньгами
+ Уже пожертвовано
+ Напомнить позже
+ Поддержать Organic Maps
Помочь проекту
diff --git a/android/app/src/main/res/values-sk/strings.xml b/android/app/src/main/res/values-sk/strings.xml
index 8dce7f3e43..2230f2ce50 100644
--- a/android/app/src/main/res/values-sk/strings.xml
+++ b/android/app/src/main/res/values-sk/strings.xml
@@ -271,6 +271,9 @@
Otázky a odpovede
Darovať
+ Už darované
+ Pripomeň neskôr
+ Podporiť Organic Maps
Podporte projekt
diff --git a/android/app/src/main/res/values-sv/strings.xml b/android/app/src/main/res/values-sv/strings.xml
index eb54f4b989..41a9d0d3fc 100644
--- a/android/app/src/main/res/values-sv/strings.xml
+++ b/android/app/src/main/res/values-sv/strings.xml
@@ -248,6 +248,9 @@
Frågor och svar
Donera
+ Redan donerat
+ Påminn senare
+ Stödja Organic Maps
Stöd projektet
diff --git a/android/app/src/main/res/values-sw/strings.xml b/android/app/src/main/res/values-sw/strings.xml
index ff629fa042..bc91e6e944 100644
--- a/android/app/src/main/res/values-sw/strings.xml
+++ b/android/app/src/main/res/values-sw/strings.xml
@@ -70,6 +70,9 @@
Maswali na majibu
Changia
+ Tayari kutoa
+ Kumbusha baadaye
+ Kuunga mkono Organic Maps
Saidia mradi
diff --git a/android/app/src/main/res/values-th/strings.xml b/android/app/src/main/res/values-th/strings.xml
index 7f12700306..6793aed025 100644
--- a/android/app/src/main/res/values-th/strings.xml
+++ b/android/app/src/main/res/values-th/strings.xml
@@ -252,6 +252,9 @@
คำถามและคำตอบ
บริจาค
+ บริจาคแล้ว
+ เตือนภายหลัง
+ สนับสนุน Organic Maps
สนับสนุนโครงการ
diff --git a/android/app/src/main/res/values-tr/strings.xml b/android/app/src/main/res/values-tr/strings.xml
index f4fcfecfd7..3f0c0fcf0d 100644
--- a/android/app/src/main/res/values-tr/strings.xml
+++ b/android/app/src/main/res/values-tr/strings.xml
@@ -273,6 +273,9 @@
Sıkça Sorulan Sorular
Bağış yapın
+ Zaten bağış yaptım
+ Sonra hatırlat
+ Organic Maps’i Destekleyin
Bu projeyi destekleyin
diff --git a/android/app/src/main/res/values-uk/strings.xml b/android/app/src/main/res/values-uk/strings.xml
index 58e0dda4f2..5fe6aa4254 100644
--- a/android/app/src/main/res/values-uk/strings.xml
+++ b/android/app/src/main/res/values-uk/strings.xml
@@ -276,6 +276,9 @@
Питання та відповіді
Підтримати грошима
+ Вже пожертвувано
+ Нагадати пізніше
+ Підтримати Organic Maps
Підтримайте проект
diff --git a/android/app/src/main/res/values-vi/strings.xml b/android/app/src/main/res/values-vi/strings.xml
index 116e6c737e..174b7b8f59 100644
--- a/android/app/src/main/res/values-vi/strings.xml
+++ b/android/app/src/main/res/values-vi/strings.xml
@@ -250,6 +250,9 @@
Câu hỏi và trả lời
Quyên tặng
+ Đã quyên góp
+ Nhắc sau
+ Hỗ trợ Organic Maps
Hỗ trợ dự án
diff --git a/android/app/src/main/res/values-zh-rTW/strings.xml b/android/app/src/main/res/values-zh-rTW/strings.xml
index bfd9bea845..5e9dc28566 100644
--- a/android/app/src/main/res/values-zh-rTW/strings.xml
+++ b/android/app/src/main/res/values-zh-rTW/strings.xml
@@ -280,6 +280,9 @@
問題和解答
捐助我們
+ 已捐贈
+ 稍後提醒
+ 支持 Organic Maps
支持本項目
diff --git a/android/app/src/main/res/values-zh/strings.xml b/android/app/src/main/res/values-zh/strings.xml
index 20617ce30c..44f63f3d02 100644
--- a/android/app/src/main/res/values-zh/strings.xml
+++ b/android/app/src/main/res/values-zh/strings.xml
@@ -280,6 +280,9 @@
问题和解答
捐助我们
+ 已捐赠
+ 稍后提醒
+ 支持 Organic Maps
支持本项目
diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml
index c389d18b5b..e2dc137a90 100644
--- a/android/app/src/main/res/values/strings.xml
+++ b/android/app/src/main/res/values/strings.xml
@@ -296,6 +296,9 @@
Frequently Asked Questions
Donate
+ Already donated
+ Remind later
+ Support Organic Maps
Support the project
diff --git a/data/strings/strings.txt b/data/strings/strings.txt
index e58ad6fcfd..48539786be 100644
--- a/data/strings/strings.txt
+++ b/data/strings/strings.txt
@@ -7017,7 +7017,7 @@
zh-Hant = 捐助,以共同打造最好的地圖!
[already_donated]
- tags = ios
+ tags = ios,android
en = Already donated
af = Reeds geskenk
ar = تم التبرع
@@ -7061,7 +7061,7 @@
zh-Hant = 已捐贈
[remind_me_later]
- tags = ios
+ tags = ios,android
en = Remind later
af = Herinner later
ar = ذكر لاحقاً
@@ -7106,7 +7106,7 @@
zh-Hant = 稍後提醒
[support_organic_maps]
- tags = ios
+ tags = ios,android
en = Support Organic Maps
af = Ondersteun Organic Maps
ar = دعم Organic Maps
diff --git a/map/framework.hpp b/map/framework.hpp
index 63fde1c9e9..c46de8942d 100644
--- a/map/framework.hpp
+++ b/map/framework.hpp
@@ -767,6 +767,7 @@ public:
void OnPowerSchemeChanged(power_management::Scheme const actualScheme) override;
public:
+ bool ShouldShowProducts() const;
std::optional GetProductsConfiguration() const;
enum class ProductsPopupCloseReason
@@ -777,12 +778,12 @@ public:
RemindLater
};
+ ProductsPopupCloseReason FromString(std::string const & str) const;
+
void DidCloseProductsPopup(ProductsPopupCloseReason reason) const;
void DidSelectProduct(products::ProductsConfig::Product const & product) const;
private:
- bool ShouldShowProducts() const;
uint32_t GetTimeoutForReason(ProductsPopupCloseReason reason) const;
std::string_view ToString(ProductsPopupCloseReason reason) const;
- ProductsPopupCloseReason FromString(std::string const & str) const;
};