-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #137 from AgoraIO/dev/3.0.0_conflict
Dev/3.0.0 conflict
- Loading branch information
Showing
535 changed files
with
12,398 additions
and
15,048 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
include | ||
agora-rtc-sdk.jar | ||
*.so | ||
.settings | ||
|
||
# built application files | ||
*.apk | ||
*.ap_ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 60 additions & 17 deletions
77
Group-Video/OpenVideoCall-Android/app/src/main/java/io/agora/openvcall/AGApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,78 @@ | ||
package io.agora.openvcall; | ||
|
||
import android.app.Application; | ||
import android.content.Context; | ||
import android.text.TextUtils; | ||
import android.util.Log; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import io.agora.openvcall.model.AGEventHandler; | ||
import io.agora.openvcall.model.CurrentUserSettings; | ||
import io.agora.openvcall.model.WorkerThread; | ||
import io.agora.openvcall.model.EngineConfig; | ||
import io.agora.openvcall.model.MyEngineEventHandler; | ||
import io.agora.rtc.Constants; | ||
import io.agora.rtc.RtcEngine; | ||
|
||
public class AGApplication extends Application { | ||
private CurrentUserSettings mVideoSettings = new CurrentUserSettings(); | ||
|
||
private WorkerThread mWorkerThread; | ||
private final Logger log = LoggerFactory.getLogger(this.getClass()); | ||
private RtcEngine mRtcEngine; | ||
private EngineConfig mConfig; | ||
private MyEngineEventHandler mEventHandler; | ||
|
||
public synchronized void initWorkerThread() { | ||
if (mWorkerThread == null) { | ||
mWorkerThread = new WorkerThread(getApplicationContext()); | ||
mWorkerThread.start(); | ||
public RtcEngine rtcEngine() { | ||
return mRtcEngine; | ||
} | ||
|
||
mWorkerThread.waitForReady(); | ||
} | ||
public EngineConfig config() { | ||
return mConfig; | ||
} | ||
|
||
public CurrentUserSettings userSettings() { | ||
return mVideoSettings; | ||
} | ||
|
||
public void addEventHandler(AGEventHandler handler) { | ||
mEventHandler.addEventHandler(handler); | ||
} | ||
|
||
public synchronized WorkerThread getWorkerThread() { | ||
return mWorkerThread; | ||
public void remoteEventHandler(AGEventHandler handler) { | ||
mEventHandler.removeEventHandler(handler); | ||
} | ||
|
||
public synchronized void deInitWorkerThread() { | ||
mWorkerThread.exit(); | ||
@Override | ||
public void onCreate() { | ||
super.onCreate(); | ||
createRtcEngine(); | ||
} | ||
|
||
private void createRtcEngine() { | ||
Context context = getApplicationContext(); | ||
String appId = context.getString(R.string.agora_app_id); | ||
if (TextUtils.isEmpty(appId)) { | ||
throw new RuntimeException("NEED TO use your App ID, get your own ID at https://dashboard.agora.io/"); | ||
} | ||
|
||
mEventHandler = new MyEngineEventHandler(); | ||
try { | ||
mWorkerThread.join(); | ||
} catch (InterruptedException e) { | ||
e.printStackTrace(); | ||
mRtcEngine = RtcEngine.create(context, appId, mEventHandler); | ||
} catch (Exception e) { | ||
log.error(Log.getStackTraceString(e)); | ||
throw new RuntimeException("NEED TO check rtc sdk init fatal error\n" + Log.getStackTraceString(e)); | ||
} | ||
mWorkerThread = null; | ||
|
||
mRtcEngine.setChannelProfile(Constants.CHANNEL_PROFILE_COMMUNICATION); | ||
mRtcEngine.enableVideo(); | ||
mRtcEngine.enableAudioVolumeIndication(200, 3, false); | ||
|
||
mConfig = new EngineConfig(); | ||
} | ||
|
||
public static final CurrentUserSettings mVideoSettings = new CurrentUserSettings(); | ||
@Override | ||
public void onTerminate() { | ||
super.onTerminate(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,6 @@ public void reset() { | |
mChannel = null; | ||
} | ||
|
||
EngineConfig() { | ||
public EngineConfig() { | ||
} | ||
} |
Oops, something went wrong.