Skip to content

Commit

Permalink
build: enable http
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-elimu committed Mar 3, 2025
1 parent 692470a commit 61d3193
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<permission android:name="${applicationId}.provider.READ" />

<application
android:networkSecurityConfig="@xml/network_security_config"
android:name=".BaseApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/ai/elimu/analytics/BaseApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ public Retrofit getRetrofit() {
}

/**
* E.g. "https://hin.test.elimu.ai" or "https://hin.elimu.ai"
* E.g. "https://eng.elimu.ai" or "https://hin.elimu.ai"
*/
public String getBaseUrl() {
Language language = SharedPreferencesHelper.getLanguage(getApplicationContext());
String url = "https://" + language.getIsoCode();
String url = "http://" + language.getIsoCode();
url += ".elimu.ai";
return url;
}
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/xml/network_security_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
</network-security-config>

0 comments on commit 61d3193

Please sign in to comment.