I am trying to build a voice assistant and so far i have succeeded very well, the only problem is when i launch the assistant it works flawlessly, untill i alt tab out of the window, or just simply switch to another software. The speech.recognizer (its a dictation recognizer) stops working and as far as i see can' t run in the background even though my project is set to work in the background. Everything else works again after manually restarting the dictation recognizer after being in the foreground again by OnMouseClick(). (That' s what i do atleast as OnLostFocus() seems not to work for me)
Anyone that has an idea on why it stops and how to fix it?
Thanks!
Tried restarting in the background by OnLostFocus() but didn' t work
You need to enable run in background option in the player settings
Related
I have a screen on my app that tracks the location (geolocator) and time with (timer_builder) when the user hits start button. When the screen locks/sleeps, it stops (or pause) tracking the location, but it should pause just when the user hits the stop button.
Could anyone help me on this?
I believe there is difference between running the app on background vs on lock screen, because I just found topics about running the app on background with android_alarm_manager/background_fetch (on this case awaken app in the background about every 15 minutes would not work too).
One solution would be prevent screen from going into sleep/lock mode, but then battery is problem. Any other solutions?
Thanks in advance!
I think background geolocation is a hard problem. However there is a project, flutter_background_geolocation. It works with debug mode. Unfortunately, in release mode, you need to purchase a license.
You can create background tasks with Flutter, see this article. Never tried it though.
I'm pretty new to Unity. I have a button that works perfectly in the editor. When I build it and run on Windows or Mac, the button stops working. Other buttons on the same canvas work fine.
If I recreate the button from scratch and then build after each setting, it seems that it stops working when move it - if the X position is 0 it works, otherwise it will not. It still works in the editor at runtime, but when I build it, it stops working.
I'm not sure where to look to see what is happening. Any ideas?
That doesn't seem right. Can you confirm that the Raycast Target is checked on your Button component? It might be that it is off and another object in the scene is preventing you from clicking on it.
This is super strange. This simple button is not clickable at all. But when I close the Unity and Mono editors and fire it up again, it will work - only once. I mean, the second time you hit the play button, the button will not work anymore. I didn't change settings of the button or the canvas. I just put them in the scene and click play button. I think this is a bug? But there's no log i can see. This is bugging me for good 30 mins. I even restarted my PC and still working only on the first hit of play button. Thanks
EDIT: just found the problem. This problem occurs when you use the Unity Remote app on Android. It will work first. But when you try it the second time, buttons are not responding anymore. The only solution I found for this is to reinstall the Unity. Tried restarting PC but didn't work. Soo, peace out. Thanks
Try to turn on the Force Module Active property on inspector in EventSystem. I had the same problem on Version 5.3.1 on my machine (macbook pro mid 2010 on OSX El Capitan). Deleted the Unity, rolled back to 5.2.2, upgrade to 5.3.3, the problem is still there. Did that and somehow it works, but I don't know the reason why
I'm new to augmented reality, and I'm using vuforia 4.2.3 and unity 5, I followed all the steps trying to make a test run and whenever the camera detects the target the whole screen turn white, I've tried many thing but none of them worked, can someone help me?
I had a problem that sounds similar.
There is a known bug that causes white screen, could be related to that? See here for more info.
What worked for me was to change the VideoBackground.shader code, as described on that thread.
Go to Project>>Qualcomm Augmented reality>>Shaders
Double-click VideoBackground. This opens up Mono.
In the code, change where it says:
"queue"="geometry-11"
to this:
"queue"="Geometry"
Save, rebuild etc.
Worked for me.
Here are my issues,
When I install my application on my test device it has the behaviour I want.
However if I close it with the IPhone main button and restart with the icon, it starts back from the view where I left it, whereas I would like it to restart from my main view controller (my start view).
In the same way, I load some animations with viewDidLoad in certain views. I want them to show only the first time the view is loaded each time the application is launched. Right now animations only works the first time the application is launched after installation, then they don't screen anymore when I launch again the application.
Does anyone have a clue ?
Thank you very much for your help.
(Sorry if this topic is a bit easy for you guys :D, I'm quite new at it !)
No problem about being new! This is happening because, for devices from iOS 4.0 on up, your app will support multitasking by default. To disable this features, Add the key
UIApplicationExitsOnSuspend
to your Info.plist file, and set its value to YES. Good luck!
In addition to Sam's answer above, you can also add a key named:
Application does not run in background and set the value to YES.
Both work fine, however.