cwac-mediarouter


Source link: https://github.com/commonsguy/cwac-mediarouter

CWAC-MediaRouter: Going Where Google Declined To Go, For Some Reason...

NOTE: This project has been discontinued, as it is no longer practical to backport the entirety of mediarouter-v7.

This project offers a port of the mediarouter-v7 Android library project, to work with native API Level 11+ fragments and the action bar. While mediarouter-v7 requires you to use appcompat-v7 and the fragments backport, this project eliminates those requirements.

Note that this library was substantially extended in version 0.2.0 to be a complete cross-port of mediarouter-v7. Formerly, it only contained MediaRouteActionProvider and a few related support classes.

Installation

This project is available as an artifact for use with Gradle. To use that, add the following blocks to your build.gradle file:

repositories {

  maven {

url "https://s3.amazonaws.com/repo.commonsware.com"
  
}
 
}
  dependencies {

  compile 'com.commonsware.cwac:mediarouter:0.2.+' 
}

Or, if you cannot use SSL, use http://repo.commonsware.com for the repository URL.

Eclipse users will need to clone this repository, import the mediarouter/ project into the Eclipse workspace, then attach that project as an Android library project to the app (Project > Properties > Android).

If you elect to clone this repo, or download a ZIP of this repo, and use it as a source-based library project, you will need to add your own copy of the android-support-v13.jar to your copy of libs/ in the library project, as it is not supplied.

Usage

Basically, everywhere you see android.support.v7.app or android.support.v7.media classes from mediarouter-v7, replace them with com.commonsware.cwac.mediarouter.app and com.commonsware.cwac.mediarouter.media equivalents. And, of course, rather than using appcompat-v7 and ActionBarActivity, or using the fragments backport, you would use the native action bar and native fragments implementations.

Note that your menu resources and such will need to reference com.commonsware.cwac.mediarouter.app.MediaRouteActionProvider rather than android.support.v7.app.MediaRouteActionProvider. Menu resources should also use the regular android:actionProviderClass attribute for specifying this class, rather than the alternative required by appcompat (e.g., app:actionProviderClass).

Upgrading From 0.1.x to 0.2.0

If you were using the 0.1.x implementation of this library, please note that:

  • You will need to change your class references, in menu resources and imports. Formerly, you would have used com.commonsware.cwac.mediarouter as the package for classes like MediaRouteActionProvider. Those classes all moved into the com.commonsware.cwac.mediarouter.app package, to better match the rest of mediarouter-v7.

  • You should remove your dependency on mediarouter-v7. This, in turn, will require you to change your references to all mediarouter-v7 classes to their counterparts in this library. For example, import android.support.v7.media.MediaRouter; becomes import com.commonsware.cwac.mediarouter.media.MediaRouter;

Dependencies

This project depends upon support-v13 and support-annotations from the Android Support Pacakge. It does not depend upon mediarouter-v7 or appcompat-v7.

The minimum supported SDK for this library is API Level 14. If you want to support older devices, you should be using appcompat-v7 and the fragments backport anyway.

Version

This is version v0.2.0 of this module, meaning it is a wee bit more than a proof of concept, but not by all that much.

Demo

There are two sample projects, demo/ and demo-remoteplayback/, that illustrate the use of this library. The first one just shows the MediaRouteActionProvider and shows you the route when it changes. The second one demonstrates the currently-flaky RemotePlaybackClient class, for playing back media on a device like a Chromecast.

License

The code in this project is licensed under the Apache Software License 2.0, per the terms of the included LICENSE file. Most of the library's code is licensed this way by Google; the changes made to that code to implement the port are licensed this way by CommonsWare.

Questions

If you have questions regarding the use of this code, please post a question on StackOverflow tagged with commonsware and android. Be sure to indicate what CWAC module you are having issues with, and be sure to include source code and stack traces if you are encountering crashes.

If you have encountered what is clearly a bug, or if you have a feature request, please post an issue. Be certain to include complete steps for reproducing the issue.

Do not ask for help via Twitter.

Also, if you plan on hacking on the code with an eye for contributing something back, please open an issue that we can use for discussing implementation details. Just lobbing a pull request over the fence may work, but it may not.

Release Notes

  • v0.2.0: overhaul to eliminate mediarouter-v7 dependency
  • v0.1.4: updated for Android Studio 1.0 and new AAR publishing system
  • v0.1.3: removed unused resources
  • v0.1.2: added cwac- JAR prefix, updated Gradle for Android plugin and dependencies, tightened up manifest
  • v0.1.1: removed android-support-v4.jar from libs/ to improve Gradle compatibility
  • v0.1.0: initial release

##Who Made This?

Resources

TokenAutoComplete is a Android Gmail style token auto-complete text field and filter. It's designed to have an extremely simple API to make it easy for anyone to implement this functionality while still exposing enough customization to let you make it awesome.

openpgp-api-lib provides methods to execute OpenPGP operations, such as sign, encrypt, decrypt, verify, and more without user interaction from background threads. This is done by connecting your client application to a remote service provided by OpenKeychain or other OpenPGP providers.

Auth0Client is a Gradle based Android library, to let developers have a basic Auth0 API.

This library is compatible from API 7 (Android 2.1).

EditText component for Android that can show password with new a concept. Press on eye to show hidden password.

PullToDismissPager is an Android Open Source Library for showing ViewPager in similar way that Facebook app does in its Friend Request Section. This library is based on awesome AndroidSlidingUpPanel library.

The open picker is the fastest way to get files from OneDrive and OneDrive for Business into your Android app. OneDrive-Picker-Android provides a set of Java APIs that your app can use to browse, select, and download files stored in your user's OneDrive.

You can also get shareable links to files - great for sending to friends, coworkers, and relatives. The open picker also lets your app get thumbnails of image and video files so you don't have to build them yourself.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes