szatkus / js2me

J2ME implementation in JavaScript
MIT License
134 stars 27 forks source link

Support for KaiOS #7

Open danimesq opened 4 years ago

danimesq commented 4 years ago

Detect KaiOS and adapt current elements.

Only load (require.js) virtual numpad if not KaiOS.

Convert buttons at KaiOS.

szatkus commented 4 years ago

I can try to submit the application. After skimming the documentation looks like not much has changed since Firefox OS regarding application packaging.

szatkus commented 4 years ago

I managed to run it on the simulator, but an API for listing files is broken there. I don't have a phone with KaiOS, so I can't test it properly, but for now it seems that I should remove the virtual numpad as KaiOS devices have physical keys.

danimesq commented 4 years ago

Why removing it? There can be new, touch devices based on it. You can simply create a mode to switch it according to the device.

szatkus commented 4 years ago

Looks like every KaiOS device have a numpad. It can be reverted easily when they introduce some with a touchscreen. One way or another I need to rework the UI for KaiOS.

danimesq commented 4 years ago

Looks like every KaiOS device have a numpad. It can be reverted easily when they introduce some with a touchscreen. One way or another I need to rework the UI for KaiOS.

I don't think KaiOS will support touch devices. Probably a fork which takes the original idea from FirefoxOS.

Qiangong2 commented 4 years ago

@szatkus Maybe this would help? https://gitlab.com/suborg/project-kava

It looks like it was actually based on your code. Maybe use parts from that for the KaiOS build? I'd love to see J2ME apps running on my KaiOS phone

szatkus commented 4 years ago

Thanks. That's a weird project. Looks like it is based on an old experimental branch, which was never fully functional. I wonder how well it worked.

Qiangong2 commented 4 years ago

Thanks. That's a weird project. Looks like it is based on an old experimental branch, which was never fully functional. I wonder how well it worked.

It barely works at all. Most games and every app I tried are non-functional

szatkus commented 3 years ago

I don't have a KaiOS device and the simulator looks to be broken in so many places.

danimesq commented 2 years ago

from https://github.com/szatkus/js2me/issues/13#issuecomment-994970588:

I already tried, but the simulator for KaiOS doesn't work well (especially for this app as it does some uncommon stuff) and I simply don't have means to test it.

I managed to run it on the simulator, but an API for listing files is broken there.

I don't have a KaiOS device and the simulator looks to be broken in so many places.

Yes. I've tested some apps in the KaiOS 2.5 simulator and some file storage APIs seems to be broken unlike in a real device.

I don't have a phone with KaiOS, so I can't test it properly

@szatkus, I have an Nokia KaiOS phone (offtopic: also an Alcatel Fire - Firefox OS) for testing, if it would be appreciated.

Other than that, the project is open and I accept PRs.

Am also open to make PRs introducing Electron, Cordova and KaiOS support.

Looks like every KaiOS device have a numpad. It can be reverted easily when they introduce some with a touchscreen.

Why reverting if js2me can be multi-platform?

but for now it seems that I should remove the virtual numpad as KaiOS devices have physical keys.

Why removing if these elements can simply get a "display:none" when detecting KaiOS? So this app will support KaiOS while still working at Firefox OS, Cordova, Electron and Web. Another sane approach is to use require.js to only load the virtual numpad when its not KaiOS (so KaiOS won't have to process it so things will be lighter on it).

danimesq commented 2 years ago

Progress

@szatkus, I was able to implement the base of the KaiOS adaption; but it seems like require.js isn't working.

Here it works normally on KaiOS, but in my JS2ME fork its not working.

Update: Have made a WIP draft PR here: https://github.com/szatkus/js2me/pull/17; now require.js works.