i have looked and cant find out if i can run background app for windows… Is this possible yet?
– By background i mean like where your WiFi bar and volume and battery are/is…
i have looked and cant find out if i can run background app for windows… Is this possible yet?
– By background i mean like where your WiFi bar and volume and battery are/is…
Corona assumes you have an active UI. You should be able to minimize your desktop app, but don’t expect to do any background processing since we expect to be able to update the screen when things change.
Rob
Well in the build settings i added
defaultMode = "minimized"
and when i start the exe it starts it as minimized but i need it to be in the part where the volume is and wifi and battery and such…
I don’t know how useful a minimized app will be, but you do have the ability to control if it suspends or not, so it sounds like there may some backgrounding, though as a rule we don’t support it. I’ll see if the engineers can provide an answers.
However, we almost certainly at this time don’t create apps that can go into that tool area. Those type of system utilities are very likely going to need to be written in native code. I found this which might be of use:
http://www.codeproject.com/Articles/36468/WPF-NotifyIcon
There are a couple of other forum posts where Josh talks about integrating plugins and such.
Rob
How do i control it so it doesnt suspend when minimized?
window = { suspendWhenMinimized = true, },
I did that… For a test I made it so every keystroke it counted +1… And it doesn’t work…
What are you trying to do?
So when you open the exe the counter starts and every time you press a key on the keyboard the counter goes up by one… But when the application is minimized it doesn’t count the keys pressed…
And I wouldn’t expect it to. Like I said in the first post, Corona SDK apps are dependent on an active screen so we can do frame updates. We have never supported Lua code executing while the app is not active on the screen. There has to be some reason why we would not suspend when minimized, but I don’t know the use case for it.
I now Michael peeked in here earlier, but it is the weekend and I wouldn’t expect any attention from them until next week.
You still really didn’t answer my question, what are you trying to do that requires a system tray app? What are you trying to do in the background?
Rob
You only get “key” events when the application is the main open window. So you should be able to run timers and the like while minimized, but input only matters when you are focused on the game.
oh sorry @Rob … i want a key counter to see how much times i pressed my keyboard ; With a timer to see how many times in a X amount of time … if that makes sense…
So its not possible? (to run an app in the backfround) Maybe you could ask the devs to get my idea working in the future?
This certainly won’t work. You would have to tie into the keyboard system at a low system level, like a keylogger does and there is no way Corona SDK will do that. The app with focus (or the OS if no apps are in focus) gets the key events.
You need to do native work if you want to do that.
Rob
Alright thanks for clarifying that!
Corona assumes you have an active UI. You should be able to minimize your desktop app, but don’t expect to do any background processing since we expect to be able to update the screen when things change.
Rob
Well in the build settings i added
defaultMode = "minimized"
and when i start the exe it starts it as minimized but i need it to be in the part where the volume is and wifi and battery and such…
I don’t know how useful a minimized app will be, but you do have the ability to control if it suspends or not, so it sounds like there may some backgrounding, though as a rule we don’t support it. I’ll see if the engineers can provide an answers.
However, we almost certainly at this time don’t create apps that can go into that tool area. Those type of system utilities are very likely going to need to be written in native code. I found this which might be of use:
http://www.codeproject.com/Articles/36468/WPF-NotifyIcon
There are a couple of other forum posts where Josh talks about integrating plugins and such.
Rob
How do i control it so it doesnt suspend when minimized?