Hi Anke
Sorry for the delay, great idea to bypass the trigger routine!
I tried it the same day but didnt work.
But have been fighting ever since to make a video of my screen to show it, as by now I think it would be usefull for people to actually see …. because by now I wouldnt believe the behaviour I am describing. As such attaching a short video to show. Was more difficult then I thought to make a screen recording!
Not sure it this violates the fórum policy, if so let me know and I will delete it…
Have added in the timmer routine to change the label to triggered, just so we can see it does trigger the clock routine. I hope you see clear in the video that it makes the picture but is not picked up, but you can see in the end two pictures in the pictures folder.
Really strange what is happening, am completely lost now, also found when I close an application the app closes including a close screen and a close application statement, but somehow Motorola leaves it in the application tray?
More and more I am thinking this is something with Motorola. Would be good if there is a user with a Motorola that can confirm similar behaviour.
… remove all pictures from the folder .../Pictures, take the first picture and don’t take the seconds one.
Go to your device folder and see if there is a picture stored (.../Pictures/...jpg).
Hi Anke
yes, the picture shows up in the folder. Also tried to show that in the video, allthough true between pictures didnt show you the screenshot of the /Pictures folder but it does happen
When I go back to the screen of the apllication, the label that I set to text: Timer Triggered, goes back to default label text.
As I didnt change anything in code, and we are not getting the image. Am now doubting if somehow the app crahes and respawns automatically? Would imagine that it would always keep same PID, as such will see tonight if somehow I can see if the PID changes at the first picture taken and not in any subsequent ones…
Allthough dont understand why it would just have this behaviour on the first picture.
As I understand the screen should only initialize once, as such when in timerloop the label changes, as such should not go back to orignal value. As you can see from the screenshots it does, as such my feeling it crashes/respawn the app?
Is this a correct understanding of the process? As I cant find a way to get the PID from the system, was the only thing was able to think of to test. As said the other camera app I have installed does not have this behaviour
So it could be the camera call?
Am thinking maybe I can try to further troubleshoot, and do an activitystarter to the camera and see if this has same or different behaviour then using the actual camera block??
looking at the logs and the launcher to the camera, I did the same thing but in activity starter
same thing happens, triggering the camera with the action: android.media.action.IMAGE_CAPTURE it crashes the application and respawns
As such any code we put to try to get the image is resetted
Attached the log to show the app is killed and respawned
05-18 00:29:36.915 1930 1945 I ActivityManager: Killing 15030:appinventor.ai_sergenugteren.test_camera/u0a216 (adj 900): remove task
05-18 00:29:36.976 1930 3122 I WindowManager: WIN DEATH: Window{dd96a57 u0 appinventor.ai_sergenugteren.test_camera/appinventor.ai_sergenugteren.test_camera.Screen1}
05-18 00:29:41.713 1930 7383 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=appinventor.ai_sergenugteren.test_camera/.Screen1 bnds=[160,1028][293,1210]} from uid 10053
05-18 00:29:41.797 1930 1958 I ActivityManager: Start proc 17412:appinventor.ai_sergenugteren.test_camera/u0a216 for activity appinventor.ai_sergenugteren.test_camera/.Screen1
I then just performed a launch and changed you image trigger code to the DCIM/Camera folder. And then it works
Something in the android.media.action.IMAGE_CAPTURE to the moterola package, the app crashes and respawns. And as the second picture then does work, it seems to only happen at the first intent?
background
adding activitystarter with following settings:
action
android.media.action.LAUNCHER
class
com.motorola.camera.Camera
package
com.motorola.camera2
Hi Anke
thanks for helping out… I think as a final step I could add the timer activated and piccount in TinyDb and , as such when app crashes and respawns it will read the latest values and as such the timer will run and update picture, almost without the user noticing…
Anyway as the workaround is installing and using another camera app, and it seems that this is very much an isolated issue with a singular device/OS level, I think we have reached to the end of this thread
Again thanks for all the inputs and thoughts
Serge