-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Background** Add countly session **Changes** - Handle session by countly **Test plan** See countly dashboard
- Loading branch information
Showing
8 changed files
with
56 additions
and
0 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
2 changes: 2 additions & 0 deletions
2
components/analytics/metric/api/src/main/java/com/flipperdevices/metric/api/MetricApi.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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
package com.flipperdevices.metric.api | ||
|
||
import com.flipperdevices.metric.api.events.ComplexEvent | ||
import com.flipperdevices.metric.api.events.SessionState | ||
import com.flipperdevices.metric.api.events.SimpleEvent | ||
|
||
interface MetricApi { | ||
fun reportSimpleEvent(simpleEvent: SimpleEvent, arg: String? = null) | ||
fun reportComplexEvent(complexEvent: ComplexEvent) | ||
fun reportSessionState(state: SessionState) | ||
} |
12 changes: 12 additions & 0 deletions
12
...s/analytics/metric/api/src/main/java/com/flipperdevices/metric/api/events/SessionState.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,12 @@ | ||
package com.flipperdevices.metric.api.events | ||
|
||
import android.app.Activity | ||
import android.content.res.Configuration | ||
|
||
sealed class SessionState { | ||
data class StartSession(val activity: Activity) : SessionState() | ||
|
||
data object StopSession : SessionState() | ||
|
||
data class ConfigurationChanged(val configuration: Configuration) : SessionState() | ||
} |
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
3 changes: 3 additions & 0 deletions
3
.../analytics/metric/impl/src/main/java/com/flipperdevices/metric/impl/countly/CountlyApi.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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
package com.flipperdevices.metric.impl.countly | ||
|
||
import com.flipperdevices.metric.api.events.SessionState | ||
|
||
interface CountlyApi { | ||
fun reportEvent(id: String, params: Map<String, Any?>? = null) | ||
fun reportSessionState(state: SessionState) | ||
} |
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