Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug Report
about: Report a bug to help us improve
title: "[BUG] "
labels: bug
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Device Info:**

- Android Version: [e.g. API 33 ]
- Device Manufacturer [e.g. Samsung, Google]
- Bluetooth Device: [ e.g. esp32 microcontroller, HC-05 bluetooth module ]

**Additional context**
Add any other context about the problem here.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Feature Request
about: Suggest an new idea for this project
title: "[FEAT] "
labels: enhancement
assignees: ''
---

**Is your feature request related to a problem or this is a new thing? Please describe.**
A clear and concise description of what the problem is or why this new feature is important

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Additional context**
Add any other context or screenshots about the feature request here.
25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Pull Request
about: Propose changes for review and merge
---

## Description

Please include a summary of the change and which issue is fixed or feature is added.
List any dependencies that are required for this change.

Mention the issues it closes #ISSUE_NUMBER_HERE (e.g., Closes #123)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as
expected)
- [ ] This change requires a documentation update

## Screenshots (if applicable)

---
26 changes: 26 additions & 0 deletions .github/workflows/android_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Android Build CI

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Grant execute permission to gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew assembleDebug --stacktrace
127 changes: 127 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or advances of
any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address,
without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[mail](mailto://[email protected]).
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the
[Contributor Covenant](https://www.contributor-covenant.org/), version 2.1,
available at
<https://www.contributor-covenant.org/version/2/1/code_of_conduct/>.

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/inclusion).

For answers to common questions about this code of conduct, see the FAQ at
<https://www.contributor-covenant.org/faq/>. Translations are available at
<https://www.contributor-covenant.org/translations/>.
72 changes: 72 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Contributing to BTAndroidApp

Contributions are welcome to `BTAndroidApp` project!
Your help is invaluable in making this app better for everyone. To ensure a smooth and effective
collaboration, please follow these guidelines carefully.

---

## Our Contribution Workflow

To maintain project quality and coordination, we follow a specific workflow for contributions:

1. **Open an Issue First:**
* Before starting any work, please **always open an issue** to discuss the bug, feature, or
change you intend to work on.
* This step is crucial for ensuring that the work aligns with project goals and avoids duplicate
efforts.

2. **Discuss the Issue:**
* We will discuss the issue with you to clarify requirements, approach, and feasibility.
* Please participate actively in the discussion on the issue tracker.

3. **Wait for Approval to Work:**
* Only after we have discussed the issue and explicitly ask you to proceed with implementing
a solution, should you start coding.
* This ensures that your valuable time is spent on features or fixes that the project needs and
approves.

4. **Create a Dedicated Branch:**
* Once approved to work, please create a new branch from `main` using one of the following
conventions:
* For new features: `feat/<descriptive_feature_name>`
* For bug fixes: `bug/<bug-decription>`

---

## General Guidelines

- **Code of Conduct:** Please review and adhere to our [Code of Conduct](CODE_OF_CONDUCT.md) in all
your interactions within this project.
- **Pull Requests:**
- When submitting your code, please
use [Pull Request Template](/.github/PULL_REQUEST_TEMPLATE.md) and fill it out completely.
- Link your pull request to the issue you worked on (e.g., `Closes #123`).
- Be prepared for constructive feedback during the review process.

## Setting up the Development Environment

If you're unsure how to get the project running locally, here are the basic steps:

1. **Prerequisites:**
* Java Development Kit (JDK) 17 or higher.
* Android Studio (latest stable version recommended).
* Android SDK Platform 34 (or the target API level of the app).

2. **Clone the repository:**
```bash
git clone https://github.com/tuuhin/BTAndroidApp.git
cd BTAndroidApp
```

3. **Open in Android Studio:**
Open the cloned project in Android Studio. Android Studio should guide you through syncing Gradle
files and downloading dependencies.

4. **Build and Run:**
Ensure the project builds successfully (`./gradlew assembleDebug`) and runs on an emulator or
physical device.

---

Thank you for your understanding and for contributing to the `BTAndroidApp`!
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Tuhin Bhowmick

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,8 @@ an [issue](https://github.com/tuuhin/BTAndroidApp/issues/new)

### :man_cook: Contributing

Contributions are alaways welcomed from the community

- Fork the repository.
- Create your feature branch (git checkout -b feature/YourFeature).
- Commit your changes (git commit -am 'Add some feature').
- Push to the branch (git push origin feature/YourFeature).
- Create a new Pull Request.
We welcome contributions to the `BTAndroidApp` project! Please take a moment to review
our [Contribution Guidelines](CONTRIBUTING.md) before submitting pull requests or issues.

## :end: Conclusiion

Expand Down
13 changes: 8 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,21 @@ android {
}

signingConfigs {

// find if there is a properties file
val keySecretFile = rootProject.file("keystore.properties")
if (keySecretFile.exists()) return@signingConfigs
if (!keySecretFile.exists()) return@signingConfigs

// load the properties
val properties = Properties()
keySecretFile.inputStream().use { properties.load(it) }

val userHome = System.getProperty("user.home")
val storeFileName = properties.getProperty("STORE_FILE_NAME")

val keyStorePath = System.getenv("user.home")
val keyStoreFolder = File(keyStorePath, "keystore")
val keyStoreFile = File(keyStoreFolder, storeFileName)
val keyStoreFolder = File(userHome, "keystore")
if (!keyStoreFolder.exists()) return@signingConfigs

val keyStoreFile = File(keyStoreFolder, storeFileName)
if (!keyStoreFile.exists()) return@signingConfigs

create("release") {
Expand Down