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> <...

10 Reasons That Makes Magento The Dominating eCommerce Platform in 2018

In eCommerce market, for marketers, manufacturers and consumer 2017 was a great year, and it seems to be growing in 2018 as well. Every passing year shows tremendous growth in e-commerce sale that helps to take the business to new levels of success. The world's greatest brands love  Magento  for its adaptability since the present shoppers and their purchasing designs are changing incrementally. Just Magento — open source and nimble — can enable you to adjust and flourish. With a worldwide biological community of 150,000 engineers and a system of 300+ profoundly prepared arrangement accomplices, Magento helps your online deals while expanding gross edges. Magento organizations offer more at a lower TCO than dealers on aggressive trade stages. Maintaining an e-commerce business isn't a simple undertaking and expects you to put steady endeavors and to strategize to build up a solid web nearness that encourages you to give an upper hand. Wh...

Best eCommerce Platform – Magento or OpenCart?

Looking for Best eCommerce Platform? Business people who are remaining on the precarious edge of beginning their new eCommerce wander all have the same inquiry to confront with sooner or later in time: Best eCommerce Platform? Which eCommerce stage would it be advisable for me to begin my online business? Clearly, When it comes to eCommerce, there is nobody size-fits-all arrangement. There are different strategies and devices that can bring fulfilling results, at the end of the day it relies on upon a couple of fundamental choices that should be made in advance, for example, the span of your online store, your outline inclinations, SEO and probability, and obviously, your financial plan. In this article, we are going to concentrate on two noteworthy rivals in the eCommerce market, Magento Vs. Opencart, and investigate their components and choices to help you choose which one of them (assuming any) is a good fit for you. Before we begin to look at between the two, it ought to ...