-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #740 from 100mslive/dev
1.2.15 release
- Loading branch information
Showing
18 changed files
with
178 additions
and
80 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="20dp" | ||
android:height="21dp" | ||
android:viewportWidth="20" | ||
android:viewportHeight="21"> | ||
<path | ||
android:pathData="M9.999,2.386C10.426,2.369 10.847,2.49 11.2,2.73C11.431,2.887 11.625,3.09 11.771,3.325H11.875C12.165,3.325 12.443,3.44 12.648,3.645C12.816,3.813 12.924,4.03 12.958,4.262H14.219C14.633,4.262 15.031,4.427 15.324,4.72C15.617,5.013 15.781,5.41 15.781,5.825V10.512C15.781,10.857 15.501,11.137 15.156,11.137C14.811,11.137 14.531,10.857 14.531,10.512V5.825C14.531,5.742 14.498,5.662 14.44,5.604C14.381,5.545 14.302,5.512 14.219,5.512H12.969V6.293C12.969,6.583 12.854,6.862 12.648,7.067C12.443,7.272 12.165,7.387 11.875,7.387H8.125C7.835,7.387 7.557,7.272 7.352,7.067C7.146,6.862 7.031,6.583 7.031,6.293V5.512H5.781C5.698,5.512 5.619,5.545 5.56,5.604C5.502,5.662 5.469,5.742 5.469,5.825V10.512C5.469,10.857 5.189,11.137 4.844,11.137C4.499,11.137 4.219,10.857 4.219,10.512V5.825C4.219,5.41 4.383,5.013 4.676,4.72C4.969,4.427 5.367,4.262 5.781,4.262H7.042C7.076,4.03 7.184,3.813 7.352,3.645C7.557,3.44 7.835,3.325 8.125,3.325H8.232C8.378,3.091 8.571,2.888 8.802,2.731C9.154,2.491 9.574,2.37 9.999,2.386ZM8.281,6.137H11.719V4.575H11.378C11.108,4.575 10.869,4.402 10.785,4.145C10.733,3.99 10.632,3.856 10.497,3.764C10.361,3.671 10.199,3.627 10.036,3.636C10.012,3.637 9.989,3.637 9.966,3.636C9.802,3.627 9.641,3.672 9.506,3.764C9.371,3.856 9.27,3.99 9.218,4.146C9.134,4.402 8.895,4.575 8.625,4.575H8.281V6.137ZM8.034,11.154L9.213,14.395C9.27,14.557 9.374,14.698 9.512,14.8C9.652,14.903 9.82,14.962 9.993,14.968C10.167,14.974 10.339,14.927 10.485,14.833C10.63,14.741 10.743,14.608 10.811,14.45L11.911,11.977L12.191,12.537L12.192,12.539C12.263,12.681 12.373,12.801 12.509,12.884C12.644,12.968 12.801,13.012 12.96,13.012C12.96,13.012 12.96,13.012 12.96,13.012H17.031C17.376,13.012 17.656,12.732 17.656,12.387C17.656,12.042 17.376,11.762 17.031,11.762H13.201L12.659,10.677C12.586,10.531 12.474,10.409 12.334,10.325C12.195,10.241 12.034,10.198 11.871,10.202C11.708,10.206 11.55,10.255 11.414,10.346C11.279,10.436 11.172,10.563 11.105,10.711L10.059,13.065L8.899,9.873C8.841,9.715 8.739,9.577 8.604,9.477C8.469,9.377 8.307,9.318 8.14,9.309C7.972,9.299 7.805,9.339 7.66,9.423C7.514,9.508 7.397,9.633 7.322,9.783C7.322,9.783 7.322,9.783 7.322,9.783L6.333,11.762H2.969C2.624,11.762 2.344,12.042 2.344,12.387C2.344,12.732 2.624,13.012 2.969,13.012H6.574C6.573,13.012 6.574,13.012 6.574,13.012C6.733,13.012 6.889,12.968 7.025,12.884C7.161,12.801 7.27,12.681 7.342,12.539L7.343,12.537L8.034,11.154ZM4.844,13.637C5.189,13.637 5.469,13.917 5.469,14.262V16.137C5.469,16.22 5.502,16.299 5.56,16.358C5.619,16.417 5.698,16.449 5.781,16.449H14.219C14.302,16.449 14.381,16.417 14.44,16.358C14.498,16.299 14.531,16.22 14.531,16.137V14.262C14.531,13.917 14.811,13.637 15.156,13.637C15.501,13.637 15.781,13.917 15.781,14.262V16.137C15.781,16.551 15.617,16.949 15.324,17.242C15.031,17.535 14.633,17.699 14.219,17.699H5.781C5.367,17.699 4.969,17.535 4.676,17.242C4.383,16.949 4.219,16.551 4.219,16.137V14.262C4.219,13.917 4.499,13.637 4.844,13.637Z" | ||
android:fillColor="#538DFF" | ||
android:fillType="evenOdd"/> | ||
</vector> |
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
39 changes: 39 additions & 0 deletions
39
room-kit/src/main/java/live/hms/roomkit/ui/diagnostic/DiagnosticProvider.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,39 @@ | ||
package live.hms.roomkit.ui.diagnostic | ||
|
||
import android.app.Application | ||
import android.content.Context | ||
import androidx.core.content.edit | ||
import live.hms.video.diagnostics.HMSDiagnostic | ||
import live.hms.video.sdk.HMSSDK | ||
import java.util.UUID | ||
|
||
class DiagnosticProvider(private val application: Application) { | ||
private var hms : Pair<HMSSDK,HMSDiagnostic>? = null | ||
private val consistentUserId = getConsistentUserIdOverSessions() | ||
fun disposeOfDiagnostic() { | ||
hms?.second?.stopConnectivityCheck() | ||
hms = null | ||
} | ||
fun getSdk() = hms?.first ?: createInstance(application).first | ||
fun getDiagnosticSdk() : HMSDiagnostic = hms?.second ?: createInstance(application).second | ||
private fun createInstance(application: Application) : Pair<HMSSDK, HMSDiagnostic> { | ||
val hmsSDK = HMSSDK.Builder(application).build() | ||
val diag = hmsSDK.getDiagnosticSDK(consistentUserId) | ||
return Pair(hmsSDK, diag).apply { hms = this } | ||
} | ||
|
||
private fun getConsistentUserIdOverSessions(): String { | ||
val sharedPreferences = application.getSharedPreferences( | ||
"your-activity-preference", Context.MODE_PRIVATE | ||
) | ||
if (sharedPreferences.getString("saved_user_id_blocklist", null) == null) { | ||
sharedPreferences.edit { | ||
putString( | ||
"saved_user_id_blocklist", UUID.randomUUID().toString() | ||
) | ||
} | ||
} | ||
return sharedPreferences.getString("saved_user_id_blocklist", null).orEmpty() | ||
} | ||
|
||
} |
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.