ribot-app-android - Android平台的ribot studio app

jopen 8年前

ribot app Android

这是ribot的官方Android App。It follows the architecture, tools and guidelines that we use when developing for the Android platform (https://github.com/ribot/android-guidelines)

Screenshots 

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?

Libraries

The libraries and tools used include:

Requirements

Build Instructions

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 the UNDEFINED values found in this file should be defined in the Global gradle.properties that lives in ~/.gradle/gradle.properties

Architecture

This project follows our Android architecture guidelines. Read more about them here.

Code Quality

This project integrates a combination of unit tests, functional test and code analysis tools.

Tests

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.

Code Analysis tools

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
./gradlew checkstyle

The check task

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:

Check Diagram

项目地址: https://github.com/ribot/ribot-app-android