I’ve considered that too, but honestly I’m just too lazy to sort out the pictures taken while standing at traffic lights.
However, I’ve just successfully tested this with Tasker! I use my integrated camera app though, as I’ve recently got a Xiaomi Mi 9 and it doesn’t seem to give any other camera app access to the wide angle lense. It works with open camera too though, in case OC detects the wide angle camera on your device.
So what I did is the following (easier and with pictures explained at the bottom): First, I’ve created a profile thats if statement is the camera app. So the profile will become active when I open the camera. The first action of this profile is to start GPS search, while checking the options “immediately continue with task”, “continuous search” and “continue task after error”. Note that the options might be labeled differently, I’m using Tasker in my locale so the English option labels might be different. This profile was just for testing purposes but I’ll keep it in case my camera app fails to update GPS frequently enough. After this action I’ve added another one, that is plugin > AutoInput > UI query > app package: com.android.camera (for open camera use com.sourceforge.opencamera). That generates a variable with the app name, so @aiapp will be “Camera” or “Open Camera” or whatever camera app you’re using. After that I added task > if > %aiapp ~ camera, and below I added go-to action > action number 1 (= if the camera app is still open, repeat the profile, i.e. continue scanning for GPS) and else stop the task (=don’t scan for location anymore)
Then I added another profile that is variable > variable set > %CurLoc. I’ll explain in the next profile why I didn’t use the built-in %LOC here. The action of this profile is taking a picture. I accomplished that using AutoInput again. In my stock camera app this is Type=Id, value=com.android.camera:id/v9_shutter_button_internal, Action=click. So basically this means as soon as a new location is set (that isn’t the same as the last one, hence the %CurLoc instead of %LOC) to take a picture.
Next profile is setting up %CurLoc. The if statement of this profile is event > variable > variable set. So every time a location is reported (no matter if its the same one or a new one) this profile will trigger. Since I want this profile to update the %CurLoc variable as soon as a different location is reported, the action list is the following: First, set %CurLoc to %LOC (so %CurLoc will start with the current location). Now an If statement; if %CurLoc ~ %LOC, wait one second, then go-to action number 2. That means if %CurLoc is still the same as %LOC (= I haven’t moved since the last location update), do nothing, wait a second, go back to the if statement and check again if %CurLoc is still the same as %LOC. If it is, repeat the above forever until it isn’t. Now if it isn’t the same (else statement) it goes back to step one; setting the %CurLoc to %LOC, which will trigger the “%CurLoc variable has been set” profile, which will then trigger the camera shutter button.
What I did, but that’s completely optional for functionality, is set up another variable that is %MapillaryActive ~ true/false. I switch that variable manually and set it up as an additional if statement for all profiles; that allows me to easily switch all the profiles on or off from a home screen shortcut without going into Tasker and toggling them all three manually every time I want to take photos.
Now this probably sounds more complicated than it is, especially if you don’t have experience with Tasker. So here’s an imgur album with screenshots in case anyone wants to do it like this (I’ve changed Tasker to English for those): https://imgur.com/a/eRDxE5b
I’ve added captions to the pictures to explain what the stuff is below the pictures, probably easier to understand than what I’ve wrote above.
The setup works fine!
Edit: I’m on the go at the moment but I’ll upload the tasks as xml files later so anyone can just import those if they wanna test it (you’ll then only have to edit device specific stuff like the shutter button name)
Edit: The xml files for import are, for profiles this, this and this and for tasks this and this.