Skip to content

Commit

Permalink
chore: release 1.6.0 (#548)
Browse files Browse the repository at this point in the history
chore: release 1.6.0
  • Loading branch information
iamareebjamal authored Dec 14, 2019
2 parents fe86fb4 + 3a5eb07 commit 80c8924
Show file tree
Hide file tree
Showing 76 changed files with 448 additions and 303 deletions.
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ jdk:
android:
components:
- tools
- android-28
- build-tools-28.0.3
- android-29
- build-tools-29.0.2
- platform-tools
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
bundler : true
directories:
- "${TRAVIS_BUILD_DIR}/gradle/caches/"
- "${TRAVIS_BUILD_DIR}/gradle/wrapper/dists/"
Expand All @@ -23,6 +24,7 @@ install:

before_script:
- bash scripts/prep-key.sh
- bash scripts/check-screenshots.sh

script:
- ./gradlew spotlessCheck
Expand All @@ -35,8 +37,10 @@ deploy:
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^(master|development)$
repo: fossasia/badge-magic-android
- provider: script
skip_cleanup: true
script: bash scripts/upload-gh-pages.sh
on:
all_branches: true
all_branches: true
repo: fossasia/badge-magic-android
71 changes: 31 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,51 @@
<img height="200px" src="./docs/images/app_icon.png" align="right" />

# Badge Magic [![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)
# Badge Magic
[![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)

**Magically Create Symbols and Text on LED Name Badges using Bluetooth**
**Magically Create Text and Draw Cliparts on LED Name Badges using Bluetooth**

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).
The Badge Magic Android app lets you create moving text and draw cliparts for to LED name badges. The app provides options to portray names, cliparts and simple animations on the badges. For the data transfer from the smartphone to the LED badge it uses Bluetooth. The project is based on the work of [Nilhcem](https://github.com/Nilhcem).

<table align='right'>
<tr>
<a href='https://play.google.com/store/apps/details?id=org.fossasia.badgemagic'><img align='center' height='55' src='./docs/images/google_play_badge.png'></a>
</tr>
<tr>
<a href='https://f-droid.org/en/packages/org.fossasia.badgemagic/'><img align='center' alt='Get it on F-Droid' src='./docs/images/fdroid_badge.png' height="55"/></a>
</tr>
</table>
<a href='https://play.google.com/store/apps/details?id=org.fossasia.badgemagic'><img align='center' height='55' src='./docs/images/google_play_badge.png'></a>
<a href='https://f-droid.org/en/packages/org.fossasia.badgemagic/'><img align='center' alt='Get it on F-Droid' src='./docs/images/fdroid_badge.png' height="55"/></a>

## 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)
* [Latest Release Build](https://github.com/fossasia/badge-magic-android/raw/apk/badge-magic-master-release.apk) in the apk branch
* [Latest Development Build](https://github.com/fossasia/badge-magic-android/raw/apk/badge-magic-development-release.apk) in the apk branch

## 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).
* **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).
* **Storage**: For storing and saving badges.

## 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/)
* Get one from the [FOSSASIA Shop here](https://fossasia.com/product/led-badge/)

## Screenshots

| <!-- --> | <!-- --> | <!-- --> |
|-------------|-------------|-------------|
| <img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/screen-1.png" width="288" /> <img src="./docs/images/screen-1-hard.png" width="288" /> | <img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/screen-2.png" width="288" /> <img src="./docs/images/screen-2-hard.png" width="288" /> | <img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/screen-3.png" width="288" /> <img src="./docs/images/screen-3-hard.png" width="288" /> |
| <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="./fastlane/metadata/android/en-US/images/phoneScreenshots/screen-4.png" width="288" /> <img src="./docs/images/screen-4-hard.png" width="288" /> | <img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/screen-5.png" width="288" /> <img src="./docs/images/screen-5-hard.png" width="288" /> | <img src="./fastlane/metadata/android/en-US/images/phoneScreenshots/screen-6.png" width="288" /> <img src="./docs/images/screen-6-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
## Reverse-Engineering Bluetooth LE Devices

### For first time Contributor
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.

First time contributors can read [CONTRIBUTING.md](CONTRIBUTING.md) file for help regarding creating issues and sending pull requests.
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).

### Branch Policy
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.

## Branch Policy

We have the following branches

Expand All @@ -66,17 +56,18 @@ We have the following branches
- 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
## Contributions Best 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.
Please read FOSSASIA's [Best Practices](https://blog.fossasia.org/open-source-developer-guide-and-best-practices-at-fossasia/) before contributing. 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. Here are some basics:

* 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.
* Single commit per pull request
* For writing commit messages please read the [CommitStyle.md](docs/commitStyle.md).
* 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.
* 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.
* 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 and start working on it.

### Join the development
## LICENSE

* 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.
The application is licensed under the [Apache License 2.0](/LICENSE). Copyright is owned by FOSSASIA and its contributors.
16 changes: 8 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "com.diffplug.gradle.spotless" version "3.24.1"
id "com.diffplug.gradle.spotless" version "3.26.1"
}
apply plugin: "com.github.b3er.local.properties"
apply plugin: 'com.android.application'
Expand All @@ -23,8 +23,8 @@ android {
applicationId 'org.fossasia.badgemagic'
minSdkVersion versions.minSdk
targetSdkVersion versions.targetSdk
versionCode 7
versionName '1.5.0'
versionCode 8
versionName '1.6.0'
vectorDrawables.useSupportLibrary = true
}

Expand Down Expand Up @@ -84,26 +84,26 @@ dependencies {
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.16'

//Android X Libraries
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.recyclerview:recyclerview:1.1.0-beta02'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

// Koin AndroidX
implementation "org.koin:koin-androidx-viewmodel:${versions.koin_version}"

//Material Design
implementation 'com.google.android.material:material:1.1.0-alpha09'
implementation 'com.google.android.material:material:1.1.0-beta01'

//Timber
implementation 'com.jakewharton.timber:timber:4.7.1'

implementation 'no.nordicsemi.android.support.v18:scanner:1.4.2'
implementation 'no.nordicsemi.android.support.v18:scanner:1.4.3'

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.53'
testImplementation 'org.amshove.kluent:kluent:1.58'

// Leak Canary
debugImplementation "com.squareup.leakcanary:leakcanary-android:${versions.leak_canary}"
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

<uses-feature android:name="android.hardware.bluetooth_le" />
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<uses-feature android:name="android.hardware.location.gps" />

Expand All @@ -20,6 +20,7 @@
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.fossasia.badgemagic.adapter

import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import org.fossasia.badgemagic.R
import org.fossasia.badgemagic.data.DrawableInfo
import org.fossasia.badgemagic.ui.DrawerActivity
Expand Down Expand Up @@ -49,4 +49,4 @@ class DrawableAdapter : RecyclerView.Adapter<DrawableItemHolder>() {

interface OnDrawableSelected {
fun onSelected(selectedItem: DrawableInfo)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.graphics.drawable.VectorDrawable
import android.view.View
import android.widget.ImageView
import android.widget.LinearLayout
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import org.fossasia.badgemagic.R
import org.fossasia.badgemagic.data.DrawableInfo
Expand All @@ -23,10 +24,10 @@ class DrawableItemHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
else if (drawableInfo.image is BitmapDrawable)
image.setImageBitmap(ImageUtils.trim(drawableInfo.image.bitmap, 80))

image.setColorFilter(itemView.context.resources.getColor(android.R.color.black))
image.setColorFilter(ContextCompat.getColor(itemView.context, android.R.color.black))

card.setOnClickListener {
listener?.onSelected(drawableInfo)
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.fossasia.badgemagic.adapter

import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import org.fossasia.badgemagic.R
import org.fossasia.badgemagic.data.ModeInfo

Expand Down Expand Up @@ -45,4 +45,4 @@ class ModeAdapter : RecyclerView.Adapter<ModeItemHolder>() {

interface OnModeSelected {
fun onSelected(position: Int)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.view.View
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import org.fossasia.badgemagic.R
import org.fossasia.badgemagic.data.ModeInfo
Expand All @@ -25,19 +26,19 @@ class ModeItemHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {

when (itemPosition == modeSelectedPosition) {
true -> {
card.background = itemView.context.resources.getDrawable(R.color.colorAccent)
title.setTextColor(itemView.context.resources.getColor(android.R.color.white))
image.setColorFilter(itemView.context.resources.getColor(android.R.color.white))
card.background = ContextCompat.getDrawable(itemView.context, R.color.colorAccent)
title.setTextColor(ContextCompat.getColor(itemView.context, android.R.color.white))
image.setColorFilter(ContextCompat.getColor(itemView.context, android.R.color.white))
}
false -> {
card.background = itemView.context.resources.getDrawable(android.R.color.transparent)
title.setTextColor(itemView.context.resources.getColor(android.R.color.black))
image.setColorFilter(itemView.context.resources.getColor(android.R.color.black))
card.background = ContextCompat.getDrawable(itemView.context, android.R.color.transparent)
title.setTextColor(ContextCompat.getColor(itemView.context, android.R.color.black))
image.setColorFilter(ContextCompat.getColor(itemView.context, android.R.color.black))
}
}

card.setOnClickListener {
listener?.onSelected(itemPosition)
}
}
}
}
Loading

0 comments on commit 80c8924

Please sign in to comment.