Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AugmentOS_Main and AugmentOS_Manager #143

Open
wants to merge 28 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
dc9b857
begin_augmentos
alex1115alex Sep 9, 2024
595bfa3
Merge branch 'main' into start_augmentos
nic-olo Sep 11, 2024
112e203
bidirectional data works, starting llsg port
alex1115alex Sep 15, 2024
3f2453d
Merge branch 'start_augmentos' of github.com:TeamOpenSmartGlasses/Dis…
alex1115alex Sep 15, 2024
eb6e532
llsg kinda works
alex1115alex Sep 15, 2024
f26bccf
* Begin adding SGMLib intent system to AugmentOS_Main
alex1115alex Oct 13, 2024
e3001b6
Merge starter cloud TPA code
alex1115alex Oct 13, 2024
be616af
Cherry pick these changes from older PR
alex1115alex Oct 13, 2024
9a8676a
jelly star temp fix
alex1115alex Oct 16, 2024
6247175
pairing works
alex1115alex Oct 18, 2024
0d7b7fa
break up
alex1115alex Oct 18, 2024
bc27f72
AugmentOSMainStatusProvider
alex1115alex Oct 20, 2024
ccc7463
Each side can send
alex1115alex Oct 21, 2024
cc6dec2
Add info for gsm, wifi, app package name, and puck charging status
alex1115alex Oct 21, 2024
35302f2
Callback system for AOS_Main BLE Commands. Can parse some commands, a…
alex1115alex Oct 21, 2024
e0ab878
Implement AugmentOS Manager UI features
DDev16 Nov 3, 2024
b683676
Big TPA progress
alex1115alex Nov 3, 2024
c2be8db
Big TPA progress
alex1115alex Nov 3, 2024
e28f7f9
example edge app
alex1115alex Nov 3, 2024
78bebe4
Remove example_augmentos_edge_app folder and subrepo
alex1115alex Nov 3, 2024
981997f
recommit demo app
alex1115alex Nov 3, 2024
390f2d7
Merge remote-tracking branch 'origin/dev' into start_augmentos_2
alex1115alex Nov 3, 2024
f114467
Merge pull request #144 from DDev16/augmentos-manager-ui
alex1115alex Nov 3, 2024
d43bca6
Removed gradient from the last card, fixed title sizing
DDev16 Nov 3, 2024
df97483
TPA WORKING
alex1115alex Nov 4, 2024
dd65d11
augmentos status gets wifi gsm and battery, also smartglasses data
alex1115alex Nov 4, 2024
e33b520
Merge pull request #145 from DDev16/augmentos-manager-ui
alex1115alex Nov 4, 2024
6d9dee2
Merge branch 'start_augmentos_2' of github.com:TeamOpenSmartGlasses/D…
alex1115alex Nov 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions AugmentOS_Manager/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: '@react-native',
};
Empty file.
110 changes: 110 additions & 0 deletions AugmentOS_Manager/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# React Native

# Node modules
/node_modules/

# Logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
expo-debug.log*

# React Native Packager
*.pack
*.bundle

# Metro Bundler cache
/metro-cache/
.cache/

# Temporary files
/tmp/
temp/

# Build directories
/android/app/build/
/android/.gradle/
/ios/build/
/ios/Pods/
!ios/Podfile.lock
/ios/DerivedData/

# Xcode
*.xcworkspace
*.xcuserstate
*.moved-aside
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserdatad/
*.xcscmblueprint

# Android Studio
/.idea/
*.iml
.gradle/
/local.properties
/.cxx/
.externalNativeBuild
.cxx/

# Fastlane
/fastlane/report.xml
/fastlane/Preview.html
/fastlane/screenshots/
/fastlane/test_output/
*.log

# Buck
/buck-out/
/\.buckd/
/.buckconfig.local

# CocoaPods
# Uncomment if you have CocoaPods dependencies checked in
# /Pods/

# Expo
.expo/
.expo-shared/

# Miscellaneous
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
*.swp
*.swo
*.swn
*.tmp
*.temp
*.log
*.lock
.vscode/
.idea/
*.sublime-project
*.sublime-workspace

# TypeScript
*.tsbuildinfo

# Optional npm cache directory
.npm/

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Storybook
/storybook-static/

# Misc
*.pem
*.key
*.crt
7 changes: 7 additions & 0 deletions AugmentOS_Manager/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
arrowParens: 'avoid',
bracketSameLine: true,
bracketSpacing: false,
singleQuote: true,
trailingComma: 'all',
};
1 change: 1 addition & 0 deletions AugmentOS_Manager/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
8 changes: 8 additions & 0 deletions AugmentOS_Manager/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"

# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
Binary file added AugmentOS_Manager/README.md
Binary file not shown.
17 changes: 17 additions & 0 deletions AugmentOS_Manager/__tests__/App.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* @format
*/

import 'react-native';
import React from 'react';
import App from '../App';

// Note: import explicitly to use the types shipped with jest.
import {it} from '@jest/globals';

// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';

it('renders correctly', () => {
renderer.create(<App />);
});
101 changes: 101 additions & 0 deletions AugmentOS_Manager/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"

/**
* This is the configuration block to customize your React Native Android app.
* By default you don't need to apply any configuration, just uncomment the lines you need.
*/
react {
// This ensures that autolinking works for libraries in your project
autolinkLibrariesWithApp()
}

/**
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
def enableProguardInReleaseBuilds = false

/**
* The preferred build flavor of JavaScriptCore (JSC)
*/
def jscFlavor = 'org.webkit:android-jsc:+'

/**
* Disable Hermes by setting it to false.
*/
def hermesEnabled = false // Set Hermes to false

android {
ndkVersion rootProject.ext.ndkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion

namespace "com.augmentos_manager"
defaultConfig {
applicationId "com.augmentos_manager"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
multiDexEnabled true // Add this if your app exceeds 64K method limit
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
packagingOptions {
pickFirst '**/libjsc.so'
pickFirst '**/libc++_shared.so'
}
}

dependencies {
// React Native core dependencies
implementation("com.facebook.react:react-android")

// Hermes disabled, so only JSC is used
implementation jscFlavor

// Add react-native dependencies
implementation project(':react-native-vector-icons')
implementation project(':react-native-screens')
implementation project(':react-native-reanimated')
implementation project(':react-native-gesture-handler')
implementation project(':react-native-safe-area-context')
implementation project(':react-native-ble-manager')
implementation project(':react-native-linear-gradient')

// Kotlin dependencies
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"

// Support libraries
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.core:core-ktx:1.12.0'
}

// Include custom vector icons fonts from react-native-vector-icons
project.ext.vectoricons = [
iconFontNames: [ 'AntDesign.ttf', 'Entypo.ttf', 'EvilIcons.ttf', 'Feather.ttf', 'FontAwesome.ttf', 'FontAwesome5_Brands.ttf', 'FontAwesome5_Regular.ttf', 'FontAwesome5_Solid.ttf', 'Foundation.ttf', 'Ionicons.ttf', 'MaterialIcons.ttf', 'MaterialCommunityIcons.ttf', 'SimpleLineIcons.ttf', 'Octicons.ttf', 'Zocial.ttf' ]
]

project.ext.react = [
enableHermes: false // Disable Hermes for troubleshooting
]


apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
10 changes: 10 additions & 0 deletions AugmentOS_Manager/android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:
9 changes: 9 additions & 0 deletions AugmentOS_Manager/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<application
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning"/>
</manifest>
36 changes: 36 additions & 0 deletions AugmentOS_Manager/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />



<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme"
android:supportsRtl="true">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// android/app/src/main/java/com/augmentos_manager/IntentSenderModule.kt

package com.augmentos_manager // Replace with your actual package name

import android.content.Intent
import android.content.ComponentName
import android.util.Log
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.bridge.ReactContextBaseJavaModule
import com.facebook.react.bridge.ReactMethod
import org.json.JSONObject

class IntentSenderModule(private val reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {

companion object {
private const val TAG = "IntentSenderModule"
private const val TARGET_PACKAGE = "com.teamopensmartglasses.augmentosmain"
private const val TARGET_CLASS = "com.teamopensmartglasses.augmentosmain.MainActivity" // Replace with actual class if different
private const val ACTION_SEND_JSON = "com.augmentos_manager.ACTION_SEND_JSON" // Define a custom action
}

override fun getName(): String {
return "IntentSender"
}

@ReactMethod
fun sendIntent(jsonPayload: String) {
try {
val jsonObject = JSONObject(jsonPayload)
val intent = Intent().apply {
component = ComponentName(TARGET_PACKAGE, TARGET_CLASS)
action = ACTION_SEND_JSON
putExtra("payload", jsonObject.toString())
flags = Intent.FLAG_ACTIVITY_NEW_TASK
}
reactContext.startActivity(intent)
Log.d(TAG, "Intent sent successfully.")
} catch (e: Exception) {
Log.e(TAG, "Error sending intent: ${e.message}")
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// android/app/src/main/java/com/augmentos_manager/IntentSenderPackage.kt

package com.augmentos_manager // Replace with your actual package name

import com.facebook.react.ReactPackage
import com.facebook.react.bridge.NativeModule
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.uimanager.ViewManager

class IntentSenderPackage : ReactPackage {
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
return listOf(IntentSenderModule(reactContext))
}

override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
return emptyList()
}
}
Loading