Commit b7b235f6 authored by Harri Kirik's avatar Harri Kirik
Browse files

COVAPP-462; Fix URls

parent 4a684316
......@@ -30,7 +30,7 @@ object IcefireEnvironment : Environment {
ru = "https://www.hoia.me/ru?source=app"
)
override val contactInfoPageUrl: LocalizedUrl = LocalizedUrl(
et = "ttps://www.hoia.me/close-contact?source=app",
et = "https://www.hoia.me/close-contact?source=app",
en = "https://www.hoia.me/en/close-contact?source=app",
ru = "https://www.hoia.me/ru/close-contact?source=app"
)
......@@ -45,9 +45,9 @@ object IcefireEnvironment : Environment {
ru = "https://www.terviseamet.ee/ru/instrukciya-po-lecheniyu-na-domu-pacienta-s-covid-19"
)
override val healthBoardRecommendationsUrl: LocalizedUrl = LocalizedUrl(
et = "https://www.terviseamet.ee/et/lahikontaktse-juhis",
en = "https://www.terviseamet.ee/et/lahikontaktse-juhis#ENG",
ru = "https://www.terviseamet.ee/et/lahikontaktse-juhis#RUS"
et = "https://www.terviseamet.ee/et/lahikontaktse-juhis#est",
en = "https://www.terviseamet.ee/et/lahikontaktse-juhis#eng",
ru = "https://www.terviseamet.ee/et/lahikontaktse-juhis#rus"
)
override val gotSickAbroadUrl: LocalizedUrl = LocalizedUrl(
et = "https://www.hoia.me/hoia-euroopas?source=app",
......
......@@ -66,7 +66,7 @@ class ContactsFragment : MvvmFragment(R.layout.fragment_contacts), ViewBindingHo
private fun handleAction(action: ContactsViewModel.Action) {
when (action) {
is ContactsViewModel.Action.NavigateHome -> returnHomeWithoutRestart()
is ContactsViewModel.Action.OpenContactsInfoUrl -> startActivity(Intent(Intent.ACTION_VIEW).setData(Uri.parse(action.url)))
is ContactsViewModel.Action.OpenContactsInfoUrl -> startActivitySafely(Intent(Intent.ACTION_VIEW).setData(Uri.parse(action.url)))
is ContactsViewModel.Action.OpenHealthBoardRecommendationsUrl -> startActivitySafely(
Intent(Intent.ACTION_VIEW).setData(
Uri.parse(action.url)
......
......@@ -10,7 +10,6 @@
package org.dpppt.android.app.util;
import android.bluetooth.BluetoothAdapter;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
......@@ -19,18 +18,12 @@ import androidx.annotation.NonNull;
public class DeviceFeatureHelper {
public static boolean isBluetoothEnabled() {
BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
return bluetoothAdapter != null && bluetoothAdapter.isEnabled();
}
public static void openPlayServicesInPlayStore(@NonNull Context context) {
final String playServicesPackageName = "com.google.android.gms";
try {
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + playServicesPackageName)));
} catch (android.content.ActivityNotFoundException e) {
context.startActivity(new Intent(Intent.ACTION_VIEW,
Uri.parse("https://play.google.com/store/apps/details?id=" + playServicesPackageName)));
AndroidUtilKt.startActivitySafely(context, new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + playServicesPackageName)));
}
}
......
......@@ -30,7 +30,7 @@ object TehikdevEnvironment : Environment {
ru = "https://www.hoia.me/ru?source=app"
)
override val contactInfoPageUrl: LocalizedUrl = LocalizedUrl(
et = "ttps://www.hoia.me/close-contact?source=app",
et = "https://www.hoia.me/close-contact?source=app",
en = "https://www.hoia.me/en/close-contact?source=app",
ru = "https://www.hoia.me/ru/close-contact?source=app"
)
......@@ -45,9 +45,9 @@ object TehikdevEnvironment : Environment {
ru = "https://www.terviseamet.ee/ru/instrukciya-po-lecheniyu-na-domu-pacienta-s-covid-19"
)
override val healthBoardRecommendationsUrl: LocalizedUrl = LocalizedUrl(
et = "https://www.terviseamet.ee/et/lahikontaktse-juhis",
en = "https://www.terviseamet.ee/et/lahikontaktse-juhis#ENG",
ru = "https://www.terviseamet.ee/et/lahikontaktse-juhis#RUS"
et = "https://www.terviseamet.ee/et/lahikontaktse-juhis#est",
en = "https://www.terviseamet.ee/et/lahikontaktse-juhis#eng",
ru = "https://www.terviseamet.ee/et/lahikontaktse-juhis#rus"
)
override val gotSickAbroadUrl: LocalizedUrl = LocalizedUrl(
et = "https://www.hoia.me/hoia-euroopas?source=app",
......
......@@ -36,7 +36,7 @@ object TehikprodEnvironment : Environment {
ru = "https://www.hoia.me/ru?source=app"
)
override val contactInfoPageUrl: LocalizedUrl = LocalizedUrl(
et = "ttps://www.hoia.me/close-contact?source=app",
et = "https://www.hoia.me/close-contact?source=app",
en = "https://www.hoia.me/en/close-contact?source=app",
ru = "https://www.hoia.me/ru/close-contact?source=app"
)
......@@ -51,9 +51,9 @@ object TehikprodEnvironment : Environment {
ru = "https://www.terviseamet.ee/ru/instrukciya-po-lecheniyu-na-domu-pacienta-s-covid-19"
)
override val healthBoardRecommendationsUrl: LocalizedUrl = LocalizedUrl(
et = "https://www.terviseamet.ee/et/lahikontaktse-juhis",
en = "https://www.terviseamet.ee/et/lahikontaktse-juhis#ENG",
ru = "https://www.terviseamet.ee/et/lahikontaktse-juhis#RUS"
et = "https://www.terviseamet.ee/et/lahikontaktse-juhis#est",
en = "https://www.terviseamet.ee/et/lahikontaktse-juhis#eng",
ru = "https://www.terviseamet.ee/et/lahikontaktse-juhis#rus"
)
override val gotSickAbroadUrl: LocalizedUrl = LocalizedUrl(
et = "https://www.hoia.me/hoia-euroopas?source=app",
......
......@@ -30,7 +30,7 @@ object TehiktestEnvironment : Environment {
ru = "https://www.hoia.me/ru?source=app"
)
override val contactInfoPageUrl: LocalizedUrl = LocalizedUrl(
et = "ttps://www.hoia.me/close-contact?source=app",
et = "https://www.hoia.me/close-contact?source=app",
en = "https://www.hoia.me/en/close-contact?source=app",
ru = "https://www.hoia.me/ru/close-contact?source=app"
)
......@@ -45,9 +45,9 @@ object TehiktestEnvironment : Environment {
ru = "https://www.terviseamet.ee/ru/instrukciya-po-lecheniyu-na-domu-pacienta-s-covid-19"
)
override val healthBoardRecommendationsUrl: LocalizedUrl = LocalizedUrl(
et = "https://www.terviseamet.ee/et/lahikontaktse-juhis",
en = "https://www.terviseamet.ee/et/lahikontaktse-juhis#ENG",
ru = "https://www.terviseamet.ee/et/lahikontaktse-juhis#RUS"
et = "https://www.terviseamet.ee/et/lahikontaktse-juhis#est",
en = "https://www.terviseamet.ee/et/lahikontaktse-juhis#eng",
ru = "https://www.terviseamet.ee/et/lahikontaktse-juhis#rus"
)
override val gotSickAbroadUrl: LocalizedUrl = LocalizedUrl(
et = "https://www.hoia.me/hoia-euroopas?source=app",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment