-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into feat/offline
- Loading branch information
Showing
39 changed files
with
348 additions
and
66 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
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
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
41 changes: 41 additions & 0 deletions
41
app/src/main/java/org/openedx/app/analytics/FullstoryAnalytics.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,41 @@ | ||
package org.openedx.app.analytics | ||
|
||
import com.fullstory.FS | ||
import com.fullstory.FSSessionData | ||
import org.openedx.core.utils.Logger | ||
|
||
class FullstoryAnalytics : Analytics { | ||
|
||
private val logger = Logger(TAG) | ||
|
||
init { | ||
FS.setReadyListener { sessionData: FSSessionData -> | ||
val sessionUrl = sessionData.currentSessionURL | ||
logger.d { "FullStory Session URL is: $sessionUrl" } | ||
} | ||
} | ||
|
||
override fun logScreenEvent(screenName: String, params: Map<String, Any?>) { | ||
logger.d { "Page : $screenName $params" } | ||
FS.page(screenName, params).start() | ||
} | ||
|
||
override fun logEvent(eventName: String, params: Map<String, Any?>) { | ||
logger.d { "Event: $eventName $params" } | ||
FS.page(eventName, params).start() | ||
} | ||
|
||
override fun logUserId(userId: Long) { | ||
logger.d { "Identify: $userId" } | ||
FS.identify( | ||
userId.toString(), mapOf( | ||
DISPLAY_NAME to userId | ||
) | ||
) | ||
} | ||
|
||
private companion object { | ||
const val TAG = "FullstoryAnalytics" | ||
private const val DISPLAY_NAME = "displayName" | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
app/src/main/java/org/openedx/app/deeplink/BranchBrazeDeeplinkHandler.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,26 @@ | ||
package org.openedx.app.deeplink | ||
|
||
import android.content.Context | ||
import android.content.Intent | ||
import android.net.Uri | ||
import com.braze.ui.BrazeDeeplinkHandler | ||
import com.braze.ui.actions.UriAction | ||
import org.openedx.app.AppActivity | ||
|
||
internal class BranchBrazeDeeplinkHandler : BrazeDeeplinkHandler() { | ||
override fun gotoUri(context: Context, uriAction: UriAction) { | ||
val deeplink = uriAction.uri.toString() | ||
|
||
if (deeplink.contains("app.link")) { | ||
val intent = Intent(context, AppActivity::class.java).apply { | ||
action = Intent.ACTION_VIEW | ||
data = Uri.parse(deeplink) | ||
flags = Intent.FLAG_ACTIVITY_NEW_TASK | ||
putExtra("branch_force_new_session", true) | ||
} | ||
context.startActivity(intent) | ||
} else { | ||
super.gotoUri(context, uriAction) | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.