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

connectivity test app: android #74

Merged
merged 7 commits into from
Oct 2, 2023

Conversation

daniellacosse
Copy link
Contributor

@daniellacosse daniellacosse commented Sep 14, 2023

image

@daniellacosse daniellacosse marked this pull request as ready for review September 29, 2023 19:25
@daniellacosse daniellacosse changed the title [WIP] connectivity test app - android connectivity test app: android Sep 29, 2023
@fortuna fortuna requested a review from jyyi1 September 29, 2023 20:47
Copy link
Contributor

@fortuna fortuna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very exciting. I love the screenshot. Here are some minor things

x/examples/outline-connectivity-app/README.md Outdated Show resolved Hide resolved
@fortuna fortuna self-requested a review September 29, 2023 20:57
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(":capacitor-cordova-android-plugins")
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0"
implementation files('../../../shared_backend/output/SharedBackend.aar')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to add a comment calling out that you had to add this line. I imagine all the rest was auto generated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess? Any dependencies we add we'll need to add to this file, it's standard android development.

@@ -17,5 +17,8 @@ import { defineConfig } from "vite";
export default defineConfig({
build: {
outDir: './output/frontend',
},
server: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this port used? Do you need to hardcode the port? What if there's a service there, will the app not work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The server is for local development only - in production the web assets are bundled directly into the app.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per above, bind it to localhost here too. The default is probably all IPs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

appName: "@outline_sdk_connectivity_demo/app_mobile",
webDir: "output/frontend",
server: {
url: "http://10.0.2.2:3000"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it need a local network address?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The server is for local development only - in production the web assets are bundled directly into the app.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's bind to localhost, so it doesn't risk external access. That's a security vulnerability for the developer (the dev app may have a vulnerability that allows for remote code execution, for example).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The android emulator doesn't have access to localhost: this is just a setting that's copied into the android app to know to open 10.0.2.2 in the web view, not a configuration for the server itself

@daniellacosse daniellacosse requested a review from fortuna October 2, 2023 14:36
@daniellacosse daniellacosse merged commit b6108d2 into main Oct 2, 2023
6 checks passed
@fortuna
Copy link
Contributor

fortuna commented Oct 5, 2023

Can you add the screenshot to the app README at https://github.com/Jigsaw-Code/outline-sdk/tree/main/x/examples/outline-connectivity-app?

That will make the README way more compelling. It may be helpful to update #42 as well (or post a new entry).

@daniellacosse
Copy link
Contributor Author

Can you add the screenshot to the app README at https://github.com/Jigsaw-Code/outline-sdk/tree/main/x/examples/outline-connectivity-app?

That will make the README way more compelling. It may be helpful to update #42 as well (or post a new entry).

I need to add some android-specific styles, and then yeah I'll retake the photo with that added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants