Skip to content

Commit 80c8924

Browse files
chore: release 1.6.0 (#548)
chore: release 1.6.0
2 parents fe86fb4 + 3a5eb07 commit 80c8924

File tree

76 files changed

+448
-303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+448
-303
lines changed

.travis.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ jdk:
66
android:
77
components:
88
- tools
9-
- android-28
10-
- build-tools-28.0.3
9+
- android-29
10+
- build-tools-29.0.2
1111
- platform-tools
1212
before_cache:
1313
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
1414
cache:
15+
bundler : true
1516
directories:
1617
- "${TRAVIS_BUILD_DIR}/gradle/caches/"
1718
- "${TRAVIS_BUILD_DIR}/gradle/wrapper/dists/"
@@ -23,6 +24,7 @@ install:
2324

2425
before_script:
2526
- bash scripts/prep-key.sh
27+
- bash scripts/check-screenshots.sh
2628

2729
script:
2830
- ./gradlew spotlessCheck
@@ -35,8 +37,10 @@ deploy:
3537
on:
3638
all_branches: true
3739
condition: $TRAVIS_BRANCH =~ ^(master|development)$
40+
repo: fossasia/badge-magic-android
3841
- provider: script
3942
skip_cleanup: true
4043
script: bash scripts/upload-gh-pages.sh
4144
on:
42-
all_branches: true
45+
all_branches: true
46+
repo: fossasia/badge-magic-android

README.md

Lines changed: 31 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,51 @@
11
<img height="200px" src="./docs/images/app_icon.png" align="right" />
22

3-
# 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)
3+
# Badge Magic
4+
[![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)
45

5-
**Magically Create Symbols and Text on LED Name Badges using Bluetooth**
6+
**Magically Create Text and Draw Cliparts on LED Name Badges using Bluetooth**
67

7-
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).
8+
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).
89

9-
<table align='right'>
10-
<tr>
11-
<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>
12-
</tr>
13-
<tr>
14-
<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>
15-
</tr>
16-
</table>
10+
<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>
11+
<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>
1712

1813
## Download
1914

