Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Updates to new Zoom SDK #68

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4586a54
Error fix:
Jan 13, 2021
9686c60
upgrade zoom ios sdk to 5.2.42037.1112
Feb 25, 2021
935d79e
bug fixed
Mar 5, 2021
1eaa17c
use jwttoken for SDK App Authentication
Mar 13, 2021
a60408c
disable bitencode & bug fixed
driftboat Mar 13, 2021
f9d1c7b
appKey&appSecret Deprecated
driftboat Mar 13, 2021
53aa08d
Diable BITCODE
driftboat Mar 13, 2021
af233f6
Create SDK App JWT Token
driftboat Mar 13, 2021
4a58d47
Replace the App SDK jwtToken
driftboat Mar 13, 2021
4b517a6
ios sdk version
driftboat Mar 13, 2021
c91b64f
rm appkey&secret from initZoom
driftboat Mar 13, 2021
ee5685c
sdk zip
driftboat Mar 14, 2021
009a344
add archive
driftboat Mar 20, 2021
149b006
versio
driftboat Mar 20, 2021
dcaabb2
Update README.md
driftboat Mar 20, 2021
ac440df
add MEETING_STATUS_ENDED
driftboat Mar 27, 2021
398c22c
Merge branch 'master' of github.com:driftboat/flutter_zoom_plugin
driftboat Mar 27, 2021
bfb901e
add ios status event
driftboat Mar 27, 2021
f55bb1a
README
driftboat Mar 27, 2021
076e87a
upgrade zoom android library to v5.2.42043.1112
driftboat Apr 2, 2021
d9c29fe
remove appkey&secret ,bug fixed
driftboat Apr 2, 2021
a749c2e
start meeting is meeting end
driftboat Apr 5, 2021
7e59f23
Merge branch 'master' of github.com:driftboat/flutter_zoom_plugin
driftboat Apr 5, 2021
d75f846
bug fixed
driftboat Apr 5, 2021
61e693f
update readme
driftboat Apr 5, 2021
469f90f
upgrade version
driftboat Apr 5, 2021
1793e5e
Fix file not found issue.
Gaurav192 Mar 29, 2021
596aef0
diable shrinkResources
driftboat Apr 24, 2021
085bd2d
Merge pull request #1 from Gaurav192/ios_build_fix
driftboat May 21, 2021
33d87ae
Update README.md
driftboat Sep 6, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
68 changes: 53 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
This project is not maintained anymore! Please go to https://github.com/driftboat/flutter_zoom

# Flutter Zoom Plugin

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
Expand All @@ -17,9 +19,9 @@ Feedback and Pull Requests are always welcome.

## Zoom SDK Versions

Android: https://github.com/zoom/zoom-sdk-android/releases/tag/v4.6.21666.0429
Android: https://github.com/zoom/zoom-sdk-android/releases/tag/v5.2.42043.1112

iOS: https://github.com/zoom/zoom-sdk-ios/releases/tag/v4.6.21666.0428
iOS: https://github.com/zoom/zoom-sdk-ios/releases/tag/v5.2.42037.1112

## Installation

Expand All @@ -31,7 +33,7 @@ Use the git tags for deployments as milestones as the master branch is considere
flutter_zoom_plugin:
git:
url: git://github.com/decodedhealth/flutter_zoom_plugin.git
ref: 0.0.8
ref: 0.0.9
```

Please use `master` for Apple app store build deployments.
Expand All @@ -43,7 +45,6 @@ Please use `master` for Apple app store build deployments.
ref: master
```


### iOS

