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

Add React Native App Websocket Audio #256

Merged
merged 20 commits into from
May 3, 2024
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,7 @@ cython_debug/
_.aifs
software/output_audio.wav
.DS_Store

# ignore node modules and .expo files
node_modules/
.expo/
13 changes: 0 additions & 13 deletions software/source/clients/ios/README.md

This file was deleted.

22 changes: 0 additions & 22 deletions software/source/clients/ios/react-native/App.tsx

This file was deleted.

171 changes: 0 additions & 171 deletions software/source/clients/ios/react-native/src/screens/Main.tsx

This file was deleted.

32 changes: 32 additions & 0 deletions software/source/clients/mobile/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# iOS/Android Client

**_WORK IN PROGRESS_**

This repository contains the source code for the 01 iOS/Android app. Work in progress, we will continue to improve this application to get it working properly.

Feel free to improve this and make a pull request!

If you want to run it on your own, you will need to install Expo Go on your mobile device.

## Setup Instructions

Follow the **[software setup steps](https://github.com/OpenInterpreter/01?tab=readme-ov-file#software)** in the main repo's README first before you read this

```shell
cd software/source/clients/mobile/react-native # cd into `react-native`
npm install # install dependencies
npx expo start # start local development server
```

In **Expo Go** select _Scan QR code_ to scan the QR code produced by the `npx expo start` command

## Using the App

```shell
cd software # cd into `software`
poetry run 01 --mobile # exposes QR code for 01 Light server
```

In the app, select _Scan Code_ to scan the QR code produced by the `poetry run 01 --mobile` command

Press and hold the button to speak, release to make the request. To rescan the QR code, swipe left on the screen to go back.
31 changes: 31 additions & 0 deletions software/source/clients/mobile/react-native/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import * as React from "react";
import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import HomeScreen from "./src/screens/HomeScreen";
import CameraScreen from "./src/screens/Camera";
import Main from "./src/screens/Main";
import { StatusBar } from "expo-status-bar";

const Stack = createNativeStackNavigator();

function App() {
return (
<>
<StatusBar style="light" />
<NavigationContainer>
<Stack.Navigator
initialRouteName="Home"
screenOptions={{
headerShown: false, // This hides the navigation bar globally
}}
>
<Stack.Screen name="Home" component={HomeScreen} />
<Stack.Screen name="Camera" component={CameraScreen} />
<Stack.Screen name="Main" component={Main} />
</Stack.Navigator>
</NavigationContainer>
</>
);
}

export default App;
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading