Skip to main content

AngularJS - Tables

Table data is normally repeatable by nature. ng-repeat directive can be used to draw table easily.  Following example states the use of ng-repeat directive to draw a table. <table> <tr> <th> Name </th> <th> Marks </th> </tr> <tr ng-repeat = "subject in student.subjects" > <td> {{ subject.name }} </td> <td> {{ subject.marks }} </td> </tr> </table> Table can be styled using CSS Styling. <style> table , th , td { border : 1px solid grey ; border - collapse : collapse ; padding : 5px ; } table tr : nth - child ( odd ) { background - color : #f2f2f2; } table tr : nth - child ( even ) { background - color : #ffffff; } </style> Example Following example will showcase all the above mentioned directive. <html> <head> <

Audio Conference Call Demo (Android) by voxeet

Download Demo Application

Voxeet Android SDK

The SDK is a Java library allowing users to:
  • Create demo/normal conferences
  • Join conferences
  • Change sounds angle and direction for each conference user
  • Broadcast messages to other participants
  • Mute users/conferences
  • If you use External login like O365, LDAP, or custom login to retrieve contact details, it is now possible to also add your contact ID with the display name and the photo urrl avatar. This allows you to ask guest users to introduce themselves and provide their display name and for your authenticated users in your enterprise or for your clients the ID that can be retrieved from O365 (name, department, etc).

Installing the Android SDK using Gradle

To install the SDK directly into your Android project using the Grade build system and an IDE like Android Studio, add the following entry: "compile 'com.voxeet.sdk:core:0.7.750'" to your build.gradle file as shown below:
dependencies {
    compile 'com.voxeet.sdk:core:0.7.750'
}

Recommended settings for API compatibility:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21+
    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 21+
    }
}

Permissions

Add the following permissions to your Android Manifest file:
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
  <uses-permission android:name="android.permission.WAKE_LOCK" />
  <uses-permission android:name="android.permission.BLUETOOTH" />
  <uses-permission android:name="android.permission.RECORD_AUDIO" />

  // Used to change audio routes
  <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
In order to target Android API level 23 or later, you will need to ensure that your application requests runtime permissions for microphone access. To do this, perform the following step:
Request microphone permissions from within your application code:
ActivityCompat.requestPermissions(this,
    new String[]{Manifest.permission.RECORD_AUDIO}, MIC_PERMISSION_REQUEST_CODE);
}
See the Official Android Documentation for more details.

Consumer Key & Secret

Add your consumer key & secret to the xml string file of your application.
 <string name="consumer_key">your consumer key</string>
 <string name="consumer_password">your consumer password</string>

Available methods

Initializing

// To be called from the application class
VoxeetSdk.sdkInitialize(Context context, String consumerKey, String consumerSecret, null);

Creating a demo conference

VoxeetSdk.createDemoConference();

Creating a conference

VoxeetSdk.createConference();

Joining a conference

// Used to join someone's conference otherwise joining is automatic
VoxeetSdk.joinSdkConference(String conferenceId);

Leaving a conference

VoxeetSdk.leaveSdkConference();

Checking if a conference is live

VoxeetSdk.isSdkConferenceLive();

Changing user position

// Change user position using an angle and a distance
// Values for x, y are between : x = [-1, 1] and y = [0, 1]
VoxeetSdk.changePeerPosition(String userId, double x, double y);

Sending message in a conference

// Send messages such as JSON commands...
VoxeetSdk.sendBroadcastMessage(String message);

Getting current conference users

// Get current conference users
VoxeetSdk.sendSdkBroadcast();

Getting microphone state

// Get current conference users
VoxeetSdk.isSdkMuted();

Muting microphone

// Get current conference users
VoxeetSdk.muteSdkConference(boolean mute);

Muting user

// Muting or unmmuting an user depending on the boolean value
VoxeetSdk.muteSdkUser(String userId, boolean mute);

Checking if a user is muted

VoxeetSdk.isSdkUserMuted(String userId);

Getting available audio routes

// Get available audio routes
VoxeetSdk.getSdkAvailableRoutes();

Getting current audio route

VoxeetSdk.currentSdkRoute();

Setting audio route

VoxeetSdk.setSdkoutputRoute(AudioRoute route);

Registering the SDK

// Susbcribe to the SDK events
VoxeetSdk.register(Context context);

Unregistering the SDK

// Unsusbcribe from the SDK events
VoxeetSdk.unregister(Context context);

SDK Initialization

Initialize the SDK in the onCreate() method of your application class:
@Override
public void onCreate() {
    super.onCreate();
    VoxeetSdk.sdkInitialize(this, consumerKey, consumerSecret);
}

Activity Structure

In order to work properly, it is necessary to register and unregister the SDK respectively in the onCreate() and onDestroy() methods of your activity/fragment holding the conference.
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    VoxeetSdk.register(this);  
}

@Override
protected void onDestroy() {
    super.onDestroy();
    VoxeetSdk.unregister(this);  
}   

ConferenceUser Model

ConferenceUser model now has an userInfo object where infos are stored such as the external user id, the url avatar and display name.
public UserInfo getUserInfo();

Events

The SDK will dispatch events to the suscribed classes such as activities and fragments holding the conferences. To get notified, the only necessary step is to add those 4 methods below:

Conference joined

@Subscribe
public void onEvent(final ConferenceJoinedSuccessEvent event) {
    // Action to be called when joining successfully the conference
}

Conference joined error

@Subscribe
public void onEvent(final ConferenceJoinedError event) {
    // Action to be called if joining failed
}

Conference left

@Subscribe
public void onEvent(final ConferenceLeftSuccessEvent event) {
    // Action to be called when leaving successfully the conference
}

Conference left error

@Subscribe
public void onEvent(final ConferenceLeftError event) {
    // Action to be called when leaving the conference failed
}

Participant added

@Subscribe
public void onEvent(final ConferenceUserJoinedEvent event) {
    // Action to be called when a new participant joins the conference
}

Participant status updated

@Subscribe
public void onEvent(final ConferenceUserUpdateEvent event) {
    // Action to be called when a participant has left for example
}

Message received

@Subscribe
public void onEvent(MessageReceived event) {
    // Action to be called when a message is received
}

Best practice regarding conferences

Only one instance of a conference is allowed to be live. Leaving the current conference before creating or joining another one is mandatory. Otherwise, a IllegalStateException will be thrown.

Version

0.7.750

Tech

The Voxeet Android SDK uses a number of open source projects to work properly:
  • Retrofit2 - A type-safe HTTP client for Android and Java.
  • GreenRobot/EventBus - Android optimized event bus.
  • Jackson - Jackson is a suite of data-processing tools for Java.
  • RxAndroid - RxJava is a Java VM implementation of Reactive Extensions: a library for composing asynchronous and event-based programs by using observable sequences.

Comments

Popular posts from this blog

AngularJS - Tables

Table data is normally repeatable by nature. ng-repeat directive can be used to draw table easily.  Following example states the use of ng-repeat directive to draw a table. <table> <tr> <th> Name </th> <th> Marks </th> </tr> <tr ng-repeat = "subject in student.subjects" > <td> {{ subject.name }} </td> <td> {{ subject.marks }} </td> </tr> </table> Table can be styled using CSS Styling. <style> table , th , td { border : 1px solid grey ; border - collapse : collapse ; padding : 5px ; } table tr : nth - child ( odd ) { background - color : #f2f2f2; } table tr : nth - child ( even ) { background - color : #ffffff; } </style> Example Following example will showcase all the above mentioned directive. <html> <head> <

How to Password Protect a Directory on Your Website

Password protecting a directory on your site is actually fairly easy. Webmasters typically want to protect a directory if they have information that they want to make available only to a selected number of people. This guide teaches how you can make a folder on  your website  accessible only to people with the appropriate password. If Your Web Host Has a Control Panel Before you dive into the task of manually password-protecting a directory using Apache's built-in facilities, you might want to check out your web host's control panel to see if they already provide the facility for protecting directories. In my experience, many commercial web hosts already provide an easy way for you to password-protect your directories. If such facility is already available, it's probably best to use it since it will save you time, particularly if you are not familiar with shell command lines and editing of .htaccess files. Otherwise, read on. System Requirements You wi

Apple iOS 10.2 Is Now Available: What Is Included In The Update?

Apple has released iOS 10.2 to the general public today. The last time that Apple launched an iOS update was on October 31st with iOS 10.1.1. On that same day, Apple released the developer preview of iOS 10.2. To work out the kinks, Apple iOS 10.2 went through seven beta tests before the public release. This update includes several major features and many bug fixes. You can install iOS 10.2 by connecting your device to iTunes or downloading it by going to  Settings > General > Software Update . The iOS 10.2 update is available for the following devices: iPhone 5 and later, iPad 4th generation and later and iPod touch 6th generation and later. What Is Included In The Update? iOS 10.2 has several features worth pointing out: - New TV App Apple released a new TV app that provides recommendations for new movies and TV shows in the "Watch Now" section and to discover new apps and new iTunes releases in the "Store" section. The "Up Next"