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

How to connent network? #2

Open
ixunuo opened this issue Apr 26, 2024 · 4 comments
Open

How to connent network? #2

ixunuo opened this issue Apr 26, 2024 · 4 comments

Comments

@ixunuo
Copy link

ixunuo commented Apr 26, 2024

It's really a wonderful project, but I found when I use fetch or XMLHttpRequest, nothing happend. I tried my best but nothing works. Do you have some ideas?

@Lukas1h
Copy link
Owner

Lukas1h commented Apr 28, 2024

Yeah unfortunately I've had the same problem. It's one of the main things that's halted development of some more useful applications.

I think the way Amazon does it in there applications is fetching data in the native Java side, and then sending it over to the JavaScript side. Unfortunately, we can't do that since we can't compile our own native launcher for the JavaScript bundle.

I currently have no idea of how to solve the problem, but if you have any ideas I'd love to work out a solution with you!

One of the solutions I've considered, but have not tested, is finding a way to run some sort of external application that does the fetch request on behalf of the JavaScript and then sends it to the JavaScript side. I think this might be possible using LIPC stuff.

It's possible for the ImageView to access network images I believe, so it should be possible for the JavaScript code to access network requests some how.

@ixunuo
Copy link
Author

ixunuo commented May 3, 2024

using LIPC to transfer data is possible. Have you already found how to run lipc in react app?

@Lukas1h
Copy link
Owner

Lukas1h commented May 3, 2024

Unfortunately, not yet.

The Kindle web apps (their actual name escapes me at the moment) have a dbgCmd function that's used to interact with LIPC. I think a similar function must exist somewhere for the KPP framework.

@ixunuo
Copy link
Author

ixunuo commented May 3, 2024

it's disappointing.
In fact, I've also tried many methods, but lipc not works.

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

No branches or pull requests

2 participants