20-
* Download **[Badge Magic Dev Release here](https://github.com/fossasia/badge-magic-android/blob/apk/badge-magic-dev-release.apk)**
21-
* Download Tested [LED Badge Version here](https://github.com/fossasia/badge-magic-android/blob/apk/LED-badge-dev.apk)
15+
* [Latest Release Build](https://github.com/fossasia/badge-magic-android/raw/apk/badge-magic-master-release.apk) in the apk branch
16+
* [Latest Development Build](https://github.com/fossasia/badge-magic-android/raw/apk/badge-magic-development-release.apk) in the apk branch
2217

2318
## Permissions
24-
* Bluetooth: For sending data to the badge.
25-
* 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).
19+
* **Bluetooth**: For sending data to the badge.
20+
* **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).
21+
* **Storage**: For storing and saving badges.
2622

2723
## Communication
2824

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

31-
## Reverse-Engineering Bluetooth LE Devices
32-
33-
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.
34-
35-
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).
36-
37-
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.
38-
3927
## Available Devices
4028

4129
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.
42-
* Get one from [here](https://sg.pslab.io/product/led-badge/)
30+
* Get one from the [FOSSASIA Shop here](https://fossasia.com/product/led-badge/)
4331

4432
## Screenshots
4533

4634
| <!-- --> | <!-- --> | <!-- --> |
4735
|-------------|-------------|-------------|
48-
| <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" /> |
36+
| <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" /> |
4937
| <!-- --> | <!-- --> | <!-- --> |
50-
| <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" /> |
38+
| <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" /> |
5139

52-
## Contributions Best Practices
40+
## Reverse-Engineering Bluetooth LE Devices
5341

54-
### For first time Contributor
42+
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.
5543

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

58-
### Branch Policy
46+
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.
47+
48+
## Branch Policy
5949

6050
We have the following branches
6151

@@ -66,17 +56,18 @@ We have the following branches
6656
- Once a pull request is merged, the previous APK branch is deleted and a new APK branch is created.
6757
- 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.
6858

69-
### Code practices
59+
## Contributions Best Practices
7060

71-
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.
61+
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:
7262

73-
* Single commit per pull request
74-
* For writing commit messages please read the [CommitStyle.md](docs/commitStyle.md) carefully. Kindly adhere to the guidelines.
75-
* Follow uniform design practices. The design language must be consistent throughout the app.
76-
* 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.
77-
* If the PR is related to any front end change, please attach relevant screenshots in the pull request description.
63+
* Single commit per pull request
64+
* For writing commit messages please read the [CommitStyle.md](docs/commitStyle.md).
65+
* Follow uniform design practices. The design language must be consistent throughout the app.
66+
* 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.
67+
* If the PR is related to any front end change, please attach relevant screenshots in the pull request description.
68+
* 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.
69+
* 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.
7870

79-
### Join the development
71+
## LICENSE
8072

81-
* 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.)
82-
* 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.
73+
The application is licensed under the [Apache License 2.0](/LICENSE). Copyright is owned by FOSSASIA and its contributors.

app/build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id "com.diffplug.gradle.spotless" version "3.24.1"
2+
id "com.diffplug.gradle.spotless" version "3.26.1"
33
}
44
apply plugin: "com.github.b3er.local.properties"
55
apply plugin: 'com.android.application'
@@ -23,8 +23,8 @@ android {
2323
applicationId 'org.fossasia.badgemagic'
2424
minSdkVersion versions.minSdk
2525
targetSdkVersion versions.targetSdk
26-
versionCode 7
27-
versionName '1.5.0'
26+
versionCode 8
27+
versionName '1.6.0'
2828
vectorDrawables.useSupportLibrary = true
2929
}
3030

@@ -84,26 +84,26 @@ dependencies {
8484
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.16'
8585

8686
//Android X Libraries
87-
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
88-
implementation 'androidx.recyclerview:recyclerview:1.1.0-beta02'
87+
implementation 'androidx.appcompat:appcompat:1.1.0'
88+
implementation 'androidx.recyclerview:recyclerview:1.1.0'
8989
implementation 'androidx.cardview:cardview:1.0.0'
9090
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
9191

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

9595
//Material Design
96-
implementation 'com.google.android.material:material:1.1.0-alpha09'
96+
implementation 'com.google.android.material:material:1.1.0-beta01'
9797

9898
//Timber
9999
implementation 'com.jakewharton.timber:timber:4.7.1'
100100

101-
implementation 'no.nordicsemi.android.support.v18:scanner:1.4.2'
101+
implementation 'no.nordicsemi.android.support.v18:scanner:1.4.3'
102102

103103
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
104104
testImplementation 'junit:junit:4.12'
105105
testImplementation 'com.nhaarman:mockito-kotlin-kt1.1:1.5.0'
106-
testImplementation 'org.amshove.kluent:kluent:1.53'
106+
testImplementation 'org.amshove.kluent:kluent:1.58'
107107

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

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
<uses-permission android:name="android.permission.BLUETOOTH" />
77
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
88

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

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

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

@@ -20,6 +20,7 @@
2020
android:allowBackup="true"
2121
android:icon="@mipmap/ic_launcher"
2222
android:label="@string/app_name"
23+
android:requestLegacyExternalStorage="true"
2324
android:roundIcon="@mipmap/ic_launcher_round"
2425
android:supportsRtl="true"
2526
android:theme="@style/AppTheme">

app/src/main/java/org/fossasia/badgemagic/adapter/DrawableAdapter.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package org.fossasia.badgemagic.adapter
22

3-
import androidx.recyclerview.widget.RecyclerView
43
import android.view.LayoutInflater
54
import android.view.ViewGroup
5+
import androidx.recyclerview.widget.RecyclerView
66
import org.fossasia.badgemagic.R
77
import org.fossasia.badgemagic.data.DrawableInfo
88
import org.fossasia.badgemagic.ui.DrawerActivity
@@ -49,4 +49,4 @@ class DrawableAdapter : RecyclerView.Adapter<DrawableItemHolder>() {
4949

5050
interface OnDrawableSelected {
5151
fun onSelected(selectedItem: DrawableInfo)
52-
}
52+
}

app/src/main/java/org/fossasia/badgemagic/adapter/DrawableItemHolder.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import android.graphics.drawable.VectorDrawable
55
import android.view.View
66
import android.widget.ImageView
77
import android.widget.LinearLayout
8+
import androidx.core.content.ContextCompat
89
import androidx.recyclerview.widget.RecyclerView
910
import org.fossasia.badgemagic.R
1011
import org.fossasia.badgemagic.data.DrawableInfo
@@ -23,10 +24,10 @@ class DrawableItemHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
2324
else if (drawableInfo.image is BitmapDrawable)
2425
image.setImageBitmap(ImageUtils.trim(drawableInfo.image.bitmap, 80))
2526

26-
image.setColorFilter(itemView.context.resources.getColor(android.R.color.black))
27+
image.setColorFilter(ContextCompat.getColor(itemView.context, android.R.color.black))
2728

2829
card.setOnClickListener {
2930
listener?.onSelected(drawableInfo)
3031
}
3132
}
32-
}
33+
}

