Today, when I try to use the location simulation, I find it is unresponsive.
Prior to this, I was able to resize the simulator, and go to any location. Today, none of these inputs work.
Also, is it possible to change the default lat/long in the simulator?
It currently defaults to a location that is not very useful to me.
Thanks,
-Craig Lang
Horizon Technologies
You can change the default location by entering your desired Latitude and Longitude to the fields provided and Update, then close the location window.
Whenever you run app, it will now default to that location. I agree that location simulation should remember your last used location when it's opened and it shouldn't change the default to New York. I believe this is something Codenameone team could provide.
Your location simulation maybe freezing if you're using the update Piotr provided, as it may contain minor bug. Check if you are getting any Exception in your console.
Maybe these pull request are solutions:
https://github.com/codenameone/CodenameOne/pull/1703
https:/github.com/codenameone/CodenameOne/pull/1707
The first one added all locations parameters to the form and remove update button as not needed, you need just change value or move you mouse wheel. This pull request was accepted free days ago so it should be on production?
The second one add store form fields and waiting for accept.
New Location Form
Related
So I am developing a VR app in Unreal and I'd like to give the user the ability to take a screenshot in game through the click of a button.
I am currently taking a screenshot through a console command but, it doesn't allow me to change the file location of where it goes. I don't think it will be intuitive enough to users to look into the AppData folder.
Is there a way to change this file location?
Does anyone know of any other ways to take a screenshot in game in Unreal Engine and save it to a folder or something similar?
Is there a function library or anything I can utilize?
Check this thread out:
Unreal Engine 4 In-game Screenshot
You should continue to use the console command; it's the easiest way to do this in my opinion. In C++, you can expose your screenshot default folder with ProjectSavedDir(). That being said, you can get references of your screenshots and move them to another FPath location. For a bit of a better translation, take a look at these macros: https://docs.unrealengine.com/en-US/API/Runtime/Core/Misc/FPaths/index.html
I found a really easy way to change where the screenshot gets saved at. I was really surprised how easy it was actually. Essentially, all you have to do is add an argument to the console command.
HighResShot 1920x1080 filename="D:/Screenshots/screenshot.png"
However, you need to ensure that the file name is unique, otherwise it will just overwrite the screenshot every time.
I ended up just grabbing Time Now and appending the date inside of the screenshot name. So that it ended up looking something like this:
HighResShot 1920x1080 filename="D:/Screenshots/screenshot_2020-6-5-8-40-01.png"
I'm new to Mac development, so I can't tell if what I need to do is even possible.
I need to create an application that gets a callback for when a desktop space is about to change and when it successfully does. I also need to override the change to cancel it if need be. For example:
Space Change Initiated -> Run My Code -> Change Space |OR| Cancel Space Change
The only thing that I could find was: NSWorkspaceActiveSpaceDidChangeNotification which sends a callback when the space has successfully changed. This will not be good enough.
I'm not begging for code btw, just looking for a direction to be pointed in to achieve what I want (if at all possible). I'm open to all suggestions, even if they are in different programming languages.
Thanks in advance.
I know about Sandbox limitations and and my usual technique of having the user save a file is via the NSSavePanel, which automagically grants the app the necessary priviliges to the location, as indicated by the user.
Now, here's the... not-so-uncommon scenario :
User creates a new file, in my app
Saves is for the first time (so, there's a good reason for the NSSavePanel to show up)
Then edits the contents of the document (please, note that my app is not a typical NSDocument-compliant one)
And finally he want to re-save it. (not "Save (it) as.." but just... "Save (it)" - since he's already specified a location, right?)
How is this doable? What's the "approved" way of achieving that? I've read about bookmarks but a) I'm not sure whether it is what I need, b) I haven't managed to find any real code example.
So, any ideas?
Please, note : no-matter-what, the solution must be fully-functional for 10.6 as well.
UPDATE : Hmm... That's just weird (or at least unexpected). Just tried re-saving at a previous location already selected via NSSavePanel and it seems to be working (without doing anything). Is that possible? (And yep, just re-checked it twice : the app is sandboxed)
You provided your own answer - “which automagically grants the app the necessary priviliges to the location, as indicated by the user” - when the user selects the file in the file panel the sandbox is extended to include the selected location and for the rest of the current execution your app my access it.
turn on location services to allow to determine your location
When we try to access location services this pop up. However it doesn't pop up consistently. I think it shows up once. How do I make iOS show it consistently?
Note: I am aware that there is a question here: get alert for current location every time. All the answers talk about how you should change the settings. That's what the user should do. I want iOS to pop up alert consistently to users.
well this option pops up when there location service is disabled.and it is needed only there. so the question for you is
why ? why you want to show it consistently?
The alert shows up automatically when we call
[singleton.locationManager startUpdatingLocation];
A common mistake noobs like me make is to check first whether location update is enabled or not and then not calling that line when it's not. So the alert doesn't show up.
Coincidentally those are the exact pattern recommended by IOS. Many questions almost the same thing but none of the answers there point to this fact.
I'm looking for a way to use your location to determine whether you need to unlock your phone or not, eg at home you just slide to open, but as you leave you then need to enter your code.
Nope, you can't, since your app would be run in a Sandbox, so it can't interact with the whole system (Springboard etc).