Skip to content

Commit

Permalink
chore: Release v1.0.1 (#331)
Browse files Browse the repository at this point in the history
chore: Release v1.0.1
  • Loading branch information
iamareebjamal authored May 26, 2019
2 parents c05f4dd + 4f65813 commit a5719b1
Show file tree
Hide file tree
Showing 174 changed files with 6,317 additions and 919 deletions.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a bug report to help us improve

---

**Describe the bug**
<!-- A clear and concise description of what the bug is. -->

**To Reproduce**
<!--Steps to reproduce the behavior-->

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->

**Logs**
<!-- Please add logs in case of any crash or applicable error. -->

**Screenshots**
<!-- If applicable, add screenshots to help explain your problem. -->

**Smartphone Info:**

| | |
|---------------|---|
|Device |<!-- [e.g. Moto G5 Plus] -->|
|Android Version|<!-- [e.g. Oreo 8.1] --> |

**Additional context**
<!-- Add any other context about the problem here. -->

**Would you like to work on the issue?**
<!-- Please let us know if you can work on it or the issue should be assigned to someone else. -->
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/chore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Chore
about: Issues related to docs, workflow, dependency and others

---

**Describe the chore**
<!-- A clear and concise description of what you want to do. -->

**Would you like to work on the issue?**
<!-- Please let us know if you can work on it or the issue should be assigned to someone else. -->
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest a feature for this project

---

**Describe the feature you'd like**
<!-- A clear and concise description of what you want to happen. -->

**Screenshots**
<!-- Add screenshots to provide context or UI mockup. -->

**Additional context**
<!-- Add any other context about the problem here. -->

**Would you like to work on the issue?**
<!-- Please let us know if you can work on it or the issue should be assigned to someone else. -->
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Fixes #[Add issue number here. If you solve the issue entirely, else please change the message e.g. "First steps or Part of for issues #IssueNumber]

Changes: [Add here what changes were made in this issue and if possible provide links.]

Screenshots for the change:
28 changes: 28 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
language: android
sudo: false
jdk:
- oraclejdk8
android:
components:
- tools
- android-28
- build-tools-28.0.3
- platform-tools
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- "${TRAVIS_BUILD_DIR}/gradle/caches/"
- "${TRAVIS_BUILD_DIR}/gradle/wrapper/dists/"
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
install:
- echo yes | ${ANDROID_HOME}/tools/bin/sdkmanager "platforms;android-28"
script:
- ./gradlew spotlessCheck
- ./gradlew build --stacktrace
after_success:
- bash scripts/prep-key.sh
- 'if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then bash scripts/upload-apk.sh; fi'
before_install:
- yes | sdkmanager "platforms;android-28"
70 changes: 70 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
## How to Contribute

### Raising an issue:
This is an Open Source project and we would be happy to see contributors who report bugs and file feature requests submitting pull requests as well.
This project adheres to the Contributor Covenant code of conduct.
By participating, you are expected to uphold this code style.
Please report issues here [Issues - fossasia/badge-magic-android](https://github.com/fossasia/badge-magic-android/issues)

### Branch Policy

#### Sending pull requests:

Go to the repository on github at https://github.com/fossasia/badge-magic-android .

Click the “Fork” button at the top right.

You’ll now have your own copy of the original FOSSASIA repository in your github account.

Open a terminal/shell.

Type

`$ git clone https://github.com/username/badge-magic-android`

where 'username' is your username.

You’ll now have a local copy of your version of the original FOSSASIA repository.

#### Change into that project directory (badge-magic-android):

`$ cd badge-magic-android`

#### Add a connection to the original FOSSASIA repository.

`$ git remote add upstream https://github.com/fossasia/badge-magic-android`

#### To check this remote add set up:

`$ git remote -v`

#### Make changes to files.

`git add` and `git commit` those changes

`git push` them back to github. These will go to your version of the repository.


#### Now Create a PR (Pull Request)

Go to your version of the repository on github.

Click the “New pull Request” button at the top.

Note that your friend’s repository will be on the left and your repository will be on the right.

Click the green button “Create pull request”. Give a succinct and informative title, in the comment field give a short explanation of the changes and click the green button “Create pull request” again.

#### Pulling others’ changes
Before you make further changes to the repository, you should check that your version is up to date relative to FOSSASIA’s version.

Go into the directory for the project and type:

`$ git checkout development`
`$ git pull upstream development --rebase`

This will pull down and merge all of the changes that have been made in the original FOSSASIA repository.

Now push them back to your github repository.

`$ git push origin development`
77 changes: 72 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,76 @@
# BLE LED Name Badge (Android)
# Badge Magic

An Android app to control an LED Name Badge
Magically Create Symbols and Text on LED Name Badges using Bluetooth

![Screenshot](https://raw.githubusercontent.com/Nilhcem/ble-led-name-badge-android/master/preview.jpg)
[![Build Status](https://travis-ci.org/fossasia/badge-magic-android.svg?branch=development)](https://travis-ci.org/fossasia/badge-magic-android)
[![Join the chat at https://gitter.im/fossasia/badge-magic](https://badges.gitter.im/fossasia/badge-magic.svg)](https://gitter.im/fossasia/badge-magic?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

The Badge Magic Android app lets you create scrolling symbols and text on LED name badges through Bluetooth. The app provides options to portray names, clipart and simple animations on LED badges. For the data transfer from the smartphone to the LED badge we use Bluetooth. The project is based on the work of [Nilhcem](https://github.com/Nilhcem).

Blog post:
[http://nilhcem.com/iot/reverse-engineering-bluetooth-led-name-badge](http://nilhcem.com/iot/reverse-engineering-bluetooth-led-name-badge)
<img height="200px" src="https://user-images.githubusercontent.com/11988517/56077705-ee242a00-5dfc-11e9-943c-06fe7e13a57e.png" />

## Download

* Download **[Badge Magic Dev Release here](https://github.com/fossasia/badge-magic-android/blob/apk/badge-magic-dev-release.apk)**
* Download Tested [LED Badge Version here](https://github.com/fossasia/badge-magic-android/blob/apk/LED-badge-dev.apk)

## Permissions
* Bluetooth: For sending data to the badge.
* GPS Location: This has been the standard set by Android for use with Bluetooth Low Energy (BLE) devices. For more information, please read the notes on [Android website](https://source.android.com/devices/bluetooth/ble).

## Communication

Please talk to us on the badge-magic [Gitter channel here](https://gitter.im/fossasia/badge-magic).

## Reverse-Engineering Bluetooth LE Devices

Security in Bluetooth LE devices is optional, and many cheap products you can find on the market are not secured at all. This applies to our Bluetooth LED Badge. While this could lead to some privacy issues, this can also be a source of fun, especially when you want to use an LED Badge in a different way. It also makes it easy for us to get started with the development of a Free and Open Source Android app.

As we understand how the Bluetooth LED badge works, converting a text to multiple byte arrays, we can send using the Bluetooth LE APIs. An indepth blog post about reverse-engineering the Bluetooth community [is here](http://nilhcem.com/iot/reverse-engineering-bluetooth-led-name-badge).

The implementation in the Android app consists of manipulating bits. That may be tricky. A single bit error and nothing will work, plus it will be hard to debug. For those reasons, and since the specs are perfectly clear the reverse engineer Gautier Mechling strongly recommends to start writing unit tests before the code implementation.

## Available Devices

There are a number of devices with Bluetooth on the market. As far as we can tell they are mostly from the same manufacturer. When you get a device ensure it comes with Bluetooth. There are devices that don't support Bluetooth. These are not supported in the app currently.
* Get one from [here](https://sg.pslab.io/product/led-badge/)

## Screenshots

| <!-- --> | <!-- --> | <!-- --> |
|-------------|-------------|-------------|
| <img src="./docs/images/screen-1.png" width="288" /> <img src="./docs/images/screen-1-hard.png" width="288" /> | <img src="./docs/images/screen-2.png" width="288" /> <img src="./docs/images/screen-2-hard.png" width="288" /> | <img src="./docs/images/screen-3.png" width="288" /> <img src="./docs/images/screen-3-hard.png" width="288" /> |
| <!-- --> | <!-- --> | <!-- --> |
| <img src="./docs/images/screen-4.png" width="288" /> <img src="./docs/images/screen-4-hard.png" width="288" /> | <img src="./docs/images/screen-5.png" width="288" /> <img src="./docs/images/screen-5-hard.png" width="288" /> | <img src="./docs/images/screen-6.png" width="288" /> <img src="./docs/images/screen-6-hard.png" width="288" /> |

## Contributions Best Practices

### For first time Contributor

First time contributors can read [CONTRIBUTING.md](CONTRIBUTING.md) file for help regarding creating issues and sending pull requests.

### Branch Policy

We have the following branches

* **development** All development goes on in this branch. If you're making a contribution, you are supposed to make a pull request to _development_. PRs to development branch must pass a build check on Travis CI.
* **master** This contains shipped code. After significant features/bugfixes are accumulated on development, we make a version update and make a release.
* **apk** This branch contains many apk files, that are automatically generated on the merged pull request a) debug apk b) release apk
- There are multiple files in the apk branch of the project, this branch consists of all the APK files and other files that are relevant when an APK is generated.
- Once a pull request is merged, the previous APK branch is deleted and a new APK branch is created.
- If a PR is merged in development branch then the new APKs for the development branch are generated whereas the APKs corresponding to the master branch are not regenerated and simply the previously generated files are added.

### Code practices

Please help us follow the best practice to make it easy for the reviewer as well as the contributor. We want to focus on the code quality more than on managing pull request ethics.

* Single commit per pull request
* For writing commit messages please read the [CommitStyle.md](docs/commitStyle.md) carefully. Kindly adhere to the guidelines.
* Follow uniform design practices. The design language must be consistent throughout the app.
* The pull request will not get merged until and unless the commits are squashed. In case there are multiple commits on the PR, the commit author needs to squash them and not the maintainers cherrypicking and merging squashes.
* If the PR is related to any front end change, please attach relevant screenshots in the pull request description.

### Join the development

* Before you join development, please set up the project on your local machine, run it and go through the application completely. Press on any button you can find and see where it leads to. Explore. (Don't worry ... Nothing will happen to the app or to you due to the exploring :wink: Only thing that will happen is, you'll be more familiar with what is where and might even get some cool ideas on how to improve various aspects of the app.)
* If you would like to work on an issue, drop in a comment at the issue. If it is already assigned to someone, but there is no sign of any work being done, please free to drop in a comment so that the issue can be assigned to you if the previous assignee has dropped it entirely.
75 changes: 61 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,37 +1,84 @@
plugins {
id "com.diffplug.gradle.spotless" version "3.23.0"
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

androidExtensions {
experimental = true
}

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
compileSdkVersion versions.compileSdk
buildToolsVersion versions.buildTools

defaultConfig {
applicationId 'com.nilhcem.blenamebadge'
minSdkVersion 18
targetSdkVersion 27
versionCode 1
versionName '1.0'
applicationId 'org.fossasia.badgemagic'
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk
versionCode 2
versionName '1.0.1'
vectorDrawables.useSupportLibrary = true
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

buildTypes {
release {
minifyEnabled false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

spotless {
kotlin {
ktlint()
target '**/*.kt'
}
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin_version}"

//Moshi
implementation "com.squareup.moshi:moshi-kotlin:${versions.moshi_version}"
kapt "com.squareup.moshi:moshi-kotlin-codegen:${versions.moshi_version}"

//Gif Library
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.16'

implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
//Android X Libraries
implementation 'androidx.appcompat:appcompat:1.1.0-alpha05'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha05'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
//First Party Lifecycle Library
implementation "androidx.lifecycle:lifecycle-extensions:${versions.lifecycle}"
kapt "androidx.lifecycle:lifecycle-compiler:${versions.lifecycle}"

implementation 'com.jakewharton.timber:timber:4.6.0'
//Material Design
implementation 'com.google.android.material:material:1.1.0-alpha06'

implementation 'no.nordicsemi.android.support.v18:scanner:1.0.0'
//Timber
implementation 'com.jakewharton.timber:timber:4.7.1'

implementation 'no.nordicsemi.android.support.v18:scanner:1.4.0'

implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.12'
testImplementation 'com.nhaarman:mockito-kotlin-kt1.1:1.5.0'
testImplementation 'org.amshove.kluent:kluent:1.31'
testImplementation 'org.amshove.kluent:kluent:1.49'

// Leak Canary
debugImplementation "com.squareup.leakcanary:leakcanary-android:${versions.leak_canary}"

//Display third party licenses
implementation 'de.psdev.licensesdialog:licensesdialog:2.0.0'
}
Loading

0 comments on commit a5719b1

Please sign in to comment.