Skip to content

Setup for Electron/Android app#6

Draft
digiexchris wants to merge 2 commits intojschoch:masterfrom
digiexchris:android-electron-app
Draft

Setup for Electron/Android app#6
digiexchris wants to merge 2 commits intojschoch:masterfrom
digiexchris:android-electron-app

Conversation

@digiexchris
Copy link
Copy Markdown

@digiexchris digiexchris commented Mar 3, 2023

Electron build to make browser differences a little easier, can target this instead of all the whacky browser versions.

Also some stubbing out for an Android/IOS app.

Using Ionic and Capacitor (with the visual studio code plugin for ionic) to convert the react app.

TODO: add some cross site security policy to allow the react app to connect to an http address from anywhere. Should be relatively safe for our use case. I'm not sure where to go with this one, I used to do this with webpack but that comes with the major downside of having to manually manage webpack after ejecting. this would be a combination of a default-src CSP setting, and maybe setting the history api fallback.

image

Electron build to make browser differences a little easier, can target this instead of all the whacky browser versions.

Also some stubbing out for an Android/IOS app.

Using Ionic and Capacitor (with the visual studio code plugin for ionic) to convert the react app.
@jschoch
Copy link
Copy Markdown
Owner

jschoch commented Mar 3, 2023

wow...

Ok, hmmm. I like the idea but I know next to nothing about electron. I used ionic many many years ago but that was well before I was using react.

I'm a bit confused why the ws restrictions are hard, in a browser it isn't an issue at all. I'll have to look at this in detail in the morning.

@digiexchris
Copy link
Copy Markdown
Author

it's in a browser that has higher security defaults turned on. firefox automatically redirects to https if you forget to put the protocol in, and in some cases caches that 302 as permanent and always does it. Same thing going on in electron, it's just a browser. Got it figured out though, I'll update it later.

Per our discord conversation, we should not merge this until a clear advantage is proven. I'm going to keep the branch around because this is something I've wanted to learn, but otherwise it's not necessary.

@digiexchris digiexchris marked this pull request as draft March 3, 2023 14:19
@digiexchris
Copy link
Copy Markdown
Author

the main advantage I was thinking of is for a less technical user, like how touchdro is marketed. it's a little easier in that case because there's not the same cross site security limitations with bluetooth, and the user's internal network setup does not cause any headaches. The user doesn't even need to know what an IP is.

hey, maybe bluetooth's an advantage, we could gain a latency decrease over bluetooth with a native android app, negate the security concerns of a wide open CSP, eliminate having to maintain a websocket layer (though yours works pretty darn good even when the esp reboots)

@jschoch
Copy link
Copy Markdown
Owner

jschoch commented Mar 3, 2023

i think bluetooth is worth testing for performance. it may make the binary huge though.

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