Servant


Source link: https://github.com/Mauin/servant

Servant: Serving you GoogleApiClients so you don't have to worry about them

Servant will create and manage GoogleApiClient from Google Play Services for you so you can focus on the important actions and requests you want to perform with them.

Servant is especially useful if you want to use the GoogleApiClients in a reactive manner with RxJava.

Set-up

To use Servant in your project, add the library as a dependency in your build.gradle file:

dependencies {

  compile 'com.mtramin.servant2:servant:10.2.0.0' 
}

To make it easier to recognize which version of Google Play Services is used Servants version number will always begin with the used Google Play Services version. It is recommended to always use the version of Servant that matches the version of the Google Play Services you use in your application.

MinSdk

This libraries minSdkVersion is 15.

Permissions

Depending on your usage of the GoogleApiClients you might also have to declare some permissions in your AndroidManifest.xml. Remember that from Android Marshmallow (API 23) you will have to support runtime permissions for those

Using Servant

Servant serves you GoogleApiClients in multiple formats:

  • With Actions as callbacks
  • Observable
  • Single
  • Completable

With action Callbacks:

Servant.actions(this, LocationServices.API,

googleApiClient -> Log.e("Servant", "have action client"),

throwable -> Log.e("Servant", "error in action client", throwable) );

Observable client:

Servant.observable(this, LocationServices.API)

.subscribe(

  googleApiClient -> Log.e("Servant", "have observable client"),

  throwable -> Log.e("Servant", "error in observable client", throwable)

);

To use Servant to serve you GoogleApiClients as Single or Completable, simply call

Servant.single(/* implement GoogleApiClientSingle */) Servant.completable(/* implement GoogleApiClientCompletable */)

Dependencies

![Method count](https://img.shields.io/badge/Methods count-core: 130 | deps: 21733-e91e63.svg)

Servant brings the following dependencies:

  • RxJava (v2.x)
  • Google Play Services (base) which provides GoogleApiClient

Due to the Google Play Services dependency also the method count of the library seems quite high. However since you will include Google Play Services in your application either way this does not really affect your method count. Servant only relies on the Google Play Services base package to have as little impact as possible.

In total Servant itself has a method count of below 150 methods.

Bugs and Feedback

For bugs, questions and discussions please use the Github Issues.

LICENSE

Copyright 2016 Marvin Ramin.

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.

Resources

Material style circular progress bar for Android.

This is a UI lib for Android to create buttons with "shining" effects.

Official port of ExoPlayer for Amazon devices.

Sample code for creating a 360 video player on Android. Creates an OpenGL ES scene that renders a sphere textured with video frames from MediaPlayer playback.

An helper to circle reveal/unreveal a view easily, with translations and child animations.

Android Section Adapter allows you to easily create a RecyclerView.Adapter which will automatically sort your data into sections and add a header above each section.

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