-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detect phone & send PTT on/off command
- Loading branch information
Showing
24 changed files
with
515 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Build Android App (apk) | ||
|
||
on: | ||
push: | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code and submodule(s) | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
|
||
# Set Current Date As Env Variable | ||
- name: Set current date as env variable | ||
run: echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | ||
|
||
# Set Repository Name As Env Variable | ||
- name: Set repository name as env variable | ||
run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV | ||
|
||
- name: Set Up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' # See 'Supported distributions' for available options | ||
java-version: '21' | ||
cache: 'gradle' | ||
|
||
- name: Change wrapper permissions | ||
run: chmod +x ./gradlew | ||
|
||
# Run Build Project | ||
- name: Build gradle project | ||
run: ./gradlew build | ||
|
||
# Run Tests Build | ||
- name: Run gradle tests | ||
run: ./gradlew test | ||
|
||
# Create APK Debug | ||
- name: Build apk debug project (APK) | ||
run: ./gradlew assembleDebug | ||
|
||
# Create APK Release | ||
- name: Build apk release project (APK) | ||
run: ./gradlew assembleRelease | ||
|
||
# Upload Artifact Build | ||
# Noted For Output mobile/build/outputs/apk/debug/ | ||
- name: Upload mobile APK Debug - ${{ env.repository_name }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.date_today }} - ${{ env.repository_name }} - mobile - APK(s) debug generated | ||
path: mobile/build/outputs/apk/debug/ | ||
|
||
# Noted For Output mobile/build/outputs/apk/release/ | ||
- name: Upload mobile APK Release - ${{ env.repository_name }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.date_today }} - ${{ env.repository_name }} - mobile - APK(s) release generated | ||
path: mobile/build/outputs/apk/release/ | ||
|
||
# Noted For Output wear/build/outputs/apk/debug/ | ||
- name: Upload wear APK Debug - ${{ env.repository_name }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.date_today }} - ${{ env.repository_name }} - wear - APK(s) debug generated | ||
path: wear/build/outputs/apk/debug/ | ||
|
||
# Noted For Output wear/build/outputs/apk/release/ | ||
- name: Upload wear APK Release - ${{ env.repository_name }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.date_today }} - ${{ env.repository_name }} - wear - APK(s) release generated | ||
path: wear/build/outputs/apk/release/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
*.iml | ||
.gradle | ||
/.gradle | ||
/.idea | ||
/.kotlin | ||
/build | ||
/local.properties | ||
/.idea/caches | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
/.idea/navEditor.xml | ||
/.idea/assetWizardSettings.xml | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
.cxx | ||
local.properties |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Thu Jan 23 19:43:43 PST 2025 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.swooby.phonewearremote | ||
|
||
import kotlin.reflect.KClass | ||
|
||
object Utils { | ||
fun getShortClassName(value: Any?): String { | ||
return when (value) { | ||
is KClass<*> -> value.simpleName ?: "null" | ||
else -> value?.javaClass?.simpleName ?: "null" | ||
} | ||
} | ||
|
||
fun quote(value: Any?, typeOnly: Boolean = false): String { | ||
if (value == null) { | ||
return "null" | ||
} | ||
|
||
if (typeOnly) { | ||
return getShortClassName(value) | ||
} | ||
|
||
if (value is String) { | ||
return "\"$value\"" | ||
} | ||
|
||
if (value is CharSequence) { | ||
return "\"$value\"" | ||
} | ||
|
||
return value.toString() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources | ||
xmlns:tools="http://schemas.android.com/tools" | ||
tools:keep="@array/android_wear_capabilities" | ||
> | ||
<string-array name="android_wear_capabilities"> | ||
<item>verify_remote_example_mobile_app</item> | ||
</string-array> | ||
</resources> |
Oops, something went wrong.