Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ghuntley/telephony
Telephony will be a xplat library that provides email, sms, voice and video call functionality. Supports Xamarin.iOS, Xamarin.Android, Windows Phone 8/8.1 (Silverlight and WPA)
https://github.com/ghuntley/telephony
Last synced: about 2 months ago
JSON representation
Telephony will be a xplat library that provides email, sms, voice and video call functionality. Supports Xamarin.iOS, Xamarin.Android, Windows Phone 8/8.1 (Silverlight and WPA)
- Host: GitHub
- URL: https://github.com/ghuntley/telephony
- Owner: ghuntley
- Created: 2015-03-24T12:06:42.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-01-18T22:50:40.000Z (almost 5 years ago)
- Last Synced: 2024-10-11T23:44:40.180Z (2 months ago)
- Language: C#
- Homepage:
- Size: 1.05 MB
- Stars: 27
- Watchers: 6
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: licenses/.gitkeep
Awesome Lists containing this project
- awesome-xamarin - Telephony ★17 - Email, sms, voice and video call functionality. (XPlat APIs)
README
![](http://i.imgur.com/xsRdz22.png)
# Telephony[![Join the chat at https://gitter.im/ghuntley/telephony](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ghuntley/telephony?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Telephony will be a xplat library that provides email, sms, voice and video call functionality.
# Supported Platforms
* Xamarin.iOS
* Xamarin.Android
* Windows Phone 8/8.1 (Silverlight)
* Windows Phone 8.1 (WPA)# Installation
Installation is done via NuGet:Install-Package Telephony
# UsageWithin your core library:
using Telephony;
using ReactiveUI;
using Conditions;
public ReactiveCommand DialPhoneNumber { get; private set; }
public ReactiveCommand ComposeMessage { get; private set; }
private readonly _telephony;ExampleViewModel(ITelephony telephony)
{
// Cool stuff: Conditions is cross platform portable class library helps
// developers to write pre- and postcondition validations in a fluent
// manner. Usage is completely optional and this is here to act as a
// safety step/tear down the house if you forget to register an
// implementation of the TelephoneyService
Condition.Requires(telephone).IsNotNull();
_telephony = telephony;
// ReactiveUI is completely optional but you totally should be using it
// as once you experience building a mobile application declaratively
// using the Reactive Extensions theres no going back.
DialPhoneNumber = ReactiveCommand.Create();
DialPhoneNumber.Subscribe(phoneNumber =>
{
// This is telephony, choose between either video or voice.
_telephony.MakePhoneCall(phoneNumber);
_telephony.MakeVideoCall(phoneNumber);
});
DialPhoneNumber.ThrownExceptions
.Subscribe(ex => {
UserError.Throw("Is Airplane mode enabled?", ex);
});// ReactiveUI is completely optional but you totally should be using it
// as once you experience building a mobile application declaratively
// using the Reactive Extensions theres no going back.
ComposeMessage = ReactiveCommand.Create();
ComposeMessage.Subscribe(phoneNumber =>
{
// This is telephony, choose between either SMS or email.
_telephony.ComposeSMS(phoneNumber);
_telephony.ComposeEmail(new Email("[email protected], [email protected]"));
});
ComposeMessage.ThrownExceptions
.Subscribe(ex => {
UserError.Throw("Is messaging enabled and are there accounts configured?", ex);
});
}Within the application initialization for each platform:
container.Register(c => new TelephonyService()).As();## With thanks to
* The icon "Telephone" designed by Sven Gabriel from The Noun Project.