├── android ├── README ├── app │ ├── .gitignore │ ├── gradle.keystore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── raw │ │ │ │ │ ├── call.mp3 │ │ │ │ │ └── start.mp3 │ │ │ │ ├── drawable │ │ │ │ │ ├── call_ans.png │ │ │ │ │ ├── call_answer.png │ │ │ │ │ ├── call_hangup.png │ │ │ │ │ ├── call_answer_p.png │ │ │ │ │ ├── call_hangup_p.png │ │ │ │ │ ├── switch_camera.png │ │ │ │ │ ├── btn_login_selector.xml │ │ │ │ │ ├── call_answer_x.xml │ │ │ │ │ └── call_hangup_x.xml │ │ │ │ ├── drawable-hdpi │ │ │ │ │ ├── call_in.png │ │ │ │ │ ├── call_out.png │ │ │ │ │ ├── ic_share.png │ │ │ │ │ ├── ic_account.png │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ ├── avatar_contact.png │ │ │ │ │ ├── bg_background.png │ │ │ │ │ ├── btn_login_normal.png │ │ │ │ │ ├── btn_login_pressed.png │ │ │ │ │ └── callin_not_answer.png │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ ├── ic_account.png │ │ │ │ │ ├── bg_background.png │ │ │ │ │ └── ic_activity_back.png │ │ │ │ ├── values-large │ │ │ │ │ └── dimens.xml │ │ │ │ ├── values │ │ │ │ │ ├── colors.xml │ │ │ │ │ ├── dimens.xml │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── values-w820dp │ │ │ │ │ └── dimens.xml │ │ │ │ └── layout │ │ │ │ │ └── activity_login.xml │ │ │ ├── assets │ │ │ │ └── fonts │ │ │ │ │ ├── Entypo.ttf │ │ │ │ │ ├── Zocial.ttf │ │ │ │ │ ├── jitsi.ttf │ │ │ │ │ ├── EvilIcons.ttf │ │ │ │ │ ├── Ionicons.ttf │ │ │ │ │ ├── Octicons.ttf │ │ │ │ │ ├── FontAwesome.ttf │ │ │ │ │ ├── Foundation.ttf │ │ │ │ │ ├── MaterialIcons.ttf │ │ │ │ │ ├── SimpleLineIcons.ttf │ │ │ │ │ └── MaterialCommunityIcons.ttf │ │ │ ├── jniLibs │ │ │ │ ├── x86 │ │ │ │ │ └── libasync_tcp.so │ │ │ │ └── armeabi-v7a │ │ │ │ │ └── libasync_tcp.so │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── beetle │ │ │ │ └── conference │ │ │ │ ├── LoginActivity.java │ │ │ │ └── GroupVOIPActivity.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── beetle │ │ │ └── conference │ │ │ └── ApplicationTest.java │ └── build.gradle ├── asynctcp │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ └── strings.xml │ │ │ │ ├── drawable-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ └── drawable-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── beetle │ │ │ │ ├── TCPReadCallback.java │ │ │ │ ├── TCPConnectCallback.java │ │ │ │ ├── AsyncTCP.java │ │ │ │ └── AsyncTCPTest.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── beetle │ │ │ └── asynctcp │ │ │ └── ApplicationTest.java │ └── build.gradle ├── imsdk │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── values │ │ │ │ │ └── strings.xml │ │ │ │ ├── drawable-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ └── drawable-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── beetle │ │ │ │ └── im │ │ │ │ ├── RTMessageObserver.java │ │ │ │ ├── VOIPObserver.java │ │ │ │ ├── RoomMessageObserver.java │ │ │ │ ├── SystemMessageObserver.java │ │ │ │ ├── IMServiceObserver.java │ │ │ │ ├── RTMessage.java │ │ │ │ ├── VOIPControl.java │ │ │ │ ├── LoginPointObserver.java │ │ │ │ ├── RoomMessage.java │ │ │ │ ├── SyncKeyHandler.java │ │ │ │ ├── PeerMessageHandler.java │ │ │ │ ├── CustomerMessage.java │ │ │ │ ├── PeerMessageObserver.java │ │ │ │ ├── GroupMessageObserver.java │ │ │ │ ├── IMMessage.java │ │ │ │ ├── LoginPoint.java │ │ │ │ ├── GroupMessageHandler.java │ │ │ │ ├── CustomerMessageHandler.java │ │ │ │ ├── CustomerMessageObserver.java │ │ │ │ ├── Timer.java │ │ │ │ └── BytePacket.java │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── beetle │ │ │ └── im │ │ │ └── ApplicationTest.java │ └── build.gradle ├── .gitignore ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gen_key.sh ├── settings.gradle ├── build.gradle ├── gradle.properties ├── gradlew.bat └── gradlew ├── index.ios.js ├── index.android.js ├── ios ├── conference │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── zh-Hans.lproj │ │ └── InfoPlist.strings │ ├── jitsi.ttf │ ├── sound │ │ ├── apns.caf │ │ ├── call.mp3 │ │ ├── end.mp3 │ │ └── start.mp3 │ ├── Images.xcassets │ │ ├── Contents.json │ │ ├── bg.imageset │ │ │ ├── bg.png │ │ │ ├── bg@2x.png │ │ │ ├── bg@3x.png │ │ │ └── Contents.json │ │ ├── switch.imageset │ │ │ ├── switch.png │ │ │ ├── switch@2x.png │ │ │ └── Contents.json │ │ ├── Call_Ans.imageset │ │ │ ├── Call_answer.png │ │ │ └── Contents.json │ │ ├── accept_nor.imageset │ │ │ ├── accept_nor.png │ │ │ └── Contents.json │ │ ├── accept_pre.imageset │ │ │ ├── accept_pre.png │ │ │ └── Contents.json │ │ ├── refuse_nor.imageset │ │ │ ├── refuse_nor.png │ │ │ └── Contents.json │ │ ├── refuse_pre.imageset │ │ │ ├── refuse_pre.png │ │ │ └── Contents.json │ │ ├── Call_hangup.imageset │ │ │ ├── Call_hangup.png │ │ │ └── Contents.json │ │ ├── Call_Ans_p.imageset │ │ │ ├── Call_answer_p.png │ │ │ └── Contents.json │ │ ├── Call_hangup_p.imageset │ │ │ ├── Call_hangup_p.png │ │ │ └── Contents.json │ │ ├── Call_background2.imageset │ │ │ ├── Call_background2.png │ │ │ ├── Call_background2@2x.png │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── AppDelegate.h │ ├── main.m │ ├── conference-Prefix.pch │ ├── controller │ │ ├── GroupVOIPViewController.h │ │ └── GroupVOIOPViewController.m │ ├── ViewController.h │ ├── AppDelegate.m │ ├── conference-Info.plist │ └── ViewController.m ├── conferenceTests │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── zh-Hans.lproj │ │ └── InfoPlist.strings │ ├── conferenceTests.m │ └── conferenceTests-Info.plist ├── Podfile ├── Podfile.lock └── imsdk │ ├── imsdkTests │ └── Info.plist │ └── imsdk │ ├── AsyncTCP.h │ ├── util.h │ ├── TCPConnection.h │ ├── GOReachability.h │ ├── Message.h │ ├── util.c │ ├── IMService.h │ ├── AsyncTCP.m │ ├── Message.m │ ├── TCPConnection.m │ └── GOReachability.m ├── react ├── index.js ├── polyfills-webrtc.js ├── participant.js ├── RTCPeerConnection.js ├── adapter.js └── .eslintrc.js ├── .gitignore └── package.json /android/README: -------------------------------------------------------------------------------- 1 | Android VOIP -------------------------------------------------------------------------------- /android/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /android/asynctcp/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /index.ios.js: -------------------------------------------------------------------------------- 1 | export * from './react/index'; 2 | -------------------------------------------------------------------------------- /index.android.js: -------------------------------------------------------------------------------- 1 | export * from './react/index'; 2 | -------------------------------------------------------------------------------- /ios/conference/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ios/conference/zh-Hans.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ios/conferenceTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ios/conference/jitsi.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/jitsi.ttf -------------------------------------------------------------------------------- /ios/conferenceTests/zh-Hans.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /android/app/gradle.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/gradle.keystore -------------------------------------------------------------------------------- /ios/conference/sound/apns.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/sound/apns.caf -------------------------------------------------------------------------------- /ios/conference/sound/call.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/sound/call.mp3 -------------------------------------------------------------------------------- /ios/conference/sound/end.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/sound/end.mp3 -------------------------------------------------------------------------------- /ios/conference/sound/start.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/sound/start.mp3 -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '8.0' 2 | target 'conference' do 3 | pod 'MBProgressHUD' 4 | pod 'Toast' 5 | end 6 | -------------------------------------------------------------------------------- /android/imsdk/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | IMSDK 3 | 4 | -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | *~ 8 | -------------------------------------------------------------------------------- /android/app/src/main/res/raw/call.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/raw/call.mp3 -------------------------------------------------------------------------------- /android/asynctcp/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | AsyncTCP 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/raw/start.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/raw/start.mp3 -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Entypo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/assets/fonts/Entypo.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Zocial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/assets/fonts/Zocial.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/jitsi.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/assets/fonts/jitsi.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/EvilIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/assets/fonts/EvilIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/assets/fonts/Ionicons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Octicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/assets/fonts/Octicons.ttf -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/call_ans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable/call_ans.png -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/FontAwesome.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/assets/fonts/FontAwesome.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Foundation.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/assets/fonts/Foundation.ttf -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/x86/libasync_tcp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/jniLibs/x86/libasync_tcp.so -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/call_in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable-hdpi/call_in.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/call_answer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable/call_answer.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/call_hangup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable/call_hangup.png -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/bg.imageset/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/Images.xcassets/bg.imageset/bg.png -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/MaterialIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/assets/fonts/MaterialIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/call_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable-hdpi/call_out.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/ic_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable-hdpi/ic_share.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/call_answer_p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable/call_answer_p.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/call_hangup_p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable/call_hangup_p.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/switch_camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable/switch_camera.png -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/bg.imageset/bg@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/Images.xcassets/bg.imageset/bg@2x.png -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/bg.imageset/bg@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/Images.xcassets/bg.imageset/bg@3x.png -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/SimpleLineIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/assets/fonts/SimpleLineIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/ic_account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable-hdpi/ic_account.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/ic_account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable-xhdpi/ic_account.png -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/armeabi-v7a/libasync_tcp.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/jniLibs/armeabi-v7a/libasync_tcp.so -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/avatar_contact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable-hdpi/avatar_contact.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/bg_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable-hdpi/bg_background.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/bg_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable-xhdpi/bg_background.png -------------------------------------------------------------------------------- /android/imsdk/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/imsdk/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/imsdk/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/imsdk/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/imsdk/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/imsdk/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/switch.imageset/switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/Images.xcassets/switch.imageset/switch.png -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/btn_login_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable-hdpi/btn_login_normal.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/btn_login_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable-hdpi/btn_login_pressed.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/callin_not_answer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable-hdpi/callin_not_answer.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/ic_activity_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/app/src/main/res/drawable-xhdpi/ic_activity_back.png -------------------------------------------------------------------------------- /android/asynctcp/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/asynctcp/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/asynctcp/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/asynctcp/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/asynctcp/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/asynctcp/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/asynctcp/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/gen_key.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | BASEDIR=$(dirname $0) 3 | keytool -genkey -v -keystore $BASEDIR/app/gradle.keystore -alias gradle -keyalg RSA -keysize 2048 -validity 10000 4 | -------------------------------------------------------------------------------- /android/imsdk/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/imsdk/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/switch.imageset/switch@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/Images.xcassets/switch.imageset/switch@2x.png -------------------------------------------------------------------------------- /android/asynctcp/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/android/asynctcp/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /react/index.js: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native'; 2 | import GroupCall from './GroupCall.js'; 3 | AppRegistry.registerComponent('GroupCall', () => GroupCall); 4 | 5 | 6 | -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/Call_Ans.imageset/Call_answer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/Images.xcassets/Call_Ans.imageset/Call_answer.png -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/accept_nor.imageset/accept_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/Images.xcassets/accept_nor.imageset/accept_nor.png -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/accept_pre.imageset/accept_pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/Images.xcassets/accept_pre.imageset/accept_pre.png -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/refuse_nor.imageset/refuse_nor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/Images.xcassets/refuse_nor.imageset/refuse_nor.png -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/refuse_pre.imageset/refuse_pre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/Images.xcassets/refuse_pre.imageset/refuse_pre.png -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/Call_hangup.imageset/Call_hangup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/Images.xcassets/Call_hangup.imageset/Call_hangup.png -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/Call_Ans_p.imageset/Call_answer_p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/Images.xcassets/Call_Ans_p.imageset/Call_answer_p.png -------------------------------------------------------------------------------- /android/asynctcp/src/main/java/com/beetle/TCPReadCallback.java: -------------------------------------------------------------------------------- 1 | package com.beetle; 2 | 3 | 4 | public interface TCPReadCallback { 5 | 6 | public void onRead(Object tcp, byte[] data); 7 | 8 | } -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/Call_hangup_p.imageset/Call_hangup_p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/Images.xcassets/Call_hangup_p.imageset/Call_hangup_p.png -------------------------------------------------------------------------------- /android/asynctcp/src/main/java/com/beetle/TCPConnectCallback.java: -------------------------------------------------------------------------------- 1 | package com.beetle; 2 | 3 | public interface TCPConnectCallback { 4 | 5 | public void onConnect(Object tcp, int status); 6 | 7 | } -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/Call_background2.imageset/Call_background2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/Images.xcassets/Call_background2.imageset/Call_background2.png -------------------------------------------------------------------------------- /android/imsdk/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/Call_background2.imageset/Call_background2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoBelieveIO/conference/HEAD/ios/conference/Images.xcassets/Call_background2.imageset/Call_background2@2x.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-large/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8dp 4 | 16dp 5 | 16dp 6 | 7 | -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/RTMessageObserver.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | /** 4 | * Created by houxh on 16/1/25. 5 | */ 6 | public interface RTMessageObserver { 7 | void onRTMessage(RTMessage rt); 8 | } 9 | -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/VOIPObserver.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | /** 4 | * Created by houxh on 14-12-31. 5 | */ 6 | public interface VOIPObserver { 7 | public void onVOIPControl(VOIPControl ctl); 8 | } 9 | -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/RoomMessageObserver.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | /** 4 | * Created by houxh on 16/5/14. 5 | */ 6 | public interface RoomMessageObserver { 7 | public void onRoomMessage(RoomMessage msg); 8 | } 9 | -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/SystemMessageObserver.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | /** 4 | * Created by houxh on 16/1/16. 5 | */ 6 | public interface SystemMessageObserver { 7 | public void onSystemMessage(String sm); 8 | } 9 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'conference' 2 | 3 | include ':app' 4 | 5 | 6 | include ':react-native-webrtc' 7 | project(':react-native-webrtc').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webrtc/android') 8 | -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/IMServiceObserver.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | /** 4 | * Created by houxh on 14-7-23. 5 | */ 6 | public interface IMServiceObserver { 7 | public void onConnectState(IMService.ConnectState state); 8 | } 9 | -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/RTMessage.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | /** 4 | * Created by houxh on 16/1/25. 5 | */ 6 | public class RTMessage { 7 | public long sender; 8 | public long receiver; 9 | public String content; 10 | } 11 | -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/VOIPControl.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | /** 4 | * Created by houxh on 14-12-31. 5 | */ 6 | public class VOIPControl { 7 | public long sender; 8 | public long receiver; 9 | public byte[] content; 10 | } -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/LoginPointObserver.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | /** 4 | * Created by houxh on 14-7-23. 5 | */ 6 | public interface LoginPointObserver { 7 | //当前用户ID在其它地方登录 8 | public void onLoginPoint(LoginPoint lp); 9 | 10 | } -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/RoomMessage.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | /** 4 | * Created by houxh on 16/5/14. 5 | */ 6 | public class RoomMessage { 7 | public long sender; 8 | public long receiver; 9 | public String content; 10 | } 11 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Aug 15 12:52:53 CST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | xcuserdata 2 | project.xcworkspace 3 | *~ 4 | Pods 5 | conference.xcworkspace 6 | node_modules 7 | /android/local.properties 8 | /android/.idea/workspace.xml 9 | /android/.idea/libraries 10 | /android/.idea 11 | android/imsdk/build/ 12 | .gradle 13 | *.iml 14 | .DS_Store 15 | yarn.lock -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/SyncKeyHandler.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | /** 4 | * Created by houxh on 2016/11/2. 5 | */ 6 | 7 | public interface SyncKeyHandler { 8 | boolean saveSyncKey(long syncKey); 9 | boolean saveGroupSyncKey(long groupID, long syncKey); 10 | } 11 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #18b000 4 | #138d00 5 | #18b000 6 | #66FFFFFF 7 | -------------------------------------------------------------------------------- /ios/conference/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Face 4 | // 5 | // Created by houxh on 14-10-13. 6 | // Copyright (c) 2014年 beetle. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | @property (strong, nonatomic) UIWindow *window; 13 | @end 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/btn_login_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/PeerMessageHandler.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | /** 4 | * Created by houxh on 14-7-23. 5 | */ 6 | public interface PeerMessageHandler { 7 | public boolean handleMessage(IMMessage msg, long uid); 8 | public boolean handleMessageACK(int msgLocalID, long uid); 9 | public boolean handleMessageFailure(int msgLocalID, long uid); 10 | } -------------------------------------------------------------------------------- /android/app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /ios/conference/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Face 4 | // 5 | // Created by houxh on 14-10-13. 6 | // Copyright (c) 2014年 beetle. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/call_answer_x.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/call_hangup_x.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/CustomerMessage.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | /** 4 | * Created by houxh on 16/1/19. 5 | */ 6 | public class CustomerMessage { 7 | //未被序列化 8 | public int msgLocalID; 9 | 10 | public long customerAppID; 11 | public long customerID; 12 | public long storeID; 13 | public long sellerID; 14 | public int timestamp; 15 | public String content; 16 | } 17 | -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/PeerMessageObserver.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | /** 4 | * Created by houxh on 14-7-23. 5 | */ 6 | public interface PeerMessageObserver { 7 | public void onPeerInputting(long uid); 8 | 9 | public void onPeerMessage(IMMessage msg); 10 | public void onPeerMessageACK(int msgLocalID, long uid); 11 | public void onPeerMessageFailure(int msgLocalID, long uid); 12 | } -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/GroupMessageObserver.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | /** 4 | * Created by houxh on 14-7-23. 5 | */ 6 | public interface GroupMessageObserver { 7 | public void onGroupMessage(IMMessage msg); 8 | public void onGroupMessageACK(int msgLocalID, long uid); 9 | public void onGroupMessageFailure(int msgLocalID, long uid); 10 | public void onGroupNotification(String notification); 11 | } -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/IMMessage.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | import android.util.Log; 4 | 5 | import java.util.ArrayList; 6 | import java.util.Arrays; 7 | 8 | /** 9 | * Created by houxh on 14-7-23. 10 | */ 11 | 12 | public class IMMessage { 13 | public long sender; 14 | public long receiver; 15 | public int timestamp; 16 | public int msgLocalID; 17 | public String content; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/LoginPoint.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | /** 4 | * Created by houxh on 15/2/3. 5 | */ 6 | public class LoginPoint { 7 | public static final int PLATFORM_IOS = 1; 8 | public static final int PLATFORM_ANDROID = 2; 9 | public static final int PLATFORM_WEB = 3; 10 | 11 | public int upTimestamp;//上线时间戳 12 | public int platformID;//平台id 13 | public String deviceID;//设备id 14 | } 15 | -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/GroupMessageHandler.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | /** 4 | * Created by houxh on 15/3/21. 5 | */ 6 | public interface GroupMessageHandler { 7 | public boolean handleMessage(IMMessage msg); 8 | public boolean handleMessageACK(int msgLocalID, long uid); 9 | public boolean handleMessageFailure(int msgLocalID, long uid); 10 | public boolean handleGroupNotification(String notification); 11 | } 12 | -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/Call_Ans.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Call_answer.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/accept_nor.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "accept_nor.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/accept_pre.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "accept_pre.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/refuse_nor.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "refuse_nor.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/refuse_pre.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "refuse_pre.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/conference/conference-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | 18 | 19 | -------------------------------------------------------------------------------- /android/imsdk/src/androidTest/java/com/beetle/im/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/CustomerMessageHandler.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | /** 4 | * Created by houxh on 16/1/17. 5 | */ 6 | public interface CustomerMessageHandler { 7 | public boolean handleCustomerSupportMessage(CustomerMessage msg); 8 | public boolean handleMessage(CustomerMessage msg); 9 | public boolean handleMessageACK(CustomerMessage msg); 10 | public boolean handleMessageFailure(CustomerMessage msg); 11 | } 12 | -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/CustomerMessageObserver.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | /** 4 | * Created by houxh on 16/1/18. 5 | */ 6 | public interface CustomerMessageObserver { 7 | public void onCustomerSupportMessage(CustomerMessage msg); 8 | public void onCustomerMessage(CustomerMessage msg); 9 | public void onCustomerMessageACK(CustomerMessage msg); 10 | public void onCustomerMessageFailure(CustomerMessage msg); 11 | } 12 | -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/Call_Ans_p.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Call_answer_p.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/Call_hangup.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Call_hangup.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/Call_hangup_p.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Call_hangup_p.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /android/app/src/androidTest/java/com/beetle/conference/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.beetle.conference; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /android/asynctcp/src/androidTest/java/com/beetle/asynctcp/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.beetle.asynctcp; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - MBProgressHUD (1.0.0) 3 | - Toast (3.1.0) 4 | 5 | DEPENDENCIES: 6 | - MBProgressHUD 7 | - Toast 8 | 9 | SPEC REPOS: 10 | https://github.com/cocoapods/specs.git: 11 | - MBProgressHUD 12 | - Toast 13 | 14 | SPEC CHECKSUMS: 15 | MBProgressHUD: 4890f671c94e8a0f3cf959aa731e9de2f036d71a 16 | Toast: 14a93686d6c8bfe2727afd342414e35660a8a1f3 17 | 18 | PODFILE CHECKSUM: a0a2548c5f5b5612b89250f2739cddc5230d4d4e 19 | 20 | COCOAPODS: 1.5.3 21 | -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/switch.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "switch.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "switch@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/bg.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "bg.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "bg@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "bg@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/Call_background2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Call_background2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Call_background2@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /ios/conference/controller/GroupVOIPViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ConferenceViewController.h 3 | // Face 4 | // 5 | // Created by houxh on 2016/12/7. 6 | // Copyright © 2016年 beetle. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GroupVOIPViewController : UIViewController 12 | 13 | +(int64_t)controllerCount; 14 | 15 | @property(nonatomic, assign) int64_t currentUID; 16 | @property(nonatomic, copy) NSString *channelID; 17 | @property(nonatomic, copy) NSString *token; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /ios/conference/ViewController.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015, GoBelieve 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @interface ViewController : UIViewController 13 | 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /android/imsdk/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion '25.0.0' 6 | 7 | defaultConfig { 8 | minSdkVersion 9 9 | targetSdkVersion 23 10 | } 11 | 12 | compileOptions { 13 | sourceCompatibility JavaVersion.VERSION_1_6 14 | targetCompatibility JavaVersion.VERSION_1_6 15 | } 16 | buildTypes { 17 | release { 18 | minifyEnabled false 19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 20 | } 21 | } 22 | } 23 | 24 | dependencies { 25 | compile fileTree(dir: 'libs', include: ['*.jar']) 26 | compile project(':asynctcp') 27 | } 28 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8dp 5 | 8dp 6 | 16dp 7 | 16dp 8 | 16dp 9 | 10 | 11 | 26sp 12 | 24sp 13 | 22sp 14 | 20sp 15 | 18sp 16 | 16sp 17 | 14sp 18 | 12sp 19 | 10sp 20 | 21 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | google() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.1.3' 10 | 11 | // NOTE: Do not place your application dependencies here; they belong 12 | // in the individual module build.gradle files 13 | } 14 | } 15 | 16 | allprojects { 17 | repositories { 18 | jcenter() 19 | maven { 20 | // All of React Native (JS, Android binaries) is installed from npm 21 | url "$rootDir/../node_modules/react-native/android" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ios/conferenceTests/conferenceTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // FaceTests.m 3 | // FaceTests 4 | // 5 | // Created by houxh on 14-10-13. 6 | // Copyright (c) 2014年 beetle. All rights reserved. 7 | // 8 | 9 | #import 10 | @interface FaceTests : XCTestCase 11 | 12 | @end 13 | 14 | @implementation FaceTests 15 | 16 | - (void)setUp 17 | { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown 23 | { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | 29 | - (void)testHistoryDB 30 | { 31 | 32 | 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /android/asynctcp/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion '25.0.0' 6 | defaultConfig { 7 | minSdkVersion 9 8 | targetSdkVersion 23 9 | versionCode 1 10 | versionName "1.0" 11 | } 12 | 13 | compileOptions { 14 | sourceCompatibility JavaVersion.VERSION_1_7 15 | targetCompatibility JavaVersion.VERSION_1_7 16 | } 17 | buildTypes { 18 | release { 19 | minifyEnabled false 20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 21 | } 22 | } 23 | } 24 | 25 | dependencies { 26 | compile fileTree(dir: 'libs', include: ['*.jar']) 27 | } 28 | -------------------------------------------------------------------------------- /ios/conferenceTests/conferenceTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | ## Project-wide Gradle settings. 2 | # 3 | # For more details on how to configure your build environment visit 4 | # http://www.gradle.org/docs/current/userguide/build_environment.html 5 | # 6 | # Specifies the JVM arguments used for the daemon process. 7 | # The setting is particularly useful for tweaking memory settings. 8 | # Default value: -Xmx1024m -XX:MaxPermSize=256m 9 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 10 | # 11 | # When configured, Gradle will run in incubating parallel mode. 12 | # This option should only be used with decoupled projects. More details, visit 13 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 14 | # org.gradle.parallel=true 15 | #Sun Dec 11 09:58:21 CST 2016 16 | android.useDeprecatedNdk=true 17 | -------------------------------------------------------------------------------- /ios/imsdk/imsdkTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.beetle.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "conference", 3 | "version": "0.0.0", 4 | "description": "conference demo", 5 | "keywords": [ 6 | "webrtc" 7 | ], 8 | "author": "", 9 | "readmeFilename": "README.md", 10 | "scripts": { 11 | "lint": "jshint . && eslint .", 12 | "validate": "npm ls", 13 | "start": "node node_modules/react-native/local-cli/cli.js start" 14 | }, 15 | "dependencies": { 16 | "events": "^1.1.1", 17 | "freeice": "^2.1.2", 18 | "hark": "1.1.3", 19 | "inherits": "^2.0.1", 20 | "merge": "^1.2.0", 21 | "react": "16.3.1", 22 | "react-dom": "15.4.2", 23 | "react-native": "0.55.4", 24 | "react-native-permissions": "~1.1.1", 25 | "react-native-webrtc": "1.63.0", 26 | "sdp-translator": "^0.1.15", 27 | "ua-parser-js": "^0.7.7", 28 | "uuid": "~2.0.1" 29 | }, 30 | "license": "Apache-2.0" 31 | } 32 | -------------------------------------------------------------------------------- /android/asynctcp/src/main/java/com/beetle/AsyncTCP.java: -------------------------------------------------------------------------------- 1 | package com.beetle; 2 | 3 | import java.lang.ref.WeakReference; 4 | 5 | public class AsyncTCP { 6 | private int sock; 7 | private int events; 8 | 9 | private byte[] data; 10 | private boolean connecting; 11 | 12 | private TCPConnectCallback connectCallback; 13 | private TCPReadCallback readCallback; 14 | private long self; 15 | 16 | 17 | public void setConnectCallback(TCPConnectCallback cb) { 18 | connectCallback = cb; 19 | } 20 | public void setReadCallback(TCPReadCallback cb) { 21 | readCallback = cb; 22 | } 23 | public native boolean connect(String host, int port); 24 | public native void close(); 25 | 26 | public native void writeData(byte[] bytes); 27 | 28 | public native void startRead(); 29 | 30 | 31 | static { 32 | System.loadLibrary("async_tcp"); 33 | } 34 | } -------------------------------------------------------------------------------- /ios/imsdk/imsdk/AsyncTCP.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015, GoBelieve 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @class AsyncTCP; 13 | typedef void(^ConnectCB)(AsyncTCP *tcp, int err); 14 | typedef void(^ReadCB)(AsyncTCP *tcp, NSData *data, int err); 15 | typedef void(^CloseCB)(AsyncTCP *tcp, int err); 16 | 17 | @interface AsyncTCP : NSObject 18 | -(BOOL)connect:(NSString*)host port:(int)port cb:(ConnectCB)cb; 19 | -(void)close; 20 | -(void)write:(NSData*)data; 21 | -(void)flush; 22 | -(void)startRead:(ReadCB)cb; 23 | @end 24 | 25 | 26 | -------------------------------------------------------------------------------- /ios/imsdk/imsdk/util.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015, GoBelieve 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #ifndef IM_UTIL_H 11 | #define IM_UTIL_H 12 | 13 | void writeInt32(int32_t v, void *p); 14 | int32_t readInt32(const void *p); 15 | 16 | void writeInt64(int64_t v, void *p); 17 | int64_t readInt64(const void *p); 18 | 19 | void writeInt16(int16_t v, void *p); 20 | int16_t readInt16(const void *p); 21 | 22 | int lookupAddr(const char *host, int port, struct sockaddr_in *addr); 23 | 24 | 25 | int sock_nonblock(int fd, int set); 26 | int write_data(int fd, uint8_t *bytes, int len); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | conference 4 | 发送用户id 5 | Connection error 6 | OK 7 | Switch front/back camera 8 | Slide to change capture format 9 | Camera2 only supports capturing to texture. Either disable Camera2 or enable capturing to texture in the options. 10 | 接收用户id 11 | 1号参会者 12 | 2号参会者 13 | 3号参会者 14 | 4号参会者 15 | 登 录 16 | 17 | -------------------------------------------------------------------------------- /ios/conference/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /react/polyfills-webrtc.js: -------------------------------------------------------------------------------- 1 | import { 2 | MediaStream, 3 | MediaStreamTrack, 4 | RTCSessionDescription, 5 | RTCIceCandidate, 6 | getUserMedia 7 | } from 'react-native-webrtc'; 8 | 9 | import RTCPeerConnection from './RTCPeerConnection'; 10 | 11 | (global => { 12 | if (typeof global.webkitMediaStream === 'undefined') { 13 | global.webkitMediaStream = MediaStream; 14 | } 15 | if (typeof global.MediaStreamTrack === 'undefined') { 16 | global.MediaStreamTrack = MediaStreamTrack; 17 | } 18 | if (typeof global.webkitRTCPeerConnection === 'undefined') { 19 | global.webkitRTCPeerConnection = RTCPeerConnection; 20 | } 21 | if (typeof global.RTCSessionDescription === 'undefined') { 22 | global.RTCSessionDescription = RTCSessionDescription; 23 | } 24 | 25 | if (typeof global.RTCIceCandidate == 'undefined') { 26 | global.RTCIceCandidate = RTCIceCandidate; 27 | } 28 | 29 | const navigator = global.navigator; 30 | 31 | if (navigator) { 32 | if (typeof navigator.webkitGetUserMedia === 'undefined') { 33 | navigator.webkitGetUserMedia = getUserMedia; 34 | } 35 | } 36 | 37 | })(global || window || this); // eslint-disable-line no-invalid-this 38 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 17 | 18 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /ios/imsdk/imsdk/TCPConnection.h: -------------------------------------------------------------------------------- 1 | // 2 | // TCPConnection.h 3 | // podcasting 4 | // 5 | // Created by houxh on 15/6/25. 6 | // Copyright (c) 2015年 beetle. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define STATE_UNCONNECTED 0 12 | #define STATE_CONNECTING 1 13 | #define STATE_CONNECTED 2 14 | #define STATE_CONNECTFAIL 3 15 | 16 | @protocol TCPConnectionObserver 17 | @optional 18 | //同IM服务器连接的状态变更通知 19 | -(void)onConnectState:(int)state; 20 | 21 | @end 22 | 23 | 24 | @class AsyncTCP; 25 | @interface TCPConnection : NSObject 26 | //public 27 | @property(nonatomic, assign)int connectState; 28 | @property(nonatomic, copy) NSString *host; 29 | 30 | //protect 31 | @property(nonatomic)int port; 32 | @property(nonatomic, assign)int heartbeatHZ; 33 | @property(nonatomic)AsyncTCP *tcp; 34 | 35 | //subclass override 36 | -(void)sendPing; 37 | 38 | 39 | -(BOOL)handleData:(NSData*)data; 40 | 41 | -(void)onConnect; 42 | -(void)onClose; 43 | 44 | 45 | 46 | //protect method 47 | -(void)ping; 48 | -(void)pong; 49 | -(void)reconnect2S; 50 | 51 | //public method 52 | -(void)start; 53 | -(void)stop; 54 | 55 | -(void)enterForeground; 56 | -(void)enterBackground; 57 | 58 | -(void)addConnectionObserver:(id)ob; 59 | -(void)removeConnectionObserver:(id)ob; 60 | 61 | -(void)startRechabilityNotifier; 62 | @end 63 | -------------------------------------------------------------------------------- /react/participant.js: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2014 Kurento (http://kurento.org/) 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | function Participant(name, sendMessage) { 19 | console.log("participant name:", name); 20 | this.name = name; 21 | 22 | this.offerToReceiveVideo = function(error, offerSdp, wp){ 23 | if (error) return console.error ("sdp offer error") 24 | console.log('Invoking SDP offer callback function'); 25 | var msg = { id : "receiveVideoFrom", 26 | sender : name, 27 | sdpOffer : offerSdp 28 | }; 29 | sendMessage(msg); 30 | } 31 | 32 | 33 | this.onIceCandidate = function (candidate, wp) { 34 | console.log("Local candidate" + JSON.stringify(candidate)); 35 | 36 | var message = { 37 | id: 'onIceCandidate', 38 | candidate: candidate, 39 | name: name 40 | }; 41 | sendMessage(message); 42 | } 43 | 44 | Object.defineProperty(this, 'rtcPeer', { writable: true}); 45 | 46 | this.dispose = function() { 47 | console.log('Disposing participant ' + this.name); 48 | this.rtcPeer.dispose(); 49 | }; 50 | } 51 | 52 | module.exports = Participant; 53 | -------------------------------------------------------------------------------- /android/imsdk/src/main/java/com/beetle/im/Timer.java: -------------------------------------------------------------------------------- 1 | package com.beetle.im; 2 | 3 | import android.os.Handler; 4 | import android.os.Message; 5 | import android.util.Log; 6 | import static android.os.SystemClock.uptimeMillis; 7 | 8 | /** 9 | * Created by houxh on 14-7-21. 10 | */ 11 | public abstract class Timer { 12 | private static final int WHAT = 0; 13 | 14 | private long start; 15 | private long interval; 16 | private boolean active = false; 17 | 18 | class TimerHandler extends Handler { 19 | @Override 20 | public void handleMessage(Message msg) { 21 | if (!active) { 22 | return; 23 | } 24 | 25 | Timer.this.fire(); 26 | if (Timer.this.interval != -1) { 27 | long t = uptimeMillis() + Timer.this.interval; 28 | boolean b = this.sendEmptyMessageAtTime(WHAT, t); 29 | } 30 | } 31 | } 32 | private Handler handler = new TimerHandler(); 33 | 34 | public void setTimer(long start, long interval) { 35 | this.start = start; 36 | this.interval = interval; 37 | if (active) { 38 | handler.removeMessages(WHAT); 39 | handler.sendEmptyMessageAtTime(WHAT, start); 40 | } 41 | } 42 | 43 | public void setTimer(long start) { 44 | this.start = start; 45 | this.interval = -1; 46 | if (active) { 47 | handler.removeMessages(WHAT); 48 | handler.sendEmptyMessageAtTime(WHAT, start); 49 | } 50 | } 51 | 52 | public void resume() { 53 | active = true; 54 | handler.sendEmptyMessageAtTime(WHAT, start); 55 | } 56 | 57 | public void suspend() { 58 | active = false; 59 | handler.removeMessages(WHAT); 60 | } 61 | 62 | protected abstract void fire(); 63 | } -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | apply from: '../../node_modules/react-native/react.gradle' 4 | 5 | android { 6 | compileSdkVersion 23 7 | buildToolsVersion '27.0.3' 8 | useLibrary 'org.apache.http.legacy' 9 | 10 | defaultConfig { 11 | applicationId "com.beetle.conference" 12 | minSdkVersion 16 13 | targetSdkVersion 23 14 | versionCode 10 15 | versionName "1.0" 16 | 17 | ndk { 18 | abiFilters 'armeabi-v7a', 'x86' 19 | } 20 | packagingOptions { 21 | // The project react-native does not provide 64-bit binaries at the 22 | // time of this writing. Unfortunately, packaging any 64-bit 23 | // binaries into the .apk will crash the app at runtime on 64-bit 24 | // platforms. 25 | exclude 'lib/x86_64/libjingle_peerconnection_so.so' 26 | exclude 'lib/arm64-v8a/libjingle_peerconnection_so.so' 27 | } 28 | } 29 | signingConfigs { 30 | app { 31 | storeFile file("gradle.keystore") 32 | storePassword "gradle" 33 | keyAlias "gradle" 34 | keyPassword "gradle" 35 | } 36 | } 37 | 38 | compileOptions { 39 | sourceCompatibility JavaVersion.VERSION_1_7 40 | targetCompatibility JavaVersion.VERSION_1_7 41 | } 42 | 43 | buildTypes { 44 | release { 45 | minifyEnabled false 46 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 47 | signingConfig signingConfigs.app 48 | } 49 | } 50 | } 51 | 52 | dependencies { 53 | implementation fileTree(include: ['*.jar'], dir: 'libs') 54 | 55 | implementation 'com.facebook.react:react-native:+' 56 | implementation project(':react-native-webrtc') 57 | 58 | } 59 | 60 | -------------------------------------------------------------------------------- /android/asynctcp/src/main/java/com/beetle/AsyncTCPTest.java: -------------------------------------------------------------------------------- 1 | package com.beetle; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.os.Looper; 6 | import android.util.Log; 7 | import android.view.View; 8 | import android.view.View.OnClickListener; 9 | import android.widget.Button; 10 | 11 | 12 | 13 | public class AsyncTCPTest extends Activity { 14 | AsyncTCP tcp; 15 | byte[] recvBuf = new byte[0]; 16 | @Override 17 | public void onCreate(Bundle savedInstanceState) 18 | { 19 | super.onCreate(savedInstanceState); 20 | Button bt = new Button(this); 21 | bt.setText( "start" ); 22 | setContentView(bt); 23 | 24 | 25 | bt.setOnClickListener(new OnClickListener() { 26 | @Override 27 | public void onClick(View arg0) { 28 | test(); 29 | } 30 | }); 31 | } 32 | 33 | 34 | public void test() { 35 | if (tcp != null) return; 36 | tcp = new AsyncTCP(); 37 | 38 | 39 | TCPConnectCallback cb = new TCPConnectCallback() { 40 | public void onConnect(Object tcp1, int status) { 41 | if (status != 0) { 42 | Log.i("Beetle", "connect error"); 43 | tcp.close(); 44 | return; 45 | } 46 | Log.i("Beetle", "connected"); 47 | byte[] data = "GET / HTTP/1.1\r\nHost: www.baidu.com\r\nConnection: close\r\n\r\n".getBytes(); 48 | tcp.writeData(data); 49 | 50 | tcp.startRead(); 51 | } 52 | }; 53 | TCPReadCallback read_cb = new TCPReadCallback() { 54 | public void onRead(Object tcp1, byte[] data) { 55 | if (data.length == 0) { 56 | try { 57 | String result = new String(recvBuf, "UTF-8"); 58 | Log.i("Beetle", result); 59 | } catch(Exception e) { 60 | 61 | } 62 | Log.i("Beetle", "tcp closed"); 63 | tcp.close(); 64 | return; 65 | } 66 | 67 | byte[] result = new byte[recvBuf.length + data.length]; 68 | System.arraycopy(recvBuf, 0, result, 0, recvBuf.length); 69 | System.arraycopy(data, 0, result, recvBuf.length, data.length); 70 | recvBuf = result; 71 | Log.i("Beetle", "recv data"); 72 | } 73 | }; 74 | tcp.setConnectCallback(cb); 75 | tcp.setReadCallback(read_cb); 76 | tcp.connect("www.baidu.com", 80); 77 | } 78 | } -------------------------------------------------------------------------------- /ios/conference/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // Face 4 | // 5 | // Created by houxh on 14-10-13. 6 | // Copyright (c) 2014年 beetle. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ViewController.h" 11 | @implementation AppDelegate 12 | 13 | 14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 15 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 16 | self.window.backgroundColor = [UIColor whiteColor]; 17 | [self.window makeKeyAndVisible]; 18 | 19 | ViewController *mainViewController = [[ViewController alloc] init]; 20 | self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:mainViewController]; 21 | 22 | return YES; 23 | } 24 | 25 | - (void)applicationWillResignActive:(UIApplication *)application { 26 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 27 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 28 | } 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | - (void)applicationWillEnterForeground:(UIApplication *)application { 36 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 37 | } 38 | 39 | - (void)applicationDidBecomeActive:(UIApplication *)application { 40 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 41 | } 42 | 43 | - (void)applicationWillTerminate:(UIApplication *)application { 44 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 45 | } 46 | 47 | 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /ios/conference/conference-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | conference 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | conference 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0.0 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSAllowsArbitraryLoads 30 | 31 | 32 | NSCameraUsageDescription 33 | This app requires access to camera. 34 | NSContactsUsageDescription 35 | This app requires access to contacts. 36 | NSMicrophoneUsageDescription 37 | This app requires access to microphone. 38 | UIAppFonts 39 | 40 | jitsi.ttf 41 | FontAwesome.ttf 42 | Entypo.ttf 43 | EvilIcons.ttf 44 | Foundation.ttf 45 | Ionicons.ttf 46 | MaterialCommunityIcons.ttf 47 | MaterialIcons.ttf 48 | Octicons.ttf 49 | SimpleLineIcons.ttf 50 | Zocial.ttf 51 | 52 | UIBackgroundModes 53 | 54 | UILaunchStoryboardName 55 | LaunchScreen 56 | UIRequiredDeviceCapabilities 57 | 58 | armv7 59 | 60 | UIStatusBarTintParameters 61 | 62 | UINavigationBar 63 | 64 | Style 65 | UIBarStyleDefault 66 | Translucent 67 | 68 | 69 | 70 | UISupportedInterfaceOrientations 71 | 72 | UIInterfaceOrientationPortrait 73 | 74 | UIViewControllerBasedStatusBarAppearance 75 | 76 | 77 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /ios/imsdk/imsdk/GOReachability.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014-2015, GoBelieve 3 | All rights reserved. 4 | 5 | This source code is licensed under the BSD-style license found in the 6 | LICENSE file in the root directory of this source tree. An additional grant 7 | of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | /** 14 | * Does ARC support GCD objects? 15 | * It does if the minimum deployment target is iOS 6+ or Mac OS X 8+ 16 | * 17 | * @see http://opensource.apple.com/source/libdispatch/libdispatch-228.18/os/object.h 18 | **/ 19 | #if OS_OBJECT_USE_OBJC 20 | #define NEEDS_DISPATCH_RETAIN_RELEASE 0 21 | #else 22 | #define NEEDS_DISPATCH_RETAIN_RELEASE 1 23 | #endif 24 | 25 | /** 26 | * Create NS_ENUM macro if it does not exist on the targeted version of iOS or OS X. 27 | * 28 | * @see http://nshipster.com/ns_enum-ns_options/ 29 | **/ 30 | #ifndef NS_ENUM 31 | #define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type 32 | #endif 33 | 34 | typedef NS_ENUM(NSInteger, NetworkStatus) { 35 | // Apple NetworkStatus Compatible Names. 36 | NotReachable = 0, 37 | ReachableViaWiFi = 2, 38 | ReachableViaWWAN = 1 39 | }; 40 | 41 | @class GOReachability; 42 | 43 | typedef void (^NetworkReachable)(GOReachability * reachability); 44 | typedef void (^NetworkUnreachable)(GOReachability * reachability); 45 | 46 | @interface GOReachability : NSObject 47 | 48 | @property (nonatomic, copy) NetworkReachable reachableBlock; 49 | @property (nonatomic, copy) NetworkUnreachable unreachableBlock; 50 | 51 | 52 | @property (nonatomic, assign) BOOL reachableOnWWAN; 53 | 54 | +(GOReachability*)reachabilityWithHostname:(NSString*)hostname; 55 | // This is identical to the function above, but is here to maintain 56 | //compatibility with Apples original code. (see .m) 57 | +(GOReachability*)reachabilityWithHostName:(NSString*)hostname; 58 | +(GOReachability*)reachabilityForInternetConnection; 59 | +(GOReachability*)reachabilityWithAddress:(const struct sockaddr_in*)hostAddress; 60 | +(GOReachability*)reachabilityForLocalWiFi; 61 | 62 | -(GOReachability *)initWithReachabilityRef:(SCNetworkReachabilityRef)ref; 63 | 64 | -(BOOL)startNotifier; 65 | -(void)stopNotifier; 66 | 67 | -(BOOL)isReachable; 68 | -(BOOL)isReachableViaWWAN; 69 | -(BOOL)isReachableViaWiFi; 70 | 71 | // WWAN may be available, but not active until a connection has been established. 72 | // WiFi may require a connection for VPN on Demand. 73 | -(BOOL)isConnectionRequired; // Identical DDG variant. 74 | -(BOOL)connectionRequired; // Apple's routine. 75 | // Dynamic, on demand connection? 76 | -(BOOL)isConnectionOnDemand; 77 | // Is user intervention required? 78 | -(BOOL)isInterventionRequired; 79 | 80 | -(NetworkStatus)currentReachabilityStatus; 81 | -(SCNetworkReachabilityFlags)reachabilityFlags; 82 | -(NSString*)currentReachabilityString; 83 | -(NSString*)currentReachabilityFlags; 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /android/app/src/main/res/layout/activity_login.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 14 | 18 | 19 | 28 | 29 | 36 | 37 | 38 | 39 | 42 | 46 | 47 | 48 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 71 |