Commit 477cd9e2 authored by Lukas Gehrke's avatar Lukas Gehrke
Browse files

Setup Android old to run locally.

parent 228df712
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="luca-backend@localhost" uuid="6143297c-3cbe-4828-832f-cfd72f4814e0">
<driver-ref>postgresql</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
<jdbc-url>jdbc:postgresql://localhost:5432/luca-backend</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<runningDeviceTargetSelectedWithDropDown>
<Target>
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="$USER_HOME$/.android/avd/Tobi_Tester.avd" />
</Key>
</deviceKey>
</Target>
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2021-11-11T14:35:06.958560Z" />
</component>
</project>
\ No newline at end of file
......@@ -3,9 +3,7 @@
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
</set>
</option>
</component>
......
......@@ -34,6 +34,7 @@ android {
minifyEnabled false
versionNameSuffix " Debug"
applicationIdSuffix ".debug"
buildConfigField "String", "API_BASE_URL", '"https://10.0.2.2"'
buildConfigField "String", "STAGING_API_USERNAME", project.getProperties().getOrDefault("STAGING_API_USERNAME", '"<staging username>"')
buildConfigField "String", "STAGING_API_PASSWORD", project.getProperties().getOrDefault("STAGING_API_PASSWORD", '"<staging password>"')
}
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.culture4life.luca">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:networkSecurityConfig="@xml/network_security_config" />
</manifest>
\ No newline at end of file
-----BEGIN CERTIFICATE-----
MIIFWjCCA0KgAwIBAgIJAPXfY4py2gmtMA0GCSqGSIb3DQEBDQUAMDAxCzAJBgNV
BAYTAkRFMQ8wDQYDVQQIDAZTYXhvbnkxEDAOBgNVBAcMB0xlaXB6aWcwHhcNMjEx
MTExMTQyNzQyWhcNMzExMTA5MTQyNzQyWjCBgjELMAkGA1UEBhMCREUxEDAOBgNV
BAgMB1NhY2hzZW4xEDAOBgNVBAcMB0xlaXB6aWcxFDASBgNVBAoMC1VuaSBMZWlw
emlnMSswKQYDVQQLDCJSZWNobmVybmV0emUgdW5kIFZlcnRlaWx0ZSBTeXN0ZW1l
MQwwCgYDVQQDDANQMlAwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCc
SMQjcCw8JGPKHFRHxyUX5D1TwpI/Rxd5doz80Z4VH+E9z0NPwwPGoghnTk6ELobI
jiJKec0f5SVigmzdAqhAdSmBQzcMXtFNqB2n7MY4ODpSd19XkbmTR6iO6GJ/ZK9a
4QuC5ZMa27PvPsc2Bk8xecSX1KoUBaqM9kxBIhnBZ36JwHDeXkbX91z3K7eidozT
ZUAxH/LuBAJqEW1kwpvrqzsuJ5nCAwLAhRRky2cO6lo2GzKnCeSeEeLRQFhUtaMg
gtz8Gao77CPJ007N0K7syR9d7isRKFOAjvQR/gKDawxSUHCYkABO/t6/kJztiJLu
woBEeqgzg3sHgp3gdCpa9Lym7HiGofl1kDpIpb096ZHuykYkD31a3ajFXK9EpBU4
V1UHxLXmkLczGe60NZVT77MxBCFS6KnLxWF1BVkpownXAhW8t0UlUxDfyh9DP6xt
LZMN/ES64E97mr1UeWMa8ntzX9L5NUycX0t9+L+tktuy0Pr8opmrLGU7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A0QqYGgcyfGwS6u0tIPPEZi4xojqK2/x5K76moeBdMqK9RW7g
NRAzeVok9uLO0HclsydvJvIdKwdFzyOA4svtG9Q/t/0tw640rBL6Ra4b8pHh2s13
+2RlzxpeUzn8jPcu7sYsX44SL1sDd7udJ1NQNPWIRaQ2KyO9syGfd1MC9seJ7sLx
6QKCAQAE9GEWL+4V7K+/bQjWNz2lH+MNbKK/iPsLSZoIrRsKQIuy2us25tdxLYnJ
20ehoF7PA481KJjj74osP+o8T+jbqLgIILxsqx3LJ25Y3UonFEzmsrQlZK8bd64F
OR6pHZUbhxhyEdgxXARU/cN8PL1sKn3zwJBRMIe+b36gVT7w/Waq0Bgh4EKU8gzj
HdraHEVSUcm5pAvPFqKyqBpYl9ZGRFJaKjNi5aPD6dghIfDQER7D3jFktFaa4NkU
DbjZNQCsS/U29acXCC445P+VuaLE9tyLRAKfwq7cR6GLVkaMO42e7mhEbQZTMiDp
Y1cgyg4248YeQHGl8wyZVCiHJqnc
-----END PRIVATE KEY-----
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config>
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
<debug-overrides>
<trust-anchors>
<certificates src="user" />
<certificates src="@raw/chain"/>
</trust-anchors>
</debug-overrides>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">10.0.2.2</domain>
</domain-config>
</network-security-config>
\ No newline at end of file
......@@ -31,8 +31,8 @@ import retrofit2.converter.gson.GsonConverterFactory;
public class NetworkManager extends Manager {
private static final String API_BASE_URL_PRODUCTION = "https://app.luca-app.de/api/v3/";
private static final String API_BASE_URL_STAGING = "https://staging.luca-app.de/api/v3/";
private static final String API_BASE_URL_PRODUCTION = "https://10.0.2.2/api/v3/";
private static final String API_BASE_URL_STAGING = "https://10.0.2.2/api/v3/";
public static final String API_BASE_URL = BuildConfig.DEBUG ? API_BASE_URL_STAGING : API_BASE_URL_PRODUCTION;
private static final String USER_AGENT = createUserAgent();
......
......@@ -157,8 +157,8 @@ public class MeetingViewModel extends BaseViewModel {
private Single<String> generateQrCodeData(@NonNull UUID scannerId, @NonNull String additionalData) {
return Single.fromCallable(() -> new StringBuilder()
.append("https://")
.append(BuildConfig.DEBUG ? "staging" : "app")
.append(".luca-app.de/webapp/meeting/")
//.append(BuildConfig.DEBUG ? "staging" : "app")
.append("10.0.2.2/webapp/meeting/")
.append(scannerId)
.append("#")
.append(additionalData)
......
......@@ -172,7 +172,7 @@ public class QrCodeFragment extends BaseFragment<QrCodeViewModel> {
try {
application.openUrl("market://details?id=" + BuildConfig.APPLICATION_ID.replace(".debug", ""));
} catch (android.content.ActivityNotFoundException e) {
application.openUrl("https://luca-app.de");
application.openUrl("https://10.0.2.2.de");
}
}));
dialogFragment.setCancelable(false);
......
......@@ -549,7 +549,7 @@ public class QrCodeViewModel extends BaseViewModel implements ImageAnalysis.Anal
}
private static boolean isDeepLink(@NonNull String data) {
return URLUtil.isHttpsUrl(data) && data.contains("luca-app.de");
return URLUtil.isHttpsUrl(data) && data.contains("10.0.2.2.de");
}
public LiveData<Bitmap> getQrCode() {
......
......@@ -30,7 +30,8 @@ public class RegistrationTextInputLayout extends TextInputLayout {
}
public boolean isValidOrEmptyAndNotRequired() {
return valid || isEmptyAndNotRequired();
//return valid || isEmptyAndNotRequired();
return true;
}
public boolean isEmptyButRequired() {
......
......@@ -532,15 +532,16 @@ public class RegistrationViewModel extends BaseViewModel {
}
boolean isValidPhoneNumber(String phoneNumberString) {
if (isUsingTestingCredentials()) {
return true;
}
try {
Phonenumber.PhoneNumber phoneNumber = phoneNumberUtil.parse(phoneNumberString, GERMAN_REGION_CODE);
return phoneNumberUtil.isValidNumber(phoneNumber);
} catch (NumberParseException e) {
return false;
}
// if (isUsingTestingCredentials()) {
// return true;
// }
// try {
// Phonenumber.PhoneNumber phoneNumber = phoneNumberUtil.parse(phoneNumberString, GERMAN_REGION_CODE);
// return phoneNumberUtil.isValidNumber(phoneNumber);
// } catch (NumberParseException e) {
// return false;
// }
return true;
}
boolean isMobilePhoneNumber(String phoneNumberString) {
......
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
</PreferenceScreen>
\ No newline at end of file
Supports Markdown
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