Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Androwish: run socket server in the background

146 views
Skip to first unread message

Harald Oehlmann

unread,
Mar 26, 2021, 3:21:58 AM3/26/21
to
Dear TCL'ers,

is it possible to run a AndroWish server application in the background
(minimized) of Android?

As far as I understood, programs are automatically stopped when in the
background.

The aim is to forward the data of a barcode scanner via a server socket
while a rdp session is running in the foreground.

Thanks for any ideas,
Harald

Uwe Klein

unread,
Mar 26, 2021, 4:23:54 AM3/26/21
to
Am 26.03.21 um 08:21 schrieb Harald Oehlmann:
a noobs answer:

looks like you have to create a background job (that needs some
foreground app to show information ):
https://developer.android.com/reference/android/app/IntentService
( deprecated)
https://developer.android.com/reference/androidx/work/WorkManager.html
https://developer.android.com/reference/androidx/core/app/JobIntentService.html

Interesting. ( Still waltzing around androwish ... )
Going to watch from the aisles.:-)

Uwe

Harald Oehlmann

unread,
Mar 26, 2021, 4:55:16 AM3/26/21
to
Wow, looks very complex.

Thank you,
Harald

Christian Werner

unread,
Mar 26, 2021, 5:48:47 AM3/26/21
to
Per https://www.androwish.org/home/wiki?name=Android+facilities what about giving "borg withdraw" a try and see what happens?

Cheers,
Christian

Harald Oehlmann

unread,
Mar 26, 2021, 6:52:22 AM3/26/21
to
Dear Christian,
thank you for the Emilio.
Yes, we will definitively try that. Or just put the application in the
background with other keys and see, if it still communicates.

The other path is to learn Java and write the background app...

Thank you,
Harald

ted brown

unread,
Mar 26, 2021, 2:17:42 PM3/26/21
to
Some android phones, like my samsung galaxy j3 running 9 (but not my
moto fast running 10) have an app lock option.

Start androwish, run a socket listener. Then you go to the recent apps
screen and tap the icon to the left of the name (AndroWish) which brings
up a menu, with the lock (or unlock later) option.

Seems to stay alive, even after running a dozen or so other apps which
w/o the lock would kill androwish after a while.



Harald Oehlmann

unread,
Mar 28, 2021, 1:20:28 PM3/28/21
to
Thank you, Ted, we will try that.

Thanks,
Harald

Eduard Zozulya

unread,
Mar 29, 2021, 8:12:21 AM3/29/21
to
неділя, 28 березня 2021 р. о 20:20:28 UTC+3 Harald Oehlmann пише:
Just checked on the own program.
If the program is not in the foreground, but the screen is on, then the data transfer over the socket is successful. If the screen is turned off - data transfer is suspended until the screen is turned on :-(

Harald Oehlmann

unread,
Mar 29, 2021, 9:41:54 AM3/29/21
to
Thank you, Eduard.
For my use-case that is ok. We transmit scan data from an internal
barcode scanner to a Windows Session. If the screen is off, there is no
communication required. And when the bar-code scanner is triggered,
probably the screen gets active anyway.

Thank you,
Harald

Gerald Lester

unread,
Mar 29, 2021, 10:23:29 AM3/29/21
to
You beat me to the answer!

That is the same behavior I have observed in the past.

It is true for both client and server sockets as far as I can tell.

--
+----------------------------------------------------------------------+
| Gerald W. Lester, President, KNG Consulting LLC |
| Email: Gerald...@kng-consulting.net |
+----------------------------------------------------------------------+

Eduard Zozulya

unread,
Mar 29, 2021, 10:46:09 AM3/29/21
to
понеділок, 29 березня 2021 р. о 17:23:29 UTC+3 Gerald Lester пише:
My program reads RFID cards, and this behavior is quite acceptable. But there are a number of tasks when you want the data to be transmitted in the background, such as GPS tracker. Unfortunately, this is currently not possible.
0 new messages