The International Simutrans Forum

 

Author Topic: Github action workflow for android nightly build  (Read 7702 times)

0 Members and 1 Guest are viewing this topic.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Github action workflow for android nightly build
« Reply #70 on: October 05, 2021, 05:45:20 AM »
Try to set "hide_keyboard=1" in simuconf.tab


Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #71 on: October 07, 2021, 02:37:31 AM »
Try to set "hide_keyboard=1" in simuconf.tab


That should hide the keyboard, but I meant to automatically hide and show only if you are editing an input box for text or numbers.
Is this supported in SDL2? .

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Github action workflow for android nightly build
« Reply #72 on: October 07, 2021, 03:42:13 AM »
The setting does exactly what you want.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #73 on: October 07, 2021, 02:03:03 PM »
[]The setting does exactly what you want.
[]that's great!

Edit.

I have activated the option but it is not working I'm afraid. :(
« Last Edit: October 07, 2021, 03:38:36 PM by Yona-TYT »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Github action workflow for android nightly build
« Reply #74 on: October 08, 2021, 01:55:03 AM »
There was an error on closing the keybord, when the windows was just closed. But the call to SDL_StartTextInput() is there. Does the keyboard appear on opening the load dialoge?

If so, then maybe r10133 will correct open and close it again.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #75 on: October 08, 2021, 02:06:15 AM »
There was an error on closing the keybord, when the windows was just closed. But the call to SDL_StartTextInput() is there. Does the keyboard appear on opening the load dialoge?

If so, then maybe r10133 will correct open and close it again.
exactly, the keyboard appears and it is difficult to hide it.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Github action workflow for android nightly build
« Reply #76 on: October 08, 2021, 02:10:38 AM »
r10133 should hide it again then. Until then, you must finish text input with "RETURN" key, that should hide the keyboard again.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #77 on: October 08, 2021, 02:14:27 AM »
He asked me if it is possible to distinguish between text and numeric inputs, this would be nice.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #78 on: October 08, 2021, 02:18:44 AM »
He asked me if it is possible to distinguish between text and numeric inputs, this would be nice.



[]For example, if I click on a numeric entry, the keyboard should look like this:




Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Github action workflow for android nightly build
« Reply #79 on: October 08, 2021, 01:43:08 PM »
There is no function in SDL for this, as far as I know.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #80 on: October 08, 2021, 01:50:01 PM »
There is no function in SDL for this, as far as I know.
Maybe not implementing. :(

In JavaScript it is done with a simple "type = number" attribute.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #81 on: October 09, 2021, 04:25:00 AM »
I'm afraid the last review gives me more problems.


Buttons do not respond to touch sensor and keyboard still appears at startup. :(

Offline krosk

  • *
  • Posts: 38
  • Languages: EN,FR,ZH
Re: Github action workflow for android nightly build
« Reply #82 on: October 09, 2021, 06:23:48 AM »
The keyboard appearing at startup is likely an oddity from the Java part in Android, so it could be some code to correct on the Android side, not on the game side.

That said, arent you supposed to be able to hide the keyboard with a press of the (on screen) back button? This is a generic Android behavior. (Making the back/menu/jump buttons appearing is normally possible by sliding fingers to show the notification panel)

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Github action workflow for android nightly build
« Reply #83 on: October 09, 2021, 01:47:35 PM »
EDIT: There was one SDL_TextInput too much. Fixed in r10142.

I am handling all the proper finger handling code. Are you using the emulator or a real device?

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #84 on: October 09, 2021, 01:52:31 PM »
@prissi
I am using a real device.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Github action workflow for android nightly build
« Reply #85 on: October 09, 2021, 01:58:47 PM »
Well, on my windows touchscreen, I get the right finder events.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #86 on: October 09, 2021, 02:06:11 PM »

I can barely get here.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #87 on: October 10, 2021, 12:04:48 AM »
r10142, The touch response is still broken I'm afraid :(.

I like to listen to the midi of simutrans on my mobile, but now the touch does not respond.  :'(

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Github action workflow for android nightly build
« Reply #88 on: October 16, 2021, 12:40:34 PM »
Please try r10160. I have made a lot of effort the better filter events.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #89 on: October 16, 2021, 11:13:15 PM »
Unfortunately, the problem is still there, I can't press the buttons in the welcome window, and in the package selection window somehow progress is made. :(

The last time the touch worked for me was in r10123.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #90 on: October 16, 2021, 11:17:20 PM »
if I remember correctly, from r10133 the touch sensor stopped working for simutrans.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Github action workflow for android nightly build
« Reply #91 on: October 17, 2021, 01:40:10 AM »
I run simutrans from github in blustacks. The button event coord is registered, but on a different position than the actual  one on the screen. The scaling for finder event is different than for mouse events. Should work as intended again for r10165.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #92 on: October 17, 2021, 03:42:46 AM »
@Prissi, I'm going to test, that downloading 134mb consumes my data plan a lot.🤪


Finding this, maybe it can serve as a reference: 😎
https://forum.simutrans.com/index.php?topic=13947.0

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Github action workflow for android nightly build
« Reply #93 on: October 17, 2021, 07:37:28 AM »
Rhater wait then for Wifi access ... it is not that urgent.

When testing in the emulator, anz savegame will not be restored after quitting.
« Last Edit: October 17, 2021, 07:52:53 AM by prissi »

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #94 on: October 17, 2021, 07:43:08 AM »
Rhater wait then for Wifi access ... it is not that urgent.
There is no other way I'm afraid.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #95 on: October 18, 2021, 02:33:33 AM »
When testing in the emulator, anz savegame will not be restored after quitting.
That is correct, apparently it had been broken when ported to sdl2, I was about to report it but I got stuck with the touch inputs.





I have been trying to download the apk, but unfortunately my network is very unstable and the github server is very cruel in not allowing to resume downloads. :-[ 

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Github action workflow for android nightly build
« Reply #96 on: October 18, 2021, 03:20:47 AM »
You can download to your computer and use the USB connection to transfer to your phone (needs to enable debug mode, I think). That should also reduce your data plan usage.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #97 on: October 18, 2021, 04:05:10 AM »
You can download to your computer and use the USB connection to transfer to your phone (needs to enable debug mode, I think).
I use something called "qrcp" in linux to transfer the files to my phone using the wifi network.  8)



That should also reduce your data plan usage.
We don't have unlimited internet service I'm afraid.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #98 on: October 18, 2021, 04:28:15 AM »
Great, the keyboard works fine and is already responding to the touch sensor.


Two problems:
The settings are not saving, at least they are not on my device.
 
When using both fingers to zoom in on the minimap for some reason it stops responding to the touch sensor.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Github action workflow for android nightly build
« Reply #99 on: October 18, 2021, 06:35:15 AM »
Thank you, good news. Does the touch come back after a three finger scroll? Or after touching somewhere (may in the menu?) In my tests, I had mostly trouble buying engines, first touch activate the engine and then I needed a double tap rather. Anyway, I think that can be done via the simulator.

I think the saving is probably something general with Android, and occurs also in the simulator. So I should able to test this. It is probably related to the not saving on quit, since it would save to the same directory as the settings.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #100 on: October 18, 2021, 06:05:31 PM »
Thank you, good news. Does the touch come back after a three finger scroll? Or after touching somewhere (may in the menu?) In my tests, I had mostly trouble buying engines, first touch activate the engine and then I needed a double tap rather. Anyway, I think that can be done via the simulator.
When zooming in with two fingers in the minimum, the touch is trapped there and no longer allows you to release more, neither using 3 fingers nor touching anywhere.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Github action workflow for android nightly build
« Reply #101 on: October 19, 2021, 12:15:51 AM »
Hmm, the way the touch is implemented in SDL2 on Android sucks. Either I get too many finger up messages, or, apparently I can also get none. Hmm. I will try something.
« Last Edit: October 19, 2021, 12:28:36 AM by prissi »

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #102 on: October 19, 2021, 12:19:04 AM »

Hmm, the way the touch is implemented in SDL2 on Android sucks. Either I get too many finger up messages, or, apparently I can also get none. Hmm.

[]I apologize, I said minimum, but I meant mini-map, I hope I haven't confused you with that silly translation error.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10979
  • Languages: De,EN,JP
Re: Github action workflow for android nightly build
« Reply #103 on: October 19, 2021, 12:30:27 AM »
No, the finger event (at least under windows) have a long delay compared to related mouse and actual finger state. That makes suppressing multi-touch event difficult. I tried something, but I would be more patient with another download, as I will play around more at home.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1795
    • Simutrans-BLOG
  • Languages: ES
Re: Github action workflow for android nightly build
« Reply #104 on: October 19, 2021, 03:06:51 AM »
@prissi, Before porting to SDL2 you could use the Android "back" button to close the last open window, can you make this work again? It is very useful.