-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into FLUT-262
- Loading branch information
Showing
84 changed files
with
3,000 additions
and
30 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
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
1 change: 1 addition & 0 deletions
1
packages/hmssdk_flutter/example/ios/Runner/Runner-Bridging-Header.h
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
#import "GeneratedPluginRegistrant.h" | ||
#import <flutter_foreground_task/FlutterForegroundTaskPlugin.h> |
82 changes: 82 additions & 0 deletions
82
packages/hmssdk_flutter/example/lib/foreground_task_handler.dart
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,82 @@ | ||
import 'dart:isolate'; | ||
|
||
import 'package:flutter_foreground_task/flutter_foreground_task.dart'; | ||
import 'package:hmssdk_flutter_example/main.dart'; | ||
|
||
///[ForegroundTaskHandler] is a class that extends [TaskHandler] | ||
///This class is used to handle the foreground task | ||
class ForegroundTaskHandler extends TaskHandler { | ||
SendPort? _sendPort; | ||
|
||
// Called when the task is started. | ||
@override | ||
void onStart(DateTime timestamp, SendPort? sendPort) async { | ||
_sendPort = sendPort; | ||
|
||
// You can use the getData function to get the stored data. | ||
final customData = | ||
await FlutterForegroundTask.getData<String>(key: 'customData'); | ||
print('customData: $customData'); | ||
} | ||
|
||
// Called every [interval] milliseconds in [ForegroundTaskOptions]. | ||
@override | ||
void onRepeatEvent(DateTime timestamp, SendPort? sendPort) async { | ||
// Send data to the main isolate. | ||
sendPort?.send(timestamp); | ||
} | ||
|
||
// Called when the notification button on the Android platform is pressed. | ||
@override | ||
void onDestroy(DateTime timestamp, SendPort? sendPort) async {} | ||
|
||
// Called when the notification button on the Android platform is pressed. | ||
@override | ||
void onNotificationButtonPressed(String id) { | ||
print('onNotificationButtonPressed >> $id'); | ||
} | ||
|
||
// Called when the notification itself on the Android platform is pressed. | ||
// | ||
// "android.permission.SYSTEM_ALERT_WINDOW" permission must be granted for | ||
// this function to be called. | ||
@override | ||
void onNotificationPressed() { | ||
// Note that the app will only route to "/resume-route" when it is exited so | ||
// it will usually be necessary to send a message through the send port to | ||
// signal it to restore state when the app is already started. | ||
FlutterForegroundTask.launchApp("/resume-route"); | ||
_sendPort?.send('onNotificationPressed'); | ||
} | ||
} | ||
|
||
void initForegroundTask() { | ||
FlutterForegroundTask.init( | ||
androidNotificationOptions: AndroidNotificationOptions( | ||
channelId: '100ms_flutter_notification', | ||
channelName: '100ms Flutter Notification', | ||
channelDescription: | ||
'This notification appears when the foreground service is running.', | ||
channelImportance: NotificationChannelImportance.LOW, | ||
priority: NotificationPriority.LOW, | ||
iconData: NotificationIconData( | ||
resType: ResourceType.mipmap, | ||
resPrefix: ResourcePrefix.ic, | ||
name: "launcher")), | ||
iosNotificationOptions: | ||
const IOSNotificationOptions(showNotification: false), | ||
foregroundTaskOptions: const ForegroundTaskOptions(), | ||
); | ||
|
||
///[startService] starts the foreground task | ||
FlutterForegroundTask.startService( | ||
notificationTitle: 'Foreground Service is running', | ||
notificationText: 'Tap to return to the app', | ||
callback: startCallback); | ||
} | ||
|
||
///[stopForegroundTask] stops the foreground task | ||
///Called in onLeave callback | ||
void stopForegroundTask() { | ||
FlutterForegroundTask.stopService(); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This is a generated file; do not edit or check into version control. | ||
hmssdk_flutter=/Users/decode/.pub-cache/hosted/pub.dev/hmssdk_flutter-1.9.14/ | ||
permission_handler=/Users/decode/.pub-cache/hosted/pub.dev/permission_handler-11.0.0/ | ||
permission_handler_android=/Users/decode/.pub-cache/hosted/pub.dev/permission_handler_android-11.0.1/ | ||
permission_handler_apple=/Users/decode/.pub-cache/hosted/pub.dev/permission_handler_apple-9.1.4/ | ||
permission_handler_windows=/Users/decode/.pub-cache/hosted/pub.dev/permission_handler_windows-0.1.3/ |
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 @@ | ||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"hmssdk_flutter","path":"/Users/decode/.pub-cache/hosted/pub.dev/hmssdk_flutter-1.9.14/","native_build":true,"dependencies":[]},{"name":"permission_handler_apple","path":"/Users/decode/.pub-cache/hosted/pub.dev/permission_handler_apple-9.1.4/","native_build":true,"dependencies":[]}],"android":[{"name":"hmssdk_flutter","path":"/Users/decode/.pub-cache/hosted/pub.dev/hmssdk_flutter-1.9.14/","native_build":true,"dependencies":[]},{"name":"permission_handler_android","path":"/Users/decode/.pub-cache/hosted/pub.dev/permission_handler_android-11.0.1/","native_build":true,"dependencies":[]}],"macos":[],"linux":[],"windows":[{"name":"permission_handler_windows","path":"/Users/decode/.pub-cache/hosted/pub.dev/permission_handler_windows-0.1.3/","native_build":true,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"hmssdk_flutter","dependencies":[]},{"name":"permission_handler","dependencies":["permission_handler_android","permission_handler_apple","permission_handler_windows"]},{"name":"permission_handler_android","dependencies":[]},{"name":"permission_handler_apple","dependencies":[]},{"name":"permission_handler_windows","dependencies":[]}],"date_created":"2024-04-02 12:09:59.548114","version":"3.13.5"} |
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,28 @@ | ||
# Flutter x Meet - Google Meet clone made in Flutter | ||
|
||
Google Meet clone made in Flutter using 100ms. | ||
|
||
## User Interface | ||
|
||
<table> | ||
<tr> | ||
<td> | ||
<img src="https://user-images.githubusercontent.com/53579386/152325280-d150b1a8-50fc-4369-846d-2c18a8446537.jpeg" alt=""> | ||
</td> | ||
<td> | ||
<img src="https://user-images.githubusercontent.com/53579386/152325366-f8b97a56-3982-4b67-b38b-d00a2fb7a995.jpeg" alt=""> | ||
</td> | ||
<td> | ||
<img src="https://user-images.githubusercontent.com/53579386/152325466-dd88f96a-c2c8-4d6e-9442-b7037878040a.jpeg" alt=""> | ||
</td> | ||
<td> | ||
<img src="https://user-images.githubusercontent.com/53579386/152325545-e35c125b-556e-458e-8730-c6bf1df7d953.jpeg" alt=""> | ||
</td> | ||
</tr> | ||
</table> | ||
<br> | ||
|
||
## Demo | ||
|
||
https://user-images.githubusercontent.com/53579386/153129731-a5123b2a-c782-4c06-8d49-a6a431d8fa6d.mp4 | ||
|
Oops, something went wrong.