kickflip-android-sdk

Kickflip Android SDK - Live Video Streaming to the Cloud

  • 所有者: Kickflip/kickflip-android-sdk
  • 平台:
  • 许可证: Apache License 2.0
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

Kickflip SDK for Android Download

kickflip live broadcast screenshot

The Kickflip Android SDK manages all the plumbing for your cloud video application. With this SDK you can broadcast Live, High Definition HTTP-HLS video, associate these broadcasts with users, and query broadcasts made by your users. All you need is a Kickflip.io account.

The Kickflip Android SDK requires Android 4.3+ (API 18+).

Check out our Android example application on Github or Google Play (below).
Google Play link

Also check out our slick iOS SDK and iOS Example application

Features

  • High Definition HTTP Live Streaming
  • Background recording
  • OpenGL video effects
  • Pinch Zoom
  • Blazing fast, geo-aware upstreams
  • Global cloud-based Content Distribution Network

Quickstart

  1. Make a kickflip.io account to register an Application and receive your Client Key and Client Secret. You'll need these later.

  2. Ensure the minSdkVersion of your application is 18 (Android 4.3) and the compileSdkVersion is 19 (Android 4.4).

    android {
        compileSdkVersion 19
        ...
        defaultConfig {
            minSdkVersion 18
            targetSdkVersion 19
            ...
        }
        ...
    }
    
  3. Add Kickflip to your app as a Maven artifact or, if you plan to modify Kickflip, as a submodule. build.gradle:

    Maven Artifact:

    //build.gradle
    ...
    dependencies {
    	compile 'io.kickflip:sdk:1.3.1'
    }
    

    Git Submodule:
    First add Kickflip as a submodule with git.

    $ cd ./path/to/project
    $ git submodule add https://github.com/Kickflip/kickflip-android-sdk.git ./submodules/kickflip-android-sdk/
    

    Next, add the submodule as a gradle dependency

    //settings.gradle
    include ':app'
    include ':submodules:kickflip-android-sdk:sdk'
    
    //your app module's build.gradle
    ...
    dependencies {
        ...
        compile project(':submodules:kickflip-android-sdk:sdk')
    }
    
  4. Add the following to your app's AndroidManifest.xml:

    Permissions (Optional: These will be automatically merged into your AndroidManifest.xml)

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

    BroadcastActivity

    <activity
         android:name="io.kickflip.sdk.activity.BroadcastActivity"
         android:screenOrientation="landscape">
    </activity>
    

    MediaPlayerActivity (Optional)

    MediaPlayerActivity handles playing HLS streams with some additional features over Android's MediaPlayer (like indicating when a stream is "Live" and more accurately inferring the stream duration).

    <activity
            android:name="io.kickflip.sdk.activity.MediaPlayerActivity"
            android:screenOrientation="landscape" >
    </activity>
    
  5. Provide your Kickflip keys and start BroadcastActivity when appropriate:

    Kickflip.setup(this, CLIENT_ID, CLIENT_SECRET);
    Kickflip.startBroadcastActivity(this, new BroadcastListener() {
        @Override
        public void onBroadcastStart() {
    
        }
    
        @Override
        public void onBroadcastLive(Stream stream) {
            Log.i(TAG, "BroadcastLive @ " + stream.getKickflipUrl());
        }
    
        @Override
        public void onBroadcastStop() {
    
        }
    
        @Override
        public void onBroadcastError() {
    
        }
    });
    

BroadcastActivity provides a pre-built UI including a camera preview and controls for starting, stopping, and sharing the broadcast.

Building

  1. Define the Android SDK root location as $ANDROID_HOME in your environment. It's also a good idea to add the platform-tools and tools directories to your path so you can easily access common Android utilities, like adb.

An example on Mac OS X using Android Studio:

# ~/.bash_profile

# Android
export ANDROID_HOME="/Applications/Android Studio.app/sdk"
export PATH=$ANDROID_HOME"/tools":$ANDROID_HOME"/platform-tools":$PATH
  1. From this directory run:

     $ ./gradlew assembleDebug
    

The Kickflip SDK .aar will be in ./sdk/build/libs.

You may also import this project into Android Studio for easy development.

Documentation

For a closer look at what you do with Kickflip, check out our Android Documentation and Android API Reference. We also have some tutorials to help you get started.

License

Apache 2.0

Copyright 2014 OpenWatch, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

主要指标

概览
名称与所有者Kickflip/kickflip-android-sdk
主编程语言Java
编程语言Java (语言数: 2)
平台
许可证Apache License 2.0
所有者活动
创建于2014-01-21 21:58:27
推送于2020-10-01 16:08:42
最后一次提交2015-05-26 14:27:54
发布数3
最新版本名称1.3 (发布于 2015-05-18 11:01:50)
第一版名称v0.9.9 (发布于 2014-04-10 23:14:48)
用户参与
星数658
关注者数78
派生数209
提交数159
已启用问题?
问题数62
打开的问题数31
拉请求数3
打开的拉请求数2
关闭的拉请求数1
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?