/amazon-fling

Amazon Fling

Primary LanguageObjective-CMIT LicenseMIT

amazon-fling

Amazon Fling

Easily integrate the Amazon Fling SDK to discover and control your FireTV in your app. This SDK is not open source and is owned by Amazon. This repo is used to integrate the AmazonFling SDK to iOS projects using Cocoapods.

Platform License

Example

Import AmazonFling and start using the SDK:

#import <AmazonFling/DiscoveryController.h>
#import <AmazonFling/RemoteMediaPlayer.h>
#import <AmazonFling/MediaPlayerStatus.h>

@implementation AppDelegate
...
- (void)applicationDidBecomeActive:(UIApplication *)application {
    id myViewController = [self findViewController];
    [myViewController resume];
}
...
@implementation ViewController
...
- (void)viewDidLoad {
...
    mController = [[DiscoveryController alloc] init];
    [mController searchPlayerWithId : @"amzn.thin.pl" andListener : self];
}

- (void)resume {
    [mController resume];
}

- (void)deviceDiscovered:(id<RemoteMediaPlayer>)device {
    [mDevices addObject:device];
    // Update UI
}

- (void)deviceLost:(id<RemoteMediaPlayer>)device {
    [mDevices removeObject:device];
    // Update UI
}

- (void)discoveryFailure {
}

Requirements

You need to install git lfs because the Amazon Fling binary is too large for a normal git repository. You can do this via Homebrew using brew install git-lfs. For more information visit Git LFS.

Changelog

Amazon Fling SDK Release Notes

License

AmazonFling is available under the MIT license. See the LICENSE file for more info.