private void initializeSession(String apiKey, String sessionId, String token) { Log.d(LOG_TAG, "Initializing Session"); mSession = new Session.Builder(this, apiKey, sessionId).build(); mSession.setSessionListener(this); mSession.setSignalListener(this); mSession.connect(token); }
private void initializeSession(String apiKey, String sessionId, String token) { mSession = new Session.Builder(this, apiKey, sessionId).build(); mSession.setSessionListener(this); mSession.setArchiveListener(this); mSession.connect(token); }
@AfterPermissionGranted(RC_VIDEO_APP_PERM) private void requestPermissions() { String[] perms = {Manifest.permission.INTERNET, Manifest.permission.CAMERA, Manifest.permission.RECORD_AUDIO}; if (EasyPermissions.hasPermissions(this, perms)) { mSession = new Session.Builder(MainActivity.this, OpenTokConfig.API_KEY, OpenTokConfig.SESSION_ID).build(); mSession.setSessionListener(this); mSession.connect(OpenTokConfig.TOKEN); } else { EasyPermissions.requestPermissions(this, getString(R.string.rationale_video_app), RC_VIDEO_APP_PERM, perms); } }
@AfterPermissionGranted(RC_VIDEO_APP_PERM) private void requestPermissions() { String[] perms = { Manifest.permission.INTERNET, Manifest.permission.CAMERA, Manifest.permission.RECORD_AUDIO, Manifest.permission.WRITE_EXTERNAL_STORAGE }; if (EasyPermissions.hasPermissions(this, perms)) { mSession = new Session.Builder(MainActivity.this, OpenTokConfig.API_KEY, OpenTokConfig.SESSION_ID).build(); mSession.setSessionListener(this); mSession.connect(OpenTokConfig.TOKEN); } else { EasyPermissions.requestPermissions(this, getString(R.string.rationale_video_app), RC_VIDEO_APP_PERM, perms); } } @Override