Giter Site home page Giter Site logo

denisroldan / melchord-android Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.89 MB

melCHORD was defined as the ultimate tool for musicians and amateur and professional performers for Android and iOS. It allows the user to search for any artist, and obtaining the tabs and chords for any of their album’s songs. All this work is done by using a client-server architecture and an extensive use of information agents, or softbots, able to analyze existing chords and adapting them to our native apps. Master's Thesis toy-project.

License: Creative Commons Attribution Share Alike 4.0 International

Java 100.00%

melchord-android's Introduction

melChord for Android

All your favourite artists TAB's in the same place. MelChord is the best app for the lazy musicians.

Libraries and tools included:

Requirements

Architecture

This project follows ribot's Android architecture guidelines that are based on MVP (Model View Presenter). Read more about them here.

How to implement a new screen following MVP

Imagine you have to implement a sign in screen.

  1. Create a new package under ui called signin
  2. Create an new Activity called ActivitySignIn. You could also use a Fragment.
  3. Define the view interface that your Activity is going to implement. Create a new interface called SignInMvpView that extends MvpView. Add the methods that you think will be necessary, e.g. showSignInSuccessful()
  4. Create a SignInPresenter class that extends BasePresenter<SignInMvpView>
  5. Implement the methods in SignInPresenter that your Activity requires to perform the necessary actions, e.g. signIn(String email). Once the sign in action finishes you should call getMvpView().showSignInSuccessful().
  6. Create a SignInPresenterTestand write unit tests for signIn(email). Remember to mock the SignInMvpView and also the DataManager.
  7. Make your ActivitySignIn implement SignInMvpView and implement the required methods like showSignInSuccessful()
  8. In your activity, inject a new instance of SignInPresenter and call presenter.attachView(this) from onCreate and presenter.detachView() from onDestroy(). Also, set up a click listener in your button that calls presenter.signIn(email).

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

Distribution

The project can be distributed using either Crashlytics or the Google Play Store.

Play Store

We use the Gradle Play Publisher plugin. Once set up correctly, you will be able to push new builds to the Alpha, Beta or production channels like this

./gradlew publishApkRelease

Read plugin documentation for more info.

Crashlytics

You can also use Fabric's Crashlytics for distributing beta releases. Remember to add your fabric account details to app/src/fabric.properties.

To upload a release build to Crashlytics run:

./gradlew assembleRelease crashlyticsUploadDistributionRelease

New project setup

To quickly start a new project from this boilerplate follow the next steps:

  • Download this repository as a zip.
  • Change the package name.
    • Rename packages in main, androidTest and test using Android Studio.
    • In app/build.gradle file, packageName and testInstrumentationRunner.
    • In src/main/AndroidManifest.xml and src/debug/AndroidManifest.xml.
  • Create a new git repository, see GitHub tutorial.
  • Replace the example code with your app code following the same architecture.
  • In app/build.gradle add the signing config to enable release versions.
  • Add Fabric API key and secret to fabric.properties and uncomment Fabric plugin set up in app/build.gradle
  • Update proguard-rules.pro to keep models (see TODO in file) and add extra rules to file if needed.
  • Update README with information relevant to the new project.
  • Update LICENSE to match the requirements of the new project.

License


	CC-BY-4.0 Attribution-ShareAlike 4.0 International

melchord-android's People

Contributors

alsosj avatar denisroldan avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.