Skip to content

Commit

Permalink
Bloc app update (#1779)
Browse files Browse the repository at this point in the history
* updated bloc app

* Updated audio room app

* Updated HLS QuickStart

* Updated quickstart app

* Updated audioroom quickstart

* Updated hls quickstart

* Updated flutter meet application

* Updated quickstart app

* Updated getx and callkit app

* Updated apps

* 🤖 Automated Format and Fix

---------

Co-authored-by: Decoder07 <[email protected]>
  • Loading branch information
Decoder07 and Decoder07 authored Jun 3, 2024
1 parent 051812a commit 14170ae
Show file tree
Hide file tree
Showing 83 changed files with 1,253 additions and 678 deletions.
7 changes: 4 additions & 3 deletions sample apps/bloc/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 32

compileSdkVersion 34
namespace 'com.example.demo_app_with_100ms_and_bloc'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand All @@ -45,7 +45,8 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.demo_app_with_100ms_and_bloc"
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
targetSdkVersion 34
multiDexEnabled true
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
7 changes: 7 additions & 0 deletions sample apps/bloc/lib/observers/room_observer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,11 @@ class RoomObserver implements HMSUpdateListener, HMSActionResultListener {
void onSessionStoreAvailable({HMSSessionStore? hmsSessionStore}) {
// TODO: implement onSessionStoreAvailable
}

@override
void onPeerListUpdate(
{required List<HMSPeer> addedPeers,
required List<HMSPeer> removedPeers}) {
// TODO: implement onPeerListUpdate
}
}
30 changes: 15 additions & 15 deletions sample apps/bloc/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
url: "https://pub.dev"
source: hosted
version: "1.18.0"
version: "1.17.2"
cupertino_icons:
dependency: "direct main"
description:
Expand Down Expand Up @@ -111,10 +111,10 @@ packages:
dependency: "direct main"
description:
name: hmssdk_flutter
sha256: "58c9c104b928ca62af8cd6b8a826ffef27e727a412d854b98e7f1fb151832d5e"
sha256: bfa6e6ec411d6f86f6cc054936fb2163c4cd3f8703f8848099689652b3794376
url: "https://pub.dev"
source: hosted
version: "1.7.2"
version: "1.10.1"
http:
dependency: "direct main"
description:
Expand Down Expand Up @@ -159,10 +159,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
url: "https://pub.dev"
source: hosted
version: "1.10.0"
version: "1.9.1"
nested:
dependency: transitive
description:
Expand Down Expand Up @@ -260,18 +260,18 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
url: "https://pub.dev"
source: hosted
version: "1.11.1"
version: "1.11.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
version: "2.1.1"
string_scanner:
dependency: transitive
description:
Expand All @@ -292,10 +292,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
url: "https://pub.dev"
source: hosted
version: "0.6.1"
version: "0.6.0"
typed_data:
dependency: transitive
description:
Expand Down Expand Up @@ -324,10 +324,10 @@ packages:
dependency: transitive
description:
name: web
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
url: "https://pub.dev"
source: hosted
version: "0.3.0"
version: "0.1.4-beta"
sdks:
dart: ">=3.2.0-194.0.dev <4.0.0"
dart: ">=3.1.0-185.0.dev <4.0.0"
flutter: ">=2.10.0"
2 changes: 1 addition & 1 deletion sample apps/bloc/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies:
focus_detector:
http:
rxdart: ^0.27.2
hmssdk_flutter: 1.7.2
hmssdk_flutter: 1.10.1

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
Expand Down
2 changes: 1 addition & 1 deletion sample apps/flutter-audio-room-quickstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Create an `audio room` template from [100ms dashboard](https://dashboard.100ms.l
Just plugin following values and run the application :

- userName : Enter the username with which you wish to join
- authToken : Auth token of the role with which you wish to join the room
- roomCode : Room Code of the role with which you wish to join the room

That's it. Press the `Join Audio Room` button and start conversing 🥳🥳🥳

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 33
compileSdkVersion 34

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -47,7 +47,7 @@ android {
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 34
versionCode 1
versionName "1.0.0"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.flutter_audio_room_quickstart">


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

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

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

<application
android:label="flutter_audio_room_quickstart"
android:name="${applicationName}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,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
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
2 changes: 1 addition & 1 deletion sample apps/flutter-audio-room-quickstart/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048

COCOAPODS: 1.12.0
COCOAPODS: 1.14.3
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -204,6 +204,7 @@
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
45 changes: 36 additions & 9 deletions sample apps/flutter-audio-room-quickstart/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ class MyHomePage extends StatefulWidget {
class _MyHomePageState extends State<MyHomePage> {
bool res = false;

void navigate() {
Navigator.push(
context, CupertinoPageRoute(builder: (_) => const MeetingPage()));
}

static Future<bool> getPermissions() async {
if (Platform.isIOS) return true;

Expand All @@ -59,21 +64,20 @@ class _MyHomePageState extends State<MyHomePage> {
child: Center(
child: ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(Colors.blue),
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0),
))),
borderRadius: BorderRadius.circular(8.0),
))),
onPressed: () async => {
res = await getPermissions(),
if (res)
Navigator.push(context,
CupertinoPageRoute(builder: (_) => const MeetingPage()))
if (res) {navigate()}
},
child: const Padding(
padding: EdgeInsets.symmetric(vertical: 20, horizontal: 15),
child: Text(
'Join Audio Room',
style: TextStyle(fontSize: 20),
style: TextStyle(fontSize: 20, color: Colors.white),
),
),
),
Expand All @@ -95,8 +99,11 @@ class _MeetingPageState extends State<MeetingPage>
late HMSSDK _hmsSDK;

