Skip to content

Commit

Permalink
Address build apps feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
JessamyT committed Dec 21, 2024
1 parent b71e1bc commit 86baa6e
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 6 deletions.
Binary file modified assets/build/program/sdks/log-level-info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions docs/operate/control/headless-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ Sharing this information could compromise your system security by allowing unaut
## Write your control script
For API reference including code snippets for each method, see [Viam's Client APIs](/dev/reference/apis/).
{{< expand "Example code for moving a rover in a square" >}}
Expand Down Expand Up @@ -496,7 +495,7 @@ Read and filter a machine's logs to view updates from your machine's `viam-serve

Navigate to the **LOGS** tab of your machine's page in the [Viam app](https://app.viam.com).

Use the **Filter** input to filter the logs by key terms, and select from the **Levels** dropdown menu to filter the logs by warning level:
Select from the **Levels** dropdown menu to filter the logs by severity level:

![Filtering by log level of info in the logs tab of the Viam app.](/build/program/sdks/log-level-info.png)

Expand Down
37 changes: 35 additions & 2 deletions docs/operate/control/mobile-app/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,26 @@ The Flutter SDK includes:
- Widgets to ease the development process
- Authentication tools so users can log in securely

## Example usage
## Install the Flutter SDK

Run the following command in your terminal to install the Viam Flutter SDK:

```sh {id="terminal-prompt" class="command-line" data-prompt="$"}
flutter pub add viam_sdk
```

## Connect to your machine

You can find sample connection code on each machine's **CONNECT** tab in the [Viam app](https://app.viam.com).
Select **Flutter** to display a code snippet with connection code as well as some calls to the APIs of the resources you've configured on your machine.

You can use the toggle to include the machine API key and API key ID, though we strongly recommend storing your API keys in environment variables to reduce the risk of accidentally sharing your API key and granting access to your machines.

## Write your app

Refer to the [Viam Flutter SDK](https://flutter.viam.dev/) documentation for available methods and widgets.

### Example usage

The following code, part of [Drive a rover in a square in 2 minutes](/how-tos/drive-rover/), shows how you could move a robotic rover base in a square using the base API's [`moveStraight`](https://flutter.viam.dev/viam_sdk/Base/moveStraight.html) and [`spin`](https://flutter.viam.dev/viam_sdk/Base/spin.html) methods:

Expand Down Expand Up @@ -66,8 +85,22 @@ For a more in-depth guide with more screens, see the following guide:
{{% card link="/tutorials/control/flutter-app/" %}}
{{< /cards >}}

## Set up authentication
## Test your app

You can use the mobile app simulator on your development computer to test your app.
The connection code will establish communication with your machine over LAN or WAN.

## Set up user authentication

Viam uses [FusionAuth](FusionAuth) for authentication and authorization.

Use the [Viam CLI `auth-app` command](/dev/tools/cli/#auth-app) to register your application with FusionAuth so that you or your users can log into your app with the same credentials they use to log into the [Viam app](https://app.viam.com).

For support building apps with custom login flows, [contact us](mailto:[email protected]).

## Next steps

To publish your app to the app stores when you're done testing and adding authentication, see Flutter's articles:

- [iOS](https://docs.flutter.dev/deployment/ios)
- [Android](https://docs.flutter.dev/deployment/android)
34 changes: 32 additions & 2 deletions docs/operate/control/web-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,46 @@ The TypeScript SDK includes:
- Implementation of the standard component and service APIs to control your hardware and software
- Authentication tools so users can log in securely

## Example usage
## Install the TypeScript SDK

Run the following command in your terminal to install the Viam TypeScript SDK:

```sh {id="terminal-prompt" class="command-line" data-prompt="$"}
npm install @viamrobotics/sdk
```

## Connect to your machine

You can find sample connection code on each machine's **CONNECT** tab in the [Viam app](https://app.viam.com).
Select **TypeScript** to display a code snippet, with connection code as well as some calls to the APIs of the resources you've configured on your machine.

You can use the toggle to include the machine API key and API key ID, though we strongly recommend storing your API keys in environment variables to reduce the risk of accidentally sharing your API key and granting access to your machines.

## Write your app

Refer to the [Viam TypeScript SDK](https://ts.viam.dev/) documentation for available methods.

### Example usage

For an example using Vite to connect to a machine, see [Viam's vanilla TypeScript quickstart example on GitHub](https://github.com/viamrobotics/viam-typescript-sdk/tree/main/examples/vanilla).

The following tutorial uses the Viam TypeScript SDK to query data that has been uploaded to the Viam cloud from a sensor, and display it in a web dashboard.

{{< cards >}}
{{% card link="/tutorials/control/air-quality-fleet/" %}}
{{< /cards >}}

## Set up authentication
## Test your app

You can run your app directly on the machine's single-board computer (SBC) if applicable, or you can run it from a separate computer connected to the internet or to the same local network as your machine's SBC or microcontroller.
The connection code will establish communication with your machine over LAN or WAN.

You can also host your app on a server or hosting service of your choice.

## Set up user authentication

Viam uses [FusionAuth](FusionAuth) for authentication and authorization.

Use the [Viam CLI `auth-app` command](/dev/tools/cli/#auth-app) to register your application with FusionAuth so that you or your users can log into your app with the same credentials they use to log into the [Viam app](https://app.viam.com).

For support building apps with custom login flows, [contact us](mailto:[email protected]).

0 comments on commit 86baa6e

Please sign in to comment.