The official ribot app for android. It follows the architecture, tools and guidelines that we use when developing for the Android platform (https://github.com/ribot/android-guidelines)
The ribot app is an internal project based off of our Android Boilerplate. It was created to make us aware of our fellow ribots locations. Currently, the app allows you to:
- Sign in - Sign in using your @ribot.co.uk Google account
- Auto Check-in - Using Estimote beacons, the app will automatically check you in at your corresponding location in the ribot studio
- Manual Check-in - Manually check yourself in at your current location
- Team listing - View a list of ribots and their current check-in status
We've open sourced this to both showcase our efforts and allow you to recreate the experience in your own workplace - why not fork this project and give it a go?
The libraries and tools used include:
- Support library
- RecyclerViews and CardViews
- RxJava and RxAndroid
- Retrofit and OkHttp
- Dagger 2
- Estimote Android SDK
- SqlBrite
- EasyAdapter
- Butterknife
- [Timber] (https://github.com/JakeWharton/timber)
- Picasso
- Otto event bus
- Espresso
- Robolectric
- Mockito
- Checkstyle, PMD and Findbugs for code analysis
- Android SDK.
- Android 6.0 (API 23) .
- Android SDK Tools
- Android SDK Build tools 23.0.1
- Android Support Repository
In order to run this project, you'll need to setup several things beforehand:
-
Our application uses the ribot API to handle data requests, you'll need to clone this and configure it to your requirements. This application will not work without an API and the implementation in this repository requires the use of an @ribot.co.uk email address, so your own API is required if you wish to clone this project.
-
You'll need to set the values found in the gradle.properties file. This involves the web application client id (
ribotAppGoogleApiServerClientId
) and debug/release keystore locations, aliases and passwords. Ideally theUNDEFINED
values found in this file should be defined in the Globalgradle.properties
that lives in~/.gradle/gradle.properties
This project follows our Android architecture guidelines. Read more about them here.
This project integrates a combination of unit tests, functional test and code analysis tools.
To run unit tests on your machine:
./gradlew test
To run functional tests on connected devices:
./gradlew connectedAndroidTest
Note: For Android Studio to use syntax highlighting for Automated tests and Unit tests you must switch the Build Variant to the desired mode.
The following code analysis tools are set up on this project:
- PMD: It finds common programming flaws like unused variables, empty catch blocks, unnecessary object creation, and so forth. See this project's PMD ruleset.
./gradlew pmd
- Findbugs: This tool uses static analysis to find bugs in Java code. Unlike PMD, it uses compiled Java bytecode instead of source code.
./gradlew findbugs
- Checkstyle: It ensures that the code style follows our Android code guidelines. See our checkstyle config file.
./gradlew checkstyle
To ensure that your code is valid and stable use check:
./gradlew check
This will run all the code analysis tools and unit tests in the following order:
Copyright 2015 Ribot Ltd.
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.