All Projects → AndreiMisiukevich → Opentok Xamarin.forms

AndreiMisiukevich / Opentok Xamarin.forms

Licence: mit
Vonage | TokBox | OpenTok: Video/Audio Chat library for Xamarin.Forms

Projects that are alternatives of or similar to Opentok Xamarin.forms

Mobile.buildtools
The Mobile.BuildTools makes it easier to develop code bases in a clean, consistent, secure, and configurable way. Determine at Build which environment your app needs to run on, and what Client Secrets it should have. Plus many more amazing features!
Stars: ✭ 162 (+107.69%)
Mutual labels:  hacktoberfest, xamarin
32feet
Personal Area Networking for .NET
Stars: ✭ 395 (+406.41%)
Mutual labels:  hacktoberfest, xamarin
Xamarin.forms.mocks
Library for running Xamarin.Forms inside of unit tests
Stars: ✭ 179 (+129.49%)
Mutual labels:  hacktoberfest, xamarin
Skiasharp
SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
Stars: ✭ 2,493 (+3096.15%)
Mutual labels:  hacktoberfest, xamarin
Xamarin.forms
Xamarin.Forms Official Home
Stars: ✭ 5,485 (+6932.05%)
Mutual labels:  hacktoberfest, xamarin
Glidex
glidex.forms is a library using Glide for faster Xamarin.Forms images on Android. Find out more about Glide at https://github.com/bumptech/glide
Stars: ✭ 162 (+107.69%)
Mutual labels:  hacktoberfest, xamarin
Open Source Xamarin Apps
📱 Collaborative List of Open Source Xamarin Apps
Stars: ✭ 318 (+307.69%)
Mutual labels:  hacktoberfest, xamarin
Essentials
Essential cross platform APIs for your mobile apps.
Stars: ✭ 1,344 (+1623.08%)
Mutual labels:  hacktoberfest, xamarin
Uno
Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.
Stars: ✭ 6,029 (+7629.49%)
Mutual labels:  hacktoberfest, xamarin
Net6 Mobile Samples
Xamarin .NET 6 *early* preview. Not for production use.
Stars: ✭ 445 (+470.51%)
Mutual labels:  hacktoberfest, xamarin
Hotreload
Xamarin.Forms XAML hot reload, live reload, live xaml
Stars: ✭ 407 (+421.79%)
Mutual labels:  hacktoberfest, xamarin
Xtoolkit.whitelabel
Modular MVVM framework for fast creating powerful cross-platform applications with Xamarin.
Stars: ✭ 22 (-71.79%)
Mutual labels:  hacktoberfest, xamarin
Reactiveui
An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming. ReactiveUI allows you to abstract mutable state away from your user interfaces, express the idea around a feature in one readable place and improve the testability of your application.
Stars: ✭ 6,709 (+8501.28%)
Mutual labels:  hacktoberfest, xamarin
Uno.ch9
Ch9 - Uno Reference Implementation project
Stars: ✭ 45 (-42.31%)
Mutual labels:  hacktoberfest, xamarin
Lrnotificationobserver
A smarter, simpler, and better way to use NSNotificationCenter with RAII
Stars: ✭ 76 (-2.56%)
Mutual labels:  hacktoberfest
Phpunit Pretty Result Printer
PHPUnit Pretty Result Printer -- make your PHPUnit tests look pretty!
Stars: ✭ 1,208 (+1448.72%)
Mutual labels:  hacktoberfest
Jenkins Infra
Jenkins main control repo for R10k and our Puppet Enterprise managed infrastructure
Stars: ✭ 76 (-2.56%)
Mutual labels:  hacktoberfest
Sitemap Cache Warmer
Visits pages based on a sitemap to keep your cache warm
Stars: ✭ 75 (-3.85%)
Mutual labels:  hacktoberfest
Laravel Schedulable
Schedule and unschedule eloquent models elegantly without cron jobs
Stars: ✭ 78 (+0%)
Mutual labels:  hacktoberfest
Chaostools.jl
Tools for the exploration of chaos and nonlinear dynamics
Stars: ✭ 77 (-1.28%)
Mutual labels:  hacktoberfest