//Enter the username and authToken from dashboard for the corresponding role here.
String userName = "Enter Username Here";
String authToken = "Enter AuthToken Here";
String userName = "Enter username here";

///For speaker role roomCode: "yim-wofo-ytk"
///For listener role roomCode: "iai-nkis-oob"
String roomCode = "yim-wofo-ytk";
Offset position = const Offset(5, 5);
bool isJoinSuccessful = false;
final List<PeerTrackNode> _listeners = [];
Expand All @@ -115,7 +122,12 @@ class _MeetingPageState extends State<MeetingPage>
_hmsSDK = HMSSDK();
await _hmsSDK.build();
_hmsSDK.addUpdateListener(listener: this);
_hmsSDK.join(config: HMSConfig(authToken: authToken, userName: userName));
var authToken = await _hmsSDK.getAuthTokenByRoomCode(roomCode: roomCode);
if ((authToken is String?) && authToken != null) {
_hmsSDK.join(config: HMSConfig(authToken: authToken, userName: userName));
} else {
log("Error in getting auth token");
}
}

@override
Expand Down Expand Up @@ -271,6 +283,9 @@ class _MeetingPageState extends State<MeetingPage>
case HMSPeerUpdate.networkQualityUpdated:
// TODO: Handle this case.
break;
case HMSPeerUpdate.handRaiseUpdated:
// TODO: Handle this case.
break;
}
}

Expand Down Expand Up @@ -399,6 +414,18 @@ class _MeetingPageState extends State<MeetingPage>
// Checkout the docs for room updates here: https://www.100ms.live/docs/flutter/v2/how--to-guides/listen-to-room-updates/update-listeners
}

@override
void onPeerListUpdate(
{required List<HMSPeer> addedPeers,
required List<HMSPeer> removedPeers}) {
// TODO: implement onPeerListUpdate
}

@override
void onSessionStoreAvailable({HMSSessionStore? hmsSessionStore}) {
// TODO: implement onSessionStoreAvailable
}

@override
void onUpdateSpeakers({required List<HMSSpeaker> updateSpeakers}) {
// Checkout the docs for handling the updates regarding who is currently speaking here: https://www.100ms.live/docs/flutter/v2/how--to-guides/set-up-video-conferencing/render-video/show-audio-level
Expand Down
Loading

0 comments on commit 14170ae

Please sign in to comment.