app/src/main/java/org/fossasia/badgemagic/adapter/ModeAdapter.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package org.fossasia.badgemagic.adapter
22

3-
import androidx.recyclerview.widget.RecyclerView
43
import android.view.LayoutInflater
54
import android.view.ViewGroup
5+
import androidx.recyclerview.widget.RecyclerView
66
import org.fossasia.badgemagic.R
77
import org.fossasia.badgemagic.data.ModeInfo
88

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

4646
interface OnModeSelected {
4747
fun onSelected(position: Int)
48-
}
48+
}

app/src/main/java/org/fossasia/badgemagic/adapter/ModeItemHolder.kt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import android.view.View
44
import android.widget.ImageView
55
import android.widget.LinearLayout
66
import android.widget.TextView
7+
import androidx.core.content.ContextCompat
78
import androidx.recyclerview.widget.RecyclerView
89
import org.fossasia.badgemagic.R
910
import org.fossasia.badgemagic.data.ModeInfo
@@ -25,19 +26,19 @@ class ModeItemHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
2526

2627
when (itemPosition == modeSelectedPosition) {
2728
true -> {
28-
card.background = itemView.context.resources.getDrawable(R.color.colorAccent)
29-
title.setTextColor(itemView.context.resources.getColor(android.R.color.white))
30-
image.setColorFilter(itemView.context.resources.getColor(android.R.color.white))
29+
card.background = ContextCompat.getDrawable(itemView.context, R.color.colorAccent)
30+
title.setTextColor(ContextCompat.getColor(itemView.context, android.R.color.white))
31+
image.setColorFilter(ContextCompat.getColor(itemView.context, android.R.color.white))
3132
}
3233
false -> {
33-
card.background = itemView.context.resources.getDrawable(android.R.color.transparent)
34-
title.setTextColor(itemView.context.resources.getColor(android.R.color.black))
35-
image.setColorFilter(itemView.context.resources.getColor(android.R.color.black))
34+
card.background = ContextCompat.getDrawable(itemView.context, android.R.color.transparent)
35+
title.setTextColor(ContextCompat.getColor(itemView.context, android.R.color.black))
36+
image.setColorFilter(ContextCompat.getColor(itemView.context, android.R.color.black))
3637
}
3738
}
3839

3940
card.setOnClickListener {
4041
listener?.onSelected(itemPosition)
4142
}
4243
}
43-
}
44+
}

0 commit comments

Comments
 (0)