File tree Expand file tree Collapse file tree 4 files changed +40
-1
lines changed
reaper/src/main/kotlin/com/emergetools/reaper Expand file tree Collapse file tree 4 files changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ All notable changes to reaper will be documented in this file.
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
6
6
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7
7
8
+ ## Unreleased
9
+
10
+ - Require ` com.emergetools.OVERRIDE_BASE_URL ` to be set. [ #610 ] ( https://github.com/EmergeTools/emerge-android/pull/610 )
11
+
8
12
## 1.0.1 - 2025-03-05
9
13
10
14
- Add ` Reaper.fuseOff() ` . [ #491 ] ( https://github.com/EmergeTools/emerge-android/pull/491 )
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ import android.os.Bundle
4
4
5
5
private const val MANIFEST_TAG_INSTRUMENTED = " com.emergetools.reaper.REAPER_INSTRUMENTED"
6
6
private const val MANIFEST_TAG_PUBLISHABLE_API_KEY = " com.emergetools.reaper.PUBLISHABLE_API_KEY"
7
+
8
+ // Override is a misnomer now as this is required and there is no base endpoint however
9
+ // don't want to rename this and create more confusion.
7
10
private const val MANIFEST_TAG_OVERRIDE_BASE_URL = " com.emergetools.OVERRIDE_BASE_URL"
8
11
private const val MANIFEST_TAG_DEBUG = " com.emergetools.reaper.DEBUG"
9
12
@@ -16,7 +19,12 @@ internal fun getApiKey(metadata: Bundle): String {
16
19
}
17
20
18
21
internal fun getBaseUrl (metadata : Bundle ): String {
19
- return metadata.getString(MANIFEST_TAG_OVERRIDE_BASE_URL , ReaperConfig .EMERGE_BASE_URL )
22
+ val baseUrl = metadata.getString(MANIFEST_TAG_OVERRIDE_BASE_URL , " " )
23
+ check(baseUrl != " " ) {
24
+ " com.emergetools.OVERRIDE_BASE_URL must be set to a URL. " +
25
+ " See https://docs.emergetools.com/docs/reaper-setup-android#setting-baseurl"
26
+ }
27
+ return baseUrl
20
28
}
21
29
22
30
internal fun isDebug (metadata : Bundle ): Boolean {
Original file line number Diff line number Diff line change 21
21
</activity >
22
22
<activity android : name =" androidx.activity.ComponentActivity" />
23
23
24
+ <!-- The Reaper library sends data to two endpoints:
25
+ - $baseUrl/report
26
+ - $baseUrl/reaper/error
27
+ So if baseUrl is set to https://example.com/foo as
28
+ below Reaper reports will be sent to:
29
+ - https://example.com/foo/report
30
+ and errors will be sent to:
31
+ - https://example.com/foo/reaper/error
32
+ -->
33
+ <meta-data
34
+ android : name =" com.emergetools.OVERRIDE_BASE_URL"
35
+ android : value =" https://example.com/foo" />
36
+
24
37
</application >
25
38
26
39
</manifest >
Original file line number Diff line number Diff line change 13
13
<category android : name =" android.intent.category.LAUNCHER" />
14
14
</intent-filter >
15
15
</activity >
16
+
17
+ <!-- The Reaper library sends data to two endpoints:
18
+ - $baseUrl/report
19
+ - $baseUrl/reaper/error
20
+ So if baseUrl is set to https://example.com/foo as
21
+ below Reaper reports will be sent to:
22
+ - https://example.com/foo/report
23
+ and errors will be sent to:
24
+ - https://example.com/foo/reaper/error
25
+ -->
26
+ <meta-data
27
+ android : name =" com.emergetools.OVERRIDE_BASE_URL"
28
+ android : value =" https://example.com/foo" />
29
+
16
30
</application >
17
31
18
32
</manifest >
You can’t perform that action at this time.
0 commit comments