Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit 91ccf48

Browse files
committed
Initial Commit
0 parents  commit 91ccf48

Some content is hidden

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

62 files changed

+1162
-0
lines changed

.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx
15+
local.properties

.idea/.gitignore

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.name

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/deploymentTargetDropDown.xml

+17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/deploymentTargetSelector.xml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

+21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/migrations.xml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

+17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 TeamOpenSmartGlasses
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# SmartGlassesExampleAugmentosApp
2+
3+
This is an app that listens to your conversations via the microphone and fact checks spoken statements in real-time using ChatGPT.
4+
5+
[![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/QdCHqAbLw-g/0.jpg)](https://www.youtube.com/watch?v=QdCHqAbLw-g)
6+
7+
## Installation
8+
9+
- Install the [SmartGlassesManager](https://github.com/TeamOpenSmartGlasses/SmartGlassesManager) on your phone and make sure it's running
10+
- Build this app in Android Studio and install it on your Android smartphone
11+
- You'll need the SmartGlassesManager repo's folder to be next to this repo's folder (or manually set the relative path to AugmentOSLib in gradle settings)
12+
- Launch this app and enter your [OpenAI key](https://platform.openai.com/account/api-keys).
13+
14+
## Usage
15+
16+
* Launch this app via the [SmartGlassesManager](https://github.com/TeamOpenSmartGlasses/SmartGlassesManager)
17+
- Do this by saying: ("Hey computer, fact checker")
18+
19+
## TODO
20+
21+
* Add checkbox to enable/disable statements that ChatGPT is unsure of (currently default: disabled)
22+
23+
## Contributing
24+
25+
If you would like to contribute to this project, please fork the repository and submit a pull request. We welcome contributions of all kinds, including bug fixes, feature requests, and code improvements.
26+
27+
Before submitting a pull request, please make sure that your code adheres to the project's coding standards, and that all tests pass.
28+
29+
## License
30+
31+
This project is licensed under the MIT License. See the LICENSE file for details.

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/.idea/.gitignore

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/.idea/gradle.xml

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/.idea/misc.xml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
plugins {
2+
id 'com.android.application'
3+
}
4+
5+
android {
6+
namespace 'com.teamopensourcesmartglasses.example_augmentos_app'
7+
compileSdk 33
8+
9+
defaultConfig {
10+
applicationId "com.teamopensourcesmartglasses.example_augmentos_app"
11+
minSdk 30
12+
targetSdk 33
13+
versionCode 1
14+
versionName "1.0"
15+
16+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17+
}
18+
19+
buildTypes {
20+
release {
21+
minifyEnabled false
22+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23+
}
24+
}
25+
compileOptions {
26+
sourceCompatibility JavaVersion.VERSION_1_8
27+
targetCompatibility JavaVersion.VERSION_1_8
28+
}
29+
buildFeatures {
30+
viewBinding true
31+
}
32+
}
33+
34+
dependencies {
35+
36+
implementation 'androidx.appcompat:appcompat:1.6.1'
37+
implementation 'com.google.android.material:material:1.8.0'
38+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
39+
implementation 'androidx.navigation:navigation-fragment:2.5.3'
40+
implementation 'androidx.navigation:navigation-ui:2.5.3'
41+
testImplementation 'junit:junit:4.13.2'
42+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
43+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
44+
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
45+
46+
implementation project(path: ':AugmentOSLib')
47+
48+
implementation("org.greenrobot:eventbus:3.3.1")
49+
50+
implementation 'io.reactivex.rxjava3:rxandroid:3.0.2'
51+
// Because RxAndroid releases are few and far between, it is recommended you also
52+
// explicitly depend on RxJava's latest version for bug fixes and new features.
53+
// (see https://github.com/ReactiveX/RxJava/releases for latest 3.x.x version)
54+
implementation 'io.reactivex.rxjava3:rxjava:3.1.5'
55+
56+
implementation 'com.theokanning.openai-gpt3-java:service:0.12.0'
57+
}

app/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.teamopensourcesmartglasses.example_augmentos_app;
2+
3+
import android.content.Context;
4+
5+
import androidx.test.platform.app.InstrumentationRegistry;
6+
import androidx.test.ext.junit.runners.AndroidJUnit4;
7+
8+
import org.junit.Test;
9+
import org.junit.runner.RunWith;
10+
11+
import static org.junit.Assert.*;
12+
13+
/**
14+
* Instrumented test, which will execute on an Android device.
15+
*
16+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
17+
*/
18+
@RunWith(AndroidJUnit4.class)
19+
public class ExampleInstrumentedTest {
20+
@Test
21+
public void useAppContext() {
22+
// Context of the app under test.
23+
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24+
assertEquals("com.teamopensourcesmartglasses.chatgpt", appContext.getPackageName());
25+
}
26+
}

app/src/main/AndroidManifest.xml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
5+
<uses-permission android:name="android.permission.INTERNET" />
6+
7+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
8+
9+
<application
10+
android:allowBackup="true"
11+
android:dataExtractionRules="@xml/data_extraction_rules"
12+
android:fullBackupContent="@xml/backup_rules"
13+
android:icon="@mipmap/ic_launcher"
14+
android:label="@string/app_name"
15+
android:supportsRtl="true"
16+
android:theme="@style/Theme.ExampleAugmentosApp"
17+
tools:targetApi="31">
18+
<activity
19+
android:name=".MainActivity"
20+
android:exported="true"
21+
android:label="@string/app_name"
22+
android:theme="@style/Theme.ExampleAugmentosApp.NoActionBar">
23+
<intent-filter>
24+
<action android:name="android.intent.action.MAIN" />
25+
<category android:name="android.intent.category.LAUNCHER" />
26+
</intent-filter>
27+
</activity>
28+
29+
<service android:name="com.teamopensourcesmartglasses.example_augmentos_app.ExampleAugmentosAppService"
30+
android:exported="true">
31+
32+
<!-- Required intent filter to communicate with AugmentOS -->
33+
<intent-filter>
34+
<action android:name="AUGMENTOS_INTENT" />
35+
</intent-filter>
36+
37+
<!-- Metadata to identify this as an AugmentOS TPA -->
38+
<meta-data android:name="com.augmentos.TPA" android:value="true" />
39+
</service>
40+
41+
</application>
42+
43+
</manifest>
8.47 KB
Loading

0 commit comments

Comments
 (0)