-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
86 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
VERSION_NAME=3.3.1 | ||
VERSION_NAME=3.3.2 | ||
GROUP=io.piano.android | ||
POM_NAME=Analytics | ||
POM_ARTIFACT_ID=analytics | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
piano-analytics/src/main/java/io/piano/android/analytics/ReportUrlProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package io.piano.android.analytics | ||
|
||
/** | ||
* Interface for providing URL parts like [collectDomain], [site] adn [path] | ||
* SDK doesn't cache results from these methods, which allows you to dynamically change values | ||
*/ | ||
interface ReportUrlProvider { | ||
/** | ||
* fully qualified domain name (FQDN) collect | ||
*/ | ||
val collectDomain: String | ||
|
||
/** | ||
* site identifier | ||
*/ | ||
val site: Int | ||
|
||
/** | ||
* a resource name string prefixed by '/' | ||
*/ | ||
val path: String | ||
get() = Configuration.DEFAULT_PATH | ||
} | ||
|
||
/** | ||
* Implementation of [ReportUrlProvider], that return static values | ||
*/ | ||
class StaticReportUrlProvider( | ||
override val collectDomain: String, | ||
override val site: Int, | ||
override val path: String = Configuration.DEFAULT_PATH, | ||
) : ReportUrlProvider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters