Detect camera usage

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Detect camera usage

Post by MURTUMA » 12 Sep 2014 06:29

I have a flow, which I use for *something* when I use any of my camera apps. Currently I use trigger to detect when I open the app but I also don't want it to trigger when I use the apps editing functions.

Some apps open the editing functions in different activity which allows my flow to not to trigger. However, some apps open those within same activity and I cannot differentiate between editing and taking pictures.

Would it be possible to universally detect by a trigger or condition when an app is actually using the camera? If not, would that be possible to implement such feature in automagic?

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Detect camera usage

Post by Martin » 13 Sep 2014 07:49

I don't know about a way to detect camera usage in general. On a rooted device you could check if the log of your device prints something special when the camera is used. If this is the case, you could execute a flow with trigger Command Output and the appropriate filter.
You could also use an action Take Picture which usually fails when the camera is already in use by another app. I'm not sure how good this mechanism works since preparing the cam and taking a picture can take several seconds.

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: Detect camera usage

Post by MURTUMA » 14 Sep 2014 17:31

I can't find anything useful in the log. Or might be I just missed it. Multiple times..

Can anyone confirm this with gingerbread?

Post Reply