-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into paypal-app-switch-feature
- Loading branch information
Showing
196 changed files
with
1,774 additions
and
1,802 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
47 changes: 47 additions & 0 deletions
47
BraintreeCore/schemas/com.braintreepayments.api.core.AnalyticsDatabase/8.json
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,47 @@ | ||
{ | ||
"formatVersion": 1, | ||
"database": { | ||
"version": 8, | ||
"identityHash": "312082ac4a200e3aa820a34e9dbf6e7a", | ||
"entities": [ | ||
{ | ||
"tableName": "analytics_event_blob", | ||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `json_string` TEXT NOT NULL, `sessionId` TEXT NOT NULL DEFAULT '')", | ||
"fields": [ | ||
{ | ||
"fieldPath": "id", | ||
"columnName": "_id", | ||
"affinity": "INTEGER", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "jsonString", | ||
"columnName": "json_string", | ||
"affinity": "TEXT", | ||
"notNull": true | ||
}, | ||
{ | ||
"fieldPath": "sessionId", | ||
"columnName": "sessionId", | ||
"affinity": "TEXT", | ||
"notNull": true, | ||
"defaultValue": "''" | ||
} | ||
], | ||
"primaryKey": { | ||
"autoGenerate": true, | ||
"columnNames": [ | ||
"_id" | ||
] | ||
}, | ||
"indices": [], | ||
"foreignKeys": [] | ||
} | ||
], | ||
"views": [], | ||
"setupQueries": [ | ||
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", | ||
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '312082ac4a200e3aa820a34e9dbf6e7a')" | ||
] | ||
} | ||
} |
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
40 changes: 40 additions & 0 deletions
40
BraintreeCore/src/main/java/com/braintreepayments/api/core/AnalyticsParamRepository.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,40 @@ | ||
package com.braintreepayments.api.core | ||
|
||
import androidx.annotation.RestrictTo | ||
|
||
/** | ||
* This class is responsible for holding parameters that are sent with analytic events. | ||
*/ | ||
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) | ||
class AnalyticsParamRepository( | ||
private val uuidHelper: UUIDHelper = UUIDHelper() | ||
) { | ||
|
||
private lateinit var _sessionId: String | ||
|
||
/** | ||
* Session ID to tie analytics events together which is used for reporting conversion funnels. | ||
*/ | ||
val sessionId: String | ||
get() { | ||
if (!this::_sessionId.isInitialized) { | ||
_sessionId = uuidHelper.formattedUUID | ||
} | ||
return _sessionId | ||
} | ||
|
||
/** | ||
* Clears the session ID value from the repository | ||
*/ | ||
fun resetSessionId() { | ||
_sessionId = uuidHelper.formattedUUID | ||
} | ||
|
||
companion object { | ||
|
||
/** | ||
* Singleton instance of the AnalyticsParamRepository. | ||
*/ | ||
val instance: AnalyticsParamRepository by lazy { AnalyticsParamRepository() } | ||
} | ||
} |
Oops, something went wrong.