OpenTok for Xamarin.Forms

https://tokbox.com/

Setup

  • Available on NuGet: Xamarin.Forms.OpenTok NuGet
  • Add nuget package to your Xamarin.Forms .netStandard/PCL project and to your platform-specific projects
  • Call PlatformOpenTokService.Init() in platform specific code (Typically it's AppDelegate for iOS and MainActivity for Android)

iOS: Add messages for requesting permissions to Info.plist file

	<key>NSCameraUsageDescription</key>
	<string>use camera to start video call</string>
	<key>NSMicrophoneUsageDescription</key>
	<string>use microphone to start video call</string>

Android: Add permissions to Manifest file

	<uses-permission android:name="android.permission.RECORD_AUDIO" />
	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
	<uses-permission android:name="android.permission.CAMERA" />
	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
	<uses-permission android:name="android.permission.INTERNET" />
	<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />

Setup CrossCurrentActivity plugin in MainActivity:

public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
    protected override void OnCreate(Bundle savedInstanceState)
    {
        TabLayoutResource = Resource.Layout.Tabbar;
        ToolbarResource = Resource.Layout.Toolbar;
        PlatformOpenTokService.Init();
        base.OnCreate(savedInstanceState);
        
        // ==== Add this line ==== //
        CrossCurrentActivity.Current.Activity = this;
	// ==== ............. ==== //

        Forms.Init(this, savedInstanceState);
        LoadApplication(new App());
    }
}
Platform Version
Xamarin.iOS 8.0+
Xamarin.Android 15+

Samples

SAMPLE VIDEO: https://twitter.com/Andrik_Just4Fun/status/1151799321223995392

The sample you can find here: https://github.com/AndreiMisiukevich/OpenTok-Xamarin.Forms/tree/master/Xamarin.Forms.OpenTok.Sample

Use CrossOpenTok.Current for accessing OpenTok service.

Full api you can find here: https://github.com/AndreiMisiukevich/OpenTok-Xamarin.Forms/blob/master/Lib/Xamarin.Forms.OpenTok/Service/IOpenTokService.cs

Firstly you should setup your service

CrossOpenTok.Current.ApiKey = keys.ApiKey; // OpenTok api key from your account
CrossOpenTok.Current.SessionId = keys.SessionId; // Id of session for connecting
CrossOpenTok.Current.UserToken = keys.Token; // User's token

Then check wheather you have enough permissions for starting a call and if everything is fine it will start a session.

if(!CrossOpenTok.Current.TryStartSession())
{
    return;
}
//Session is starting, you may show Chat Page

Use OpenTokPublisherView and OpenTokSubscriberView for showing video from your camera and for recieving video from another chat participant. Just put them to any laouyt as you wish. When session was started, they would recieve video.

<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:tok="clr-namespace:Xamarin.Forms.OpenTok;assembly=Xamarin.Forms.OpenTok"
             x:Class="Xamarin.Forms.OpenTok.Sample.ChatRoomPage"
             BackgroundColor="White">
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="80" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        
        <tok:OpenTokSubscriberView Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" />
        <tok:OpenTokPublisherView Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" />
        
        <Button Text="End Call" TextColor="Red" Grid.Row="2" Grid.Column="0" Clicked="OnEndCall" />
        <Button Text="Message" TextColor="Black" Grid.Row="2" Grid.Column="1" Clicked="OnMessage" />
        <Button Text="Swap Camera" TextColor="Purple" Grid.Row="2" Grid.Column="2" Clicked="OnSwapCamera" />
        
    </Grid>
</ContentPage>

Check source code for more info, 🇧🇾 just ask me =)

License

The MIT License (MIT) see License file

Contribution

Feel free to create issues and PRs 😃

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].