Skip to content

Commit

Permalink
Merge pull request #294 from 100mslive/dev
Browse files Browse the repository at this point in the history
Dev to release
  • Loading branch information
AniketSK authored Oct 4, 2022
2 parents 1396ead + 2f3cc37 commit 236a34e
Show file tree
Hide file tree
Showing 162 changed files with 8,886 additions and 3,436 deletions.
5 changes: 3 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'

//100ms.live SDK
implementation 'com.github.100mslive.android-sdk:lib:2.4.8'
implementation 'com.github.100mslive.android-sdk:virtualBackground:2.4.8'
implementation 'com.github.100mslive.android-sdk:lib:2.4.9'
implementation 'com.github.100mslive.android-sdk:virtualBackground:2.4.9'

// Navigation
implementation "androidx.navigation:navigation-fragment-ktx:2.4.0"
Expand Down Expand Up @@ -109,4 +109,5 @@ dependencies {
implementation 'com.google.android.exoplayer:exoplayer-core:2.16.1'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.16.1'
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
}
41 changes: 22 additions & 19 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,42 @@
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30"/>
<uses-permission
android:name="android.permission.BLUETOOTH"
android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

<application
android:name="live.hms.app2.ui.GlobalApplication"
android:name=".ui.GlobalApplication"
android:allowBackup="false"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="false"
android:theme="@style/Theme.App2">

<activity
android:name="live.hms.app2.ui.home.HomeActivity"
android:label="@string/app_name"
android:name=".ui.home.QrCodeActivity"
android:exported="false" />
<activity
android:name=".ui.home.HomeActivity"
android:exported="true"
android:label="@string/app_name"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize"
android:theme="@style/Theme.App2.NoActionBar">
android:theme="@style/Theme.App2.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize">
<intent-filter android:exported="true">
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<intent-filter android:label="Join Meeting"
android:exported="true">
<intent-filter
android:exported="true"
android:label="Join Meeting">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
Expand All @@ -48,18 +54,16 @@
android:host="*.100ms.live"
android:scheme="https" />
</intent-filter>

</activity>

<activity
android:name="live.hms.app2.ui.meeting.MeetingActivity"
android:label="@string/meeting"
android:name=".ui.meeting.MeetingActivity"
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
android:exported="true"
android:label="@string/meeting"
android:launchMode="singleTask"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize"
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
android:supportsPictureInPicture="true"
android:theme="@style/Theme.App2.NoActionBar" />
android:theme="@style/Theme.App2.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize" />

<provider
android:name="androidx.core.content.FileProvider"
Expand All @@ -70,7 +74,6 @@
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>

</application>

</manifest>
</manifest>
3 changes: 2 additions & 1 deletion app/src/main/java/live/hms/app2/api/RetrofitBuilder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ object RetrofitBuilder {

suspend fun fetchAuthToken(request: Request): TokenResponse {
val deferred = CompletableDeferred<TokenResponse>()

val fetchAuthTokenStartedAt = System.currentTimeMillis()
client.newCall(request).enqueue(object : Callback {
override fun onFailure(call: Call, e: IOException) {

Expand All @@ -89,6 +89,7 @@ object RetrofitBuilder {

override fun onResponse(call: Call, response: Response) {
Log.d(TAG, "fetchAuthToken: response=$response")
Log.d(TAG, "~~ Took ${System.currentTimeMillis() - fetchAuthTokenStartedAt} ms to fetch token ~~")
if (response.code != 200) {
val ex = Exception("Expected response code 200 but received ${response.code} [response=$response]")
deferred.completeExceptionally(ex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ class NetworkQualityHelper {
0 -> {
(ContextCompat.getDrawable(context, R.drawable.ic_baseline_wifi_0))
}
1 -> (ContextCompat.getDrawable(context, R.drawable.ic_baseline_wifi_2))
2 -> (ContextCompat.getDrawable(context, R.drawable.ic_baseline_wifi_3))
3 -> (ContextCompat.getDrawable(context, R.drawable.ic_baseline_wifi_4))
1 -> (ContextCompat.getDrawable(context, R.drawable.ic_signal_terrible))
2 -> (ContextCompat.getDrawable(context, R.drawable.ic_signal_weak))
3 -> (ContextCompat.getDrawable(context, R.drawable.ic_signal_medium))
4, 5 -> {
(ContextCompat.getDrawable(context, R.drawable.ic_baseline_wifi_5))
(ContextCompat.getDrawable(context, R.drawable.ic_signal_strong))
}
else -> {
null
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/live/hms/app2/ui/home/HomeActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class HomeActivity : AppCompatActivity() {
private var _binding: ActivityHomeBinding? = null
private val binding: ActivityHomeBinding
get() = _binding!!
var meetingUrl : String = ""

private fun finishIfOngoingActiveTaskPresent() {
if (!isTaskRoot
Expand Down
Loading

0 comments on commit 236a34e

Please sign in to comment.