Add two rows to the `ios/Runner/Info.plist`:
Expand All @@ -60,6 +61,20 @@ Or in text format add the key:
<string>Need to use the microphone for call</string>
```


Diable BITCODE in the `ios/Podfile`:

```
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
```

**NOTE for testing on the iOS simulator**

If you want to use the iOS Simulator to test your app, you will need to ensure you have the iOS Dev Zoom SDK as a dependency.
Expand Down Expand Up @@ -96,15 +111,6 @@ There are 2 ways to obtains the Zoom meeting status

The plugin emits the following Zoom meeting events:

For iOS:
- `MEETING_STATUS_IDLE`
- `MEETING_STATUS_CONNECTING`
- `MEETING_STATUS_INMEETING`
- `MEETING_STATUS_WEBINAR_PROMOTE`
- `MEETING_STATUS_WEBINAR_DEPROMOTE`
- `MEETING_STATUS_UNKNOWN`

For Android:
- `MEETING_STATUS_IDLE`
- `MEETING_STATUS_CONNECTING`
- `MEETING_STATUS_INMEETING`
Expand All @@ -116,9 +122,40 @@ For Android:
- `MEETING_STATUS_IN_WAITING_ROOM`
- `MEETING_STATUS_RECONNECTING`
- `MEETING_STATUS_WAITINGFORHOST`
- `MEETING_STATUS_ENDED`


### Join Meeting


- Create SDK App JWT Token
- https://marketplace.zoom.us/docs/sdk/native-sdks/android/mastering-zoom-sdk/sdk-initialization => Composing JWT for SDK Initialization
- Generate JWT Token from https://jwt.io/ for testing.

Get from your server for distribution.

You can get current timestamp from https://www.unixtimestamp.com/.

Enter your "SDK App Secret" in "your-256-bit-secret",Get token from the left.

```
{
"appKey": "string", // Your SDK key
"iat": long, // access token issue timestamp
"exp": long, // access token expire timestamp, iat + a time less than 48 hours
"tokenExp": long // token expire time, MIN:1800 seconds
}
```
Example:
```
{
"appKey": "xxxxxxxxxxxxxxxxxxxx",
"iat": 1615510799,
"exp": 1647017999,
"tokenExp": 1647017999
}
```

```dart
class MeetingWidget extends StatelessWidget {

Expand All @@ -131,8 +168,9 @@ class MeetingWidget extends StatelessWidget {
// Setting up the Zoom credentials
this.zoomOptions = new ZoomOptions(
domain: "zoom.us",
appKey: "appKey", // Replace with with key got from the Zoom Marketplace
appSecret: "appSecret", // Replace with with secret got from the Zoom Marketplace
appKey: "appKey",//@Deprecated
appSecret: "appSecret",//@Deprecated
jwtToken: "jwtToken",// Replace the jwtToken
);

// Setting Zoom meeting options (default to false if not set)
Expand Down
15 changes: 11 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ rootProject.allprojects {
repositories {
google()
jcenter()
flatDir {
dirs project(':flutter_zoom_plugin').file('libs')
}
}
}

Expand All @@ -37,9 +40,13 @@ android {


dependencies {
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.multidex:multidex:2.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation fileTree(include: '*.aar', dir: 'libs/commonlib/')
implementation fileTree(include: '*.aar', dir: 'libs/mobilertc/')
implementation 'com.google.android.material:material:1.2.0-alpha02'
implementation 'com.google.android:flexbox:2.0.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
api(name: 'commonlib', ext: 'aar')
api(name: 'mobilertc', ext: 'aar')
}
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
Binary file added android/libs/commonlib.aar
Binary file not shown.
Binary file removed android/libs/commonlib/commonlib.aar
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ private void init(final MethodCall methodCall, final MethodChannel.Result result
}

ZoomSDKInitParams initParams = new ZoomSDKInitParams();
initParams.jwtToken = options.get("sdkToken");
initParams.appKey = options.get("appKey");
initParams.appSecret = options.get("appSecret");
initParams.jwtToken = options.get("jwtToken");
initParams.domain = options.get("domain");
zoomSDK.initialize(
context,
Expand Down Expand Up @@ -175,7 +173,6 @@ private void startMeeting(MethodCall methodCall, MethodChannel.Result result) {
params.displayName = options.get("displayName");
params.meetingNo = options.get("meetingId");
params.userType = MeetingService.USER_TYPE_API_USER;
params.zoomToken = options.get("zoomToken");
params.zoomAccessToken = options.get("zoomAccessToken");

meetingService.startMeetingWithParams(context, params, opts);
Expand Down
1 change: 0 additions & 1 deletion bin/unzip_zoom_sdk.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:core';
import 'dart:io';
import 'package:archive/archive.dart';
import 'package:args/args.dart';

void main(List<String> args) {

Expand Down
6 changes: 4 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ android {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
shrinkResources false
minifyEnabled false
}
}
}
Expand All @@ -63,6 +65,6 @@ dependencies {
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'

compileOnly fileTree(include: '*.aar', dir: '../../../android/libs/commonlib/')
compileOnly fileTree(include: '*.aar', dir: '../../../android/libs/mobilertc/')
implementation fileTree(include: '*.aar', dir: '../../../android/libs/commonlib/')
implementation fileTree(include: '*.aar', dir: '../../../android/libs/mobilertc/')
}
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
66 changes: 18 additions & 48 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,65 +10,35 @@ project 'Runner', {
'Release' => :release,
}

def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
pods_ary = []
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) { |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_ary.push({:name => podname, :path => podpath});
else
puts "Invalid plugin specification: #{line}"
end
}
return pods_ary

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

target 'Runner' do
use_frameworks!
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
flutter_ios_podfile_setup

# Flutter Pods
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first."
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
end
}
target 'Runner' do
use_frameworks!
use_modular_headers!

# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
end
10 changes: 5 additions & 5 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ PODS:
- Flutter

DEPENDENCIES:
- Flutter (from `.symlinks/flutter/ios`)
- Flutter (from `Flutter`)
- flutter_zoom_plugin (from `.symlinks/plugins/flutter_zoom_plugin/ios`)

EXTERNAL SOURCES:
Flutter:
:path: ".symlinks/flutter/ios"
:path: Flutter
flutter_zoom_plugin:
:path: ".symlinks/plugins/flutter_zoom_plugin/ios"

SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
flutter_zoom_plugin: 13810562aa7c9848ef91eab14d197b0c98f9e86d

PODFILE CHECKSUM: b6a0a141693093b304368d08511b46cf3d1d0ac5
PODFILE CHECKSUM: 1ddc09e14d6a00d93930d57fa50075edc3a9d4c1

COCOAPODS: 1.8.4
COCOAPODS: 1.10.0
Loading