提交 47b14e56 authored 作者: 汪显鹏's avatar 汪显鹏

瞩目SDK 第一次提交

上级 64125669
流水线 #228 已取消 于阶段
# Created by .ignore support plugin (hsz.mobi)
#它主要的写法规则为:"#"表示注释,"*"表示通配符,可多个,"/"表示目录,
#"!"表示不忽略匹配到的文件或目录,"?"表示通配单个字符,"[]"表示包含单个字符的匹配列表。
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/captures
.idea
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# Intellij
*.iml
# Keystore files
*.jks
\ No newline at end of file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven {
url 'https://maven.google.com'
}
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
allprojects {
repositories {
maven { url 'https://maven.google.com' }
jcenter()
google()
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.android.sdkexample"
minSdkVersion 14
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'progua rd-rules.txt'
}
}
/*compileOptions {
encoding "UTF-8"
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}*/
}
dependencies {
implementation 'com.android.support:support-v4:27.1.0'
implementation project(':zhumucommonlib')
implementation project(':zhumumobilertc')
implementation project(':zhumusdk')
implementation 'org.xutils:xutils:3.1.24'
implementation 'com.google.code.gson:gson:2.8.1'
implementation 'io.reactivex.rxjava2:rxjava:2.1.6'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'com.squareup.okhttp3:logging-interceptor:3.2.0'
implementation 'com.amitshekhar.android:rx2-android-networking:1.0.0'
implementation 'commons-codec:commons-codec:20041127.091804'
implementation 'com.android.support:multidex:1.0.2'
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.sdkexample"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="auto">
<uses-sdk android:targetSdkVersion="23"/>
<uses-feature android:glEsVersion="0x00020000"/>
<!--
Commented content should be opened if your ADT version is lower than v20,
or you remove the "manifestmerger.enabled=true" from project.properties
-->
<!--
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-feature android:name="android.hardware.bluetooth" android:required="false" />
<uses-feature android:name="android.hardware.microphone" android:required="false" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.BROADCAST_STICKY"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<permission android:name="com.android.sdkexample.permission.KUBI_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.android.sdkexample.permission.KUBI_MESSAGE" />
<application
android:label="@string/this_app_name"
android:icon="@drawable/ic_launcher">
<activity android:name=".MainActivity"
android:label="@string/this_app_name"
android:icon="@drawable/ic_launcher"
android:theme="@style/ZMTheme.MainWindow" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MyInviteActivity"
android:label="@string/invite_acitivity_name"
android:icon="@drawable/ic_launcher"
android:theme="@style/ZMTheme.MainWindow" >
<intent-filter>
<action android:name="com.android.sdkexample.intent.action.MeetingInvite" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name=".MyWaitJoinActivity"
android:icon="@drawable/ic_launcher"
android:theme="@style/ZMTheme.MainWindow" >
<intent-filter>
<action android:name="com.android.sdkexample.intent.action.JoinBeforeHost" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name=".MyCallMeByPhoneActivity"
android:icon="@drawable/ic_launcher"
android:theme="@style/ZMTheme.MainWindow" >
<intent-filter>
<action android:name="com.android.sdkexample.intent.action.CallMyPhone" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.dropbox.client2.android.AuthActivity"
android:configChanges="orientation|keyboard"
android:theme="@style/ZMTheme.SubWindow"
android:launchMode="singleTask" >
<intent-filter>
<!-- Change this to be db- followed by your app key -->
<data android:scheme="db-YourAppKey" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!--
Commented content should be opened if your ADT version is lower than v20,
or you remove the "manifestmerger.enabled=true" from project.properties
-->
<!--
<activity
android:name="com.zipow.videobox.JoinByURLActivity"
android:launchMode="singleTask"
android:theme="@style/ZMTheme.Transparent" />
<activity
android:name="com.zipow.videobox.IntegrationActivity"
android:configChanges="orientation|screenSize"
android:launchMode="singleTask"
android:theme="@style/ZMTheme.Transparent" />
<activity
android:name="com.zipow.videobox.MeetingEndMessageActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/ZMDialog.Transparent" />
<activity
android:name="com.zipow.videobox.ConfActivityNormal"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="false"
android:theme="@style/ZMTheme.SubWindow"
android:process=":zoom_meeting" />
<activity
android:name="com.zipow.videobox.PListActivity"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="false"
android:theme="@style/ZMTheme.SubWindow"
android:process=":zoom_meeting" />
<activity
android:name="com.zipow.videobox.ConfChatActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/ZMTheme.SubWindow"
android:process=":zoom_meeting" />
<activity
android:name="com.zipow.videobox.MeetingRunningInfoActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/ZMTheme.SubWindow"
android:process=":zoom_meeting" />
<activity
android:name="com.zipow.videobox.CallInActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/ZMTheme.SubWindow"
android:process=":zoom_meeting" />
<activity
android:name="com.zipow.videobox.SimpleActivity"
android:configChanges="orientation|screenSize"
android:windowSoftInputMode="stateHidden|adjustResize"
android:theme="@style/ZMTheme.SubWindow" />
<activity
android:name="com.zipow.videobox.SimpleInMeetingActivity"
android:configChanges="orientation|screenSize"
android:windowSoftInputMode="stateHidden|adjustResize"
android:theme="@style/ZMTheme.SubWindow"
android:process=":zoom_meeting" />
<activity
android:name="com.zipow.videobox.poll.PollingActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/ZMTheme.SubWindow" />
<activity
android:name="com.zipow.videobox.poll.WebinarPollingActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/ZMTheme.SubWindow"
android:process=":zoom_meeting" />
<activity
android:name="com.zipow.videobox.poll.PollingResultActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/ZMTheme.SubWindow" />
<activity
android:name="com.zipow.videobox.poll.WebinarPollingResultActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/ZMTheme.SubWindow"
android:process=":zoom_meeting" />
<activity
android:name="us.zoom.androidlib.app.ZMFileListActivity"
android:configChanges="orientation|screenSize"
android:theme="@style/ZMTheme.SubWindow" />
<service android:name="com.zipow.videobox.PTService" />
<service android:name="com.zipow.videobox.ConfService" android:process=":zoom_meeting" />
-->
</application>
</manifest>
package com.android.sdkexample;
public interface Constants {
public final static String url = "https://api.zhumu.me/v3/user/get";
public final static String API_KEY = "9993779D06833B0CE3A5F8308B07DD59";
public final static String API_SECRET = "DB07FC37CC7782E70D3D86CA171B8EB5";
public final static String API_LOGINTYPE= "";
public final static String API_LOGINNAME = "";
/**
* 如果sdk 初始化失败,请询问相关人员 找到 [ WEB_DOMAIN ,APP_KEY, APP_SECRET ]的值,并设置
*/
public final static String WEB_DOMAIN = "launcher.zhumu.me";
public final static String APP_KEY = "xoqzRRVy4dpUIxabbTvayKBzRV0VBFhrxFqy";
public final static String APP_SECRET = "v4Z7o4ds8A9UUGSOs7bXLOlNrAkoByfWHQlF";
// TODO Change it to your Dropbox APP Key to enable "Share Dropbox"
public final static String DROPBOX_APP_KEY = null;
// TODO Change it to your Dropbox APP Secret to enable "Share Dropbox"
public final static String DROPBOX_APP_SECRET = null;
// TODO Change it to your OneDrive client ID to enable "Share OneDrive"
public final static String ONEDRIVE_CLIENT_ID = null;
}
package com.android.sdkexample;
import android.util.Log;
/**
*/
public final class Logs {
private int debugType = DebugType.V;
public static final class DebugType {
public static final int V = 0;
public static final int D = 1;
public static final int I = 2;
public static final int W = 3;
public static final int E = 4;
public static final int N = 5; // close all debug info
}
private String TAG = "";
public Logs(String TAG) {
this.TAG = TAG;
}
public Logs(String TAG, int debugType){
this.TAG = TAG;
this.debugType = debugType;
}
public void D(String s) {
if (debugType <= DebugType.D) {
Log.d(TAG, s);
}
}
public void E(String s) {
if (debugType <= DebugType.E) {
Log.e(TAG, s);
}
}
public void I(String s) {
if (debugType <= DebugType.I) {
Log.i(TAG, s);
}
}
public void W(String s) {
if (debugType <= DebugType.W) {
Log.w(TAG, s);
}
}
public void V(String s) {
if (debugType <= DebugType.V) {
Log.v(TAG, s);
}
}
}
package com.android.sdkexample;
import java.io.Serializable;
public class Meeting implements Serializable {
private int code;
private int zcode;
private String id;
private String username;
private String mobile;
private int usertype;
private String det;
private String createtime;
private String createby;
private String pmi;
private int role;
private String email;
private int isowner;
private int accounttype;
private String token;
public void setCode(int code) {
this.code = code;
}
public int getCode() {
return this.code;
}
public void setZcode(int zcode) {
this.zcode = zcode;
}
public int getZcode() {
return this.zcode;
}
public void setId(String id) {
this.id = id;
}
public String getId() {
return this.id;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getMobile() {
return this.mobile;
}
public void setUsername(String username) {
this.username = username;
}
public String getUsername() {
return this.username;
}
public void setUsertype(int usertype) {
this.usertype = usertype;
}
public int getUsertype() {
return this.usertype;
}
public void setDet(String det) {
this.det = det;
}
public String getDet() {
return this.det;
}
public void setCreatetime(String createtime) {
this.createtime = createtime;
}
public String getCreatetime() {
return this.createtime;
}
public void setCreateby(String createby) {
this.createby = createby;
}
public String getCreateby() {
return this.createby;
}
public void setPmi(String pmi) {
this.pmi = pmi;
}
public String getPmi() {
return this.pmi;
}
public void setRole(int role) {
this.role = role;
}
public int getRole() {
return this.role;
}
public void setEmail(String email) {
this.email = email;
}
public String getEmail() {
return this.email;
}
public void setIsowner(int isowner) {
this.isowner = isowner;
}
public int getIsowner() {
return this.isowner;
}
public void setAccounttype(int accounttype) {
this.accounttype = accounttype;
}
public int getAccounttype() {
return this.accounttype;
}
public void setToken(String token) {
this.token = token;
}
public String getToken() {
return this.token;
}
}
\ No newline at end of file
package com.android.sdkexample;
import android.app.Application;
import android.content.Context;
import android.support.multidex.MultiDex;
/**
* Created by liyh on 2017/11/29.
*/
public class MyApplication extends Application {
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(newBase);
MultiDex.install(this);
}
}
package com.android.sdkexample;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import com.suirui.zhumu.ZHUMUDialOutStatus;
import com.suirui.zhumu.ZHUMUDialOutStatusListener;
import com.suirui.zhumu.ZHUMUMeetingService;
import com.suirui.zhumu.ZHUMUSdk;
public class MyCallMeByPhoneActivity extends Activity implements View.OnClickListener, ZHUMUDialOutStatusListener {
private static final String TAG = MyCallMeByPhoneActivity.class.getSimpleName();
private Button mBtnCall;
private Button mBtnHangup;
private EditText mEdtPhoneNumber;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.call_me_activity);
mEdtPhoneNumber = (EditText)findViewById(R.id.edtPhoneNumber);
mBtnCall = (Button)findViewById(R.id.btnCall);
mBtnCall.setOnClickListener(this);
mBtnHangup = (Button)findViewById(R.id.btnHangUp);
mBtnHangup.setOnClickListener(this);
initButtons();
ZHUMUSdk sdk = ZHUMUSdk.getInstance();
ZHUMUMeetingService meetingService = sdk.getMeetingService();
if(meetingService != null) {
meetingService.addDialOutListener(this);
}
}
@Override
public void onDialOutStatusChanged(int status) {
Log.d(TAG, "onDialOutStatusChanged status = " + status);
if(status == ZHUMUDialOutStatus.DIALOUT_STATUS_JOIN_SUC) {
finish();
}
updateButtons(status);
}
@Override
public void onClick(View arg0) {
ZHUMUSdk sdk = ZHUMUSdk.getInstance();
ZHUMUMeetingService meetingService = sdk.getMeetingService();
if(arg0.getId() == R.id.btnCall) {
if(meetingService != null) {
String number = mEdtPhoneNumber.getText().toString().trim();
meetingService.dialOutUser(number, null, true);
}
} else if(arg0.getId() == R.id.btnHangUp) {
meetingService.cancelDialOut(true);
}
}
private void initButtons() {
ZHUMUSdk sdk = ZHUMUSdk.getInstance();
ZHUMUMeetingService meetingService = sdk.getMeetingService();
if(meetingService != null && meetingService.isDialOutInProgress()) {
mBtnCall.setEnabled(false);
mBtnHangup.setEnabled(true);
} else {
mBtnCall.setEnabled(true);
mBtnHangup.setEnabled(false);
}
}
private void updateButtons(int status) {
switch(status) {
case ZHUMUDialOutStatus.DIALOUT_STATUS_UNKNOWN:
case ZHUMUDialOutStatus.DIALOUT_STATUS_CANCEL_CALL_FAIL:
case ZHUMUDialOutStatus.DIALOUT_STATUS_CALL_CANCELED:
case ZHUMUDialOutStatus.DIALOUT_STATUS_BUSY:
case ZHUMUDialOutStatus.DIALOUT_STATUS_NOT_AVAILABLE:
case ZHUMUDialOutStatus.DIALOUT_STATUS_USER_HANGUP:
case ZHUMUDialOutStatus.DIALOUT_STATUS_OTHER_FAIL:
case ZHUMUDialOutStatus.DIALOUT_STATUS_TIMEOUT:
mBtnCall.setEnabled(true);
mBtnHangup.setEnabled(false);
break;
case ZHUMUDialOutStatus.DIALOUT_STATUS_CALLING:
case ZHUMUDialOutStatus.DIALOUT_STATUS_RINGING:
case ZHUMUDialOutStatus.DIALOUT_STATUS_ACCEPTED:
case ZHUMUDialOutStatus.DIALOUT_STATUS_JOIN_SUC:
mBtnCall.setEnabled(false);
mBtnHangup.setEnabled(true);