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

Multiple Widget Tables (MW swich) #4

Open
RalfWerner opened this issue Sep 26, 2021 · 1 comment
Open

Multiple Widget Tables (MW swich) #4

RalfWerner opened this issue Sep 26, 2021 · 1 comment

Comments

@RalfWerner
Copy link
Owner

RalfWerner commented Sep 26, 2021

Feature description for version 0.13

The multi-widget tables (MW) are described as of V0.13 with the "canonical" restriction. That means:
Is s=~/.shortcuts t=~/.termux, of all scripts must be inside these two paths. Administration of the MW on any place outside of Termux like /sdcard/ip is no longer possible, but only move/copy to $s or $t. Reason: "canonical" means symlinks to outside are forbidden. But only for the T:Widget plugin (in bash it's no problem).

The Objekt concept based on an Termux independing storage. Executables must also stored inside Termux but this is usally no problem, because objects manage only sources. The MW exist after Object download and will managed inside the objects and a new refresh funktion have to concider this like in the following check szenarien of widget (dir) in three objekts:

uu.sh (see OTS/double u) allowed similar to Proot-Distro the administration of distros (u uu open an ubuntu session in ../uu and unpack it from sd/uu.tgz if not already done or creates a new one and u . <o> creates two symlinks on ~/i and ln -s i/bashrc .bashrc. It is checked <o> can be found in one of the two or more /storage/*. If so, this path is symliked as ~/sd.

A widget dir can be in all these four ~-paths: ., i, ../uu, sd. The last one, I do not consider but existens of multiple <o> (ip, api29) that can be toggled by u . <o>. But it can also be part of .bashrc to create widget, if it does not exist yet. An simple example with termux<->ubuntu toggle funktion is:

w=com.termux.widget; a="am broadcast -n $w/.TermuxWidgetProvider -a $w.ACTION_REFRESH_WIDGET --ei appWidgetId 6"
tu='s=.shortcuts t=$s/termux u=$s/ubuntu; if [ -e $t ];then mv $t $u; else mv $u $t; fi' t='bash ~/.bashrc`
w=~/i/widget;if [ ! -e $w ];then mkdir $w; for m in "$tu;$a:ubuntu" "ls -l wi*;exit 1:_all-widget" "$t t:touch-check"
do c=`$e $m|cut -d: -f1` f=`$e $m|cut -d: -f2`; $e "$c">$w/$f; done; fi

... still in preparation

Feature description for version 0.12 7.Feb 2020

@xeffyr With mv .shortcuts widget I changed the path, connected again with the symlink:
w=widget; s='~/.shortcuts'; ln -s $w $s and split my entries in 3 paths (termux ~/$w, ubuntu uu/$w and sdcard/proot i/$w). Then I add the entries:
cd uu/$w; echo"s=$s; rm $s; ln -s ~/$w $s">' termux-widget' and
cd ~/$w; echo "s=$s; rm $s; ln -s ~uu/$w $s">' ubuntu-widget' (same for sdcard).
So nothing has changed on the startscreen except for the first (two) action (replaces the symlink with shortcuts that are possible in ubuntu and proot) and now it looks like this:
grafik
I started processes from all tables, which are managed in the Navigator (shot4).

What I expect is to have a changed table on the start screen (shot2/3) by tapping the second action (shot1). However, this is only the case, if no termux-bash is open and after I have tapped reload.
Could this be realized by a specific exit number, such as exit 1 (received the navigator entry) - no switch and reload?

Continued from our dialog about Studio test environment with API/widget with Q10/R11 emulators:

install Termux:API but not run it ... Just added in per-repository mode.

To your @xeffyr last topic mv wd/te*/*/dev* wc/.android would be ok - or better not?

WSL[AS/x]$ ll wd/te*/*/dev* wc/.android/deb* wd wc
lrwxrwxrwx 1 th80wr th80wr   19 Mar 12 09:48 wc -> /mnt/c/Users/th80wr
-rwxrwxrwx 1 th80wr th80wr 2105 Mar 14 12:45 wc/.android/debug.keystore
-rwxrwxrwx 1 th80wr th80wr    0 Mar 14 12:45 wc/.android/debug.keystore.lock
lrwxrwxrwx 1 th80wr th80wr   18 Mar 12 09:04 wd -> /mnt/d/Android/App
-rwxrwxrwx 1 th80wr th80wr 2097 Mar  6 16:10 wd/termux-api/app/dev_keystore.jks
-rwxrwxrwx 1 th80wr th80wr 2097 Mar  6 16:10 wd/termux-app/app/dev_keystore.jks
-rwxrwxrwx 1 th80wr th80wr 2097 Mar  4 17:23 wd/termux-widget/app/dev_keystore.jks
-rwxrwxrwx 1 th80wr th80wr 2097 Mar  6 16:10 wd/termux-x11/app/dev_keystore.jks

Installation of the API plugin in Studio. Shot1: the build actions of the first three parts generate the APK and install it on the current emulation (here Q10). Shot2: the *.apk is created with Build Bundle. Shot3: after drag & drop from PC Explorer, the plugin is also included in the emulation. Shot4: Start screen with the widget table from which dialog API is started and then displayed in Shot5 - here with the emulated phone functions on the right. In Shot6 the process can be seen in the Navigator (if no dialog is active anymore). The sensor analysis runs in the background.
grafik
Unfortunately the API installation is more complex than for the other plugins and there are a few problems that I have reported in paste or only occur in the emulation:

  • Dialogues and navigator (drawer) can not be displayed at the same time. Here I use a while loop, which enables cell phone rotation (termux-dialog interrupt the action, as with drawer). Starting multiple times is also problematic if dialogues are held at the same time. But also possible parallel actions (sensor/selfie) lead to stalled problems!
  • The action selfie creates a ~/tmp.jpg file and ends the widget action with exit 1, which is not done with the camera during emulation (my inexperiance). The image could edited with termux-open tmp.jpg before exit 1.
  • The action speech should have a written&acoustic dialogue with you and the phone/emulator. This is no problem on the real device. It's funny to count up 1-9 in different languages ​​and what the recognition does with it. Unfortunately, the process often does not come to a conclusion (stalled) as can be seen in the process control (Shot1 below) and can only be stopped with pkill termux-api.

The following Shot1 shows the processes during dialog API action (stalled: 18005,19202) and Shot2 the script (extract from sd/ip/bashrc). Shot3 is the first try (strings only) widget via Studio adjust
grafik
You added feature request to this repo. Would this be a suitable case (I use Studio or signed all *.apk with my private keystroke) to use it?

@RalfWerner
Copy link
Owner Author

from X11-TODO:

I meant direct HDMI connection with external display

My devices have no HDMI socket so I can not say anything about it. Only the three other methods to use external display devices. If the restrictions do not interest you, I say nothing more.

I wrote about Android behaviour, not Lorie's one. Lorie is not X11 server implementaion, it is an Xwayland backend.

The interaction of Android, Lori and Xwayland I know. Nevertheless, the X11 app behaves like any other XServer as well.

This topic is not about testing ... is about improving user experience by adding some functions. And about Java/native implementation of these functions.

Improving without testing is impossible. I said the fullscreen function did you have implemented years ago. It's only lost in an action by @suhan-paradkar, I suspect Java, as this was used here for Termux too. I suspect the faulty key states in ekeys is in the Lorie part, as you have already solved this in basic X11 too. So improvement should only reactivate code you know (developed). That's why I write to you.
...

Hi. Is there anyone who can help me investigate crashes in termux-x11? I can not reproduce them on my devices.

but here you say:

There is nothing to test ... And if I do that you will be able to create an issue. Wait ekeys to be merged.

I had done that here but no answer from you. Meanwhile, I also checked your new artifact on AVD emulator with the same and more Errors. Only README is not enough to get to a working OTS. With several additional actions I had success in the end.

You have ten of our Discussions removed here without finding a solution and ekeys has not progressed for more than two weeks.

To avoid misunderstandings: basic X11 is your APK, which worked very stably in recent years, have fullscreen and limited but correct EK. In VNC this is Default, as well as Reseed Screen. In X11 these are (unnecessary) choices and new versions are more unstable.
Where can I place that, if not here (TODO)?

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

1 participant