Skip to content

Commit

Permalink
Updated apps
Browse files Browse the repository at this point in the history
  • Loading branch information
Decoder07 committed Jun 1, 2024
1 parent 3e7640f commit ce29439
Show file tree
Hide file tree
Showing 31 changed files with 735 additions and 432 deletions.
2 changes: 0 additions & 2 deletions sample apps/getx/lib/controllers/PreviewController.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import 'package:get/get.dart';
import 'package:hmssdk_flutter/hmssdk_flutter.dart';

import '../services/RoomService.dart';

class PreviewController extends GetxController
implements HMSPreviewListener, HMSActionResultListener {
RxBool isLocalVideoOn = true.obs;
Expand Down
176 changes: 174 additions & 2 deletions sample apps/getx/lib/controllers/RoomController.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import 'package:demo_with_getx_and_100ms/views/HomePage.dart';
import 'package:get/get.dart';
import 'package:hmssdk_flutter/hmssdk_flutter.dart';

import '../services/RoomService.dart';

class RoomController extends GetxController
implements HMSUpdateListener, HMSActionResultListener {
RxList<Rx<PeerTrackNode>> peerTrackList = <Rx<PeerTrackNode>>[].obs;
Expand Down Expand Up @@ -148,6 +146,93 @@ class RoomController extends GetxController
case HMSActionResultListenerMethod.stopScreenShare:
Get.snackbar("stopScreenShare Error", hmsException.message ?? "");

break;
case HMSActionResultListenerMethod.changeTrackState:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.changeMetadata:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.endRoom:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.removePeer:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.acceptChangeRole:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.changeRoleOfPeer:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.changeTrackStateForRole:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.startRtmpOrRecording:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.stopRtmpAndRecording:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.changeName:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.sendBroadcastMessage:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.sendGroupMessage:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.sendDirectMessage:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.hlsStreamingStarted:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.hlsStreamingStopped:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.startAudioShare:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.stopAudioShare:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.switchCamera:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.changeRoleOfPeersWithRoles:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.setSessionMetadataForKey:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.sendHLSTimedMetadata:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.lowerLocalPeerHand:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.lowerRemotePeerHand:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.raiseLocalPeerHand:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.quickStartPoll:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.addSingleChoicePollResponse:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.addMultiChoicePollResponse:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.unknown:
// TODO: Handle this case.
break;
case null:
// TODO: Handle this case.
break;
}
Get.snackbar("Error", hmsException.message ?? "");
Expand All @@ -170,6 +255,93 @@ class RoomController extends GetxController
case HMSActionResultListenerMethod.stopScreenShare:
isScreenShareActive.toggle();
break;
case HMSActionResultListenerMethod.changeTrackState:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.changeMetadata:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.endRoom:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.removePeer:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.acceptChangeRole:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.changeRoleOfPeer:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.changeTrackStateForRole:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.startRtmpOrRecording:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.stopRtmpAndRecording:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.changeName:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.sendBroadcastMessage:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.sendGroupMessage:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.sendDirectMessage:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.hlsStreamingStarted:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.hlsStreamingStopped:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.startAudioShare:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.stopAudioShare:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.switchCamera:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.changeRoleOfPeersWithRoles:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.setSessionMetadataForKey:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.sendHLSTimedMetadata:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.lowerLocalPeerHand:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.lowerRemotePeerHand:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.raiseLocalPeerHand:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.quickStartPoll:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.addSingleChoicePollResponse:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.addMultiChoicePollResponse:
// TODO: Handle this case.
break;
case HMSActionResultListenerMethod.unknown:
// TODO: Handle this case.
break;
case null:
// TODO: Handle this case.
break;
}
}

Expand Down
7 changes: 0 additions & 7 deletions sample apps/getx/lib/services/Constants.dart

This file was deleted.

58 changes: 0 additions & 58 deletions sample apps/getx/lib/services/RoomService.dart

This file was deleted.

5 changes: 3 additions & 2 deletions sample apps/mobx/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 33
namespace "com.example.mobx"
compileSdkVersion 34

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -45,7 +46,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.mobx"
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
3 changes: 1 addition & 2 deletions sample apps/mobx/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.mobx">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
36 changes: 32 additions & 4 deletions sample apps/mobx/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,38 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.mobx">
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />

<uses-feature android:name="android.hardware.camera"/>

<uses-feature android:name="android.hardware.camera.autofocus"/>

<uses-permission android:name="android.permission.CAMERA"/>

<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.INTERNET"/>

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

<application
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />

<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />

<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!--Required for android 14 and above -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />

<!-- This is required if the application uses foreground service for android 14 and above-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />


<application
android:label="mobx"
android:icon="@mipmap/ic_launcher">
<activity
Expand All @@ -14,6 +41,7 @@
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:exported="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ class MainActivity : FlutterActivity() {
) {
super.onActivityResult(requestCode, resultCode, data)

if (requestCode == Constants.SCREEN_SHARE_INTENT_REQUEST_CODE && resultCode == Activity.RESULT_OK) {
HmssdkFlutterPlugin.hmssdkFlutterPlugin?.requestScreenShare(data)
}
data?.action = Constants.HMSSDK_RECEIVER
activity.sendBroadcast(data?.putExtra(Constants.METHOD_CALL, Constants.SCREEN_SHARE_REQUEST))
}
}
6 changes: 3 additions & 3 deletions sample apps/mobx/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.7.20'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.1.3'
classpath 'com.android.tools.build:gradle:8.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -24,6 +24,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Jun 23 08:50:38 CEST 2017
#Fri May 31 17:29:32 IST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
Loading

0 comments on commit ce29439

Please sign in to comment.