When creating an overlay activity without specifying TID, there's an error about unpack.
Python 3.11.6
, termuxgui 0.1.6
running on Android 12, MIUI 14.
import termuxgui as tg
import time
def main():
with tg.Connection() as connection:
activity = tg.Activity(connection, overlay=True)
tv = tg.TextView(activity, "Hello world!")
time.sleep(10)
if __name__ == "__main__":
main()
Traceback (most recent call last):
File "/data/data/com.termux/files/home/mergebot/bot_gui_overlay.py", line 11, in <module>
main()
File "/data/data/com.termux/files/home/mergebot/bot_gui_overlay.py", line 6, in main
activity = tg.Activity(connection, overlay=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/termuxgui/activity.py", line 29, in __init__
self.aid, tid = self.c.send_read_msg({"method": "newActivity", "params": params})
^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable int object