I don’t understand what you are trying to do.
Can you use Clock.schedule_once() to set the wait, rather that a wait in another thread?
When you say launch the app, do you mean call AppName().run()?
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/06abed47-76ab-4e79-b120-7b763c65bff7o%40googlegroups.com.
I don’t understand what you are trying to do.
Can you use Clock.schedule_once() to set the wait, rather that a wait in another thread?
When you say launch the app, do you mean call AppName().run()?
From: ТН Н
Sent: Saturday, January 23, 2021 6:13 AM
To: Kivy users support
Subject: [kivy-users] How do I open the kivy app automatically?
I have a script running in the thread that waits for the time specified by the user. How do I launch the app when the time is right? For some reason, I can't even change the screen via sm.current = 'name'. It doesn't work in a thread, but it works without a thread.
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.
I don’t understand what you are trying to do.
Can you use Clock.schedule_once() to set the wait, rather that a wait in another thread?
When you say launch the app, do you mean call AppName().run()?
From: ТН Н
Sent: Saturday, January 23, 2021 6:13 AM
To: Kivy users support
Subject: [kivy-users] How do I open the kivy app automatically?
I have a script running in the thread that waits for the time specified by the user. How do I launch the app when the time is right? For some reason, I can't even change the screen via sm.current = 'name'. It doesn't work in a thread, but it works without a thread.
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.
Clock.schedule_once will not interfere with the operation of the app. You are simply scheduling an event to happen in the future.
In the datatime module you can use timedelta to convert differences between dates/time into seconds. You need seconds for the Clock methods.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/c7bb757d-f16f-49fd-acf0-a75132ddb480o%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/c7bb757d-f16f-49fd-acf0-a75132ddb480o%40googlegroups.com.
I’m sorry I don’t understand – deploy the app?
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/d88f7966-caa3-49ef-83f1-fa8440df8519o%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/d88f7966-caa3-49ef-83f1-fa8440df8519o%40googlegroups.com.
Deploy the app – are you asking how to package the app and distribute to users?
App runs in background… Desktop (Windows, Mac, Linux) or Mobile(Android/IOS)?
I would assume the app runs – and remains running you use a screen to set the ‘wake up’ time. The user minimizes the app, and at wake up time the app maximizes the window (assumes desktop).
Alternatively - again assuming a desktop app – you could look for other scheduler programs that your could use the start your app. For example:
https://datatofish.com/python-script-windows-scheduler/
There are also python packages that schedule running apps – but I don’t know what you are trying to do – or what platform you are running on.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/d1dfcf82-7477-4f94-8686-98b2d06a3e9bo%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/d1dfcf82-7477-4f94-8686-98b2d06a3e9bo%40googlegroups.com.
On Android, I suspect you will either need to use and existing Android API for scheduling an app – or create a service that will run in the background. I have not done any coding on Android.
A quick google search suggests you will want to use: https://developer.android.com/reference/android/app/AlarmManager
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/459e7ed0-d223-456b-b2af-470ada5188d9o%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/459e7ed0-d223-456b-b2af-470ada5188d9o%40googlegroups.com.
If you want to maximize a window… on a desktop: https://kivy.org/doc/stable/api-kivy.core.window.html?highlight=window%20maximize#kivy.core.window.WindowBase.maximize
from kivy.core.window import Window
Window.maximize()
On android, I assume the app will not be visible and the AlarmManager will cause the app to resume – but I’m not an Android guy.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/d73bc3c5-5f89-4c28-b6f7-913c476ae0efo%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/d73bc3c5-5f89-4c28-b6f7-913c476ae0efo%40googlegroups.com.
If you want to maximize a window… on a desktop: https://kivy.org/doc/stable/api-kivy.core.window.html?highlight=window%20maximize#kivy.core.window.WindowBase.maximize
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/d73bc3c5-5f89-4c28-b6f7-913c476ae0efo%40googlegroups.com.
Here is a small example that restores the window 3 seconds after the window has been minimized.
from kivy.app import App
from kivy.lang import Builder
from kivy.core.window import Window
from kivy.clock import Clock
kv= """
BoxLayout:
Button:
text: 'Minimize the Window'
on_release: app.min_win()
"""
class MinRestoreApp(App):
def build(self):
Window.bind(on_minimize=self.restore_win_delayed)
return Builder.load_string(kv)
def min_win(self):
Window.minimize()
Clock.schedule_once(self.restore_win, 3)
def restore_win_delayed(self, *args):
Clock.schedule_once(self.restore_win, 3)
def restore_win(self, *args):
Window.restore()
MinRestoreApp().run()
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/4ddb5a59-c294-4f4e-9de5-0531ed99b3ebo%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/4ddb5a59-c294-4f4e-9de5-0531ed99b3ebo%40googlegroups.com.