Skip to content

Comments

EXPERIMENTAL - Mobile Horizon!#551

Draft
min-xy wants to merge 2 commits intoFchat-Horizon:developmentfrom
min-xy:feature/mobile-experimental
Draft

EXPERIMENTAL - Mobile Horizon!#551
min-xy wants to merge 2 commits intoFchat-Horizon:developmentfrom
min-xy:feature/mobile-experimental

Conversation

@min-xy
Copy link
Contributor

@min-xy min-xy commented Dec 18, 2025

Changes to support Horizon as a mobile app. I've been using Android Studio's emulator.

My build script:
Push-Location (your def fodler)\Horizon; Remove-Item mobile\www -Recurse -Force -ErrorAction SilentlyContinue; node webpack.js development mobile/webpack.config.js 2>&1 | Select-Object -Last 2; Remove-Item mobile\android\app\src\main\assets\www -Recurse -Force -ErrorAction SilentlyContinue; Copy-Item mobile\www mobile\android\app\src\main\assets\www -Recurse; cd mobile\android; .\gradlew assembleDebug installDebug 2>&1 | Select-Object -Last 3; Pop-Location

and my logging scripts:
adb logcat -c
adb shell am force-stop net.f_list.fchat
Start-Sleep -Seconds 4
adb logcat -d | Select-String "CONSOLE|mobile"

This is very incomplete, however most features work. I had to make a few changes for the mobile app to work, hopefully the styling isn't offensive.

The comments might not be 100% accurate, this was done sloppily over a few days. The big gradle version bump was a pain. Needs JDK 17 (I used OpenJDK.)

Changes to support Horizon as a mobile app. I've been using Android Studio's emulator.

My build script:
Push-Location (your def fodler)\Horizon; Remove-Item mobile\www -Recurse -Force -ErrorAction SilentlyContinue; node webpack.js development mobile/webpack.config.js 2>&1 | Select-Object -Last 2; Remove-Item mobile\android\app\src\main\assets\www -Recurse -Force -ErrorAction SilentlyContinue; Copy-Item mobile\www mobile\android\app\src\main\assets\www -Recurse; cd mobile\android; .\gradlew assembleDebug installDebug 2>&1 | Select-Object -Last 3; Pop-Location

and my logging scripts:
adb logcat -c
adb shell am force-stop net.f_list.fchat
Start-Sleep -Seconds 4
adb logcat -d | Select-String "CONSOLE|mobile"

This is very incomplete, however most features work. I had to make a few changes for the mobile app to work, hopefully the styling isn't offensive.
Removed many of my console.log statements that were there for debug. Also ran prettifier.
@min-xy
Copy link
Contributor Author

min-xy commented Dec 19, 2025

There are still some to-dos I haven't handled yet:

  • Themes
  • Testing logging
  • Testing through each and every setting under character settings

Mobile does not support being logged into multiple characters at once yet, either. Not sure that will need to be implemented, as there comes a point where there's too much going on for a user.

If anyone tests this, please let me know!

@valyrieth
Copy link

valyrieth commented Dec 19, 2025

I cannot build either on Windows or Linux.
Would you have more extensive documentation to build the project and test the app / contribute to the android version ?

edit : after some tests, I did manage a white screen on the app. Not much else

@min-xy
Copy link
Contributor Author

min-xy commented Dec 20, 2025

I cannot build either on Windows or Linux. Would you have more extensive documentation to build the project and test the app / contribute to the android version ?

edit : after some tests, I did manage a white screen on the app. Not much else

From the mobile/android directory you should just need to do a
./gradlew assembleDebug installDebug

My script in the description takes advantage of /mobile/www being in gitignore as I copy assets there, them do the build.

Do you get any warnings? And if you examine any logs with adb do you see much?

@valyrieth
Copy link

From the mobile/android directory you should just need to do a ./gradlew assembleDebug installDebug

My script in the description takes advantage of /mobile/www being in gitignore as I copy assets there, them do the build.

Seems the node script fails for me. maybe I don't have the correct version ?
module not found: Error: Can't resolve 'to-string-loader' in '/home/valyrieth/StudioProjects/Horizon/mobile'
I installed it all today, fresh install. Using node v22.21 (no v22.13 on my distrib)

Do you get any warnings? And if you examine any logs with adb do you see much?

Nothing at all but that might be because I dunno ho to use it...

@min-xy
Copy link
Contributor Author

min-xy commented Dec 20, 2025

Oh. You're missing pnpm.

npm install -g pnpm@latest

Then

pnpm install

I think the issue you've got is just missing dependencies.

@valyrieth
Copy link

valyrieth commented Dec 20, 2025

I think the issue you've got is just missing dependencies.

No that was AOK. "Already up to date"

Edit

to-string-loader was not into package.json in your branch. no error once added but 392 warnings (and some during install with pnpm)

I managed to install the app on my phone and got past login but not character log in

12-20 18:41:22.736  6153  6153 I chromium: [INFO:CONSOLE:171632] "[fs-shim] fs.writeFileSync called but not implemented", source: file:///android_asset/www/chat.js (171632)
12-20 18:41:22.744  6153  6153 I chromium: [INFO:CONSOLE:0] "18:41:22.729 › socket.recv [object Object]", source:  (0)
12-20 18:41:22.746  6153  6153 I chromium: [INFO:CONSOLE:171632] "[fs-shim] fs.writeFileSync called but not implemented", source: file:///android_asset/www/chat.js (171632)
12-20 18:41:22.754  6153  6153 I chromium: [INFO:CONSOLE:0] "18:41:22.742 › socket.recv [object Object]", source:  (0)
12-20 18:41:22.906  6153  6153 I chromium: [INFO:CONSOLE:171632] "[fs-shim] fs.writeFileSync called but not implemented", source: file:///android_asset/www/chat.js (171632)
12-20 18:41:22.911  6153  6153 I chromium: [INFO:CONSOLE:0] "18:41:22.902 › socket.recv [object Object]", source:  (0)
12-20 18:41:22.916  6153  6153 I chromium: [INFO:CONSOLE:171632] "[fs-shim] fs.writeFileSync called but not implemented", source: file:///android_asset/www/chat.js (171632)
12-20 18:41:22.927  6153  6153 I chromium: [INFO:CONSOLE:171632] "[fs-shim] fs.writeFileSync called but not implemented", source: file:///android_asset/www/chat.js (171632)
12-20 18:41:22.937  6153  6153 I chromium: [INFO:CONSOLE:171632] "[fs-shim] fs.writeFileSync called but not implemented", source: file:///android_asset/www/chat.js (171632)
12-20 18:41:22.944  6153  6153 I chromium: [INFO:CONSOLE:171632] "[fs-shim] fs.writeFileSync called but not implemented", source: file:///android_asset/www/chat.js (171632)

@min-xy
Copy link
Contributor Author

min-xy commented Dec 20, 2025

Huh... I wonder why my build succeeded without that...

Regardless, thank you very much for those logs! Looks like I actually do have some things to implement in my filesystem shim. Never hit those from the emulator.

@valyrieth
Copy link

Pleasure is all mine !
I wish I could help more but sadly my knowledge resides in C# and .NET and not all this.
I'll be looking forward to more updates and fixes, and be glad to help find bugs if needed.

@CodingWithAnxiety CodingWithAnxiety marked this pull request as draft January 1, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants