Best way to find when camera is accessed?

34 views
Skip to first unread message

Thomas Riley

unread,
Oct 9, 2014, 3:52:22 PM10/9/14
to tas...@googlegroups.com
I don't like using my phone in landscape mode. I'd rather have it in portrait, so I have my rotate disabled. But Facebook messenger relies on screen orientation to rotate pictures on a send-- if rotation is disabled, then it assumes it's a portrait, even if I did tilt the phone. So I only want the messenger app to rotate when the camera is activated.

I tried setting up an event with the camera app and service, but to no avail.

Scott Miller

unread,
Oct 9, 2014, 4:23:37 PM10/9/14
to tas...@googlegroups.com

To help with the rotation control, take a look at Ultimate Rotation Control. It includes a Tasker plugin so you should be able to take advantage of that to switch your orientation.

https://play.google.com/store/apps/details?id=nl.fameit.rotate

Scott

On Oct 9, 2014 3:52 PM, "Thomas Riley" <baul...@gmail.com> wrote:
I don't like using my phone in landscape mode. I'd rather have it in portrait, so I have my rotate disabled. But Facebook messenger relies on screen orientation to rotate pictures on a send-- if rotation is disabled, then it assumes it's a portrait, even if I did tilt the phone. So I only want the messenger app to rotate when the camera is activated.

I tried setting up an event with the camera app and service, but to no avail.

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Thomas Riley

unread,
Oct 9, 2014, 5:00:56 PM10/9/14
to tas...@googlegroups.com
While that's a great way to enforce the rotation (I'll almost definitely use that), I still need to find a way to detect when the camera is accessed.

Scott Miller

unread,
Oct 9, 2014, 6:11:33 PM10/9/14
to tas...@googlegroups.com

The camera is an app, so you should able to use an app context to determine it is foreground.

Scott

Thomas Riley

unread,
Oct 9, 2014, 6:41:41 PM10/9/14
to tas...@googlegroups.com
That's what I thought, too. It works perfectly well on the camera app, but it doesn't work inside Facebook Messenger.

Scott Miller

unread,
Oct 9, 2014, 7:10:37 PM10/9/14
to tas...@googlegroups.com

I'm assuming the camera is integrated into Facebook messenger. I won't be able to help with that. I don't use Facebook, let alone Facebook messenger. Good luck.

Scott

--

Rich D

unread,
Oct 9, 2014, 8:27:49 PM10/9/14
to Tasker Google Groups Post


> That's what I thought, too. It works perfectly well on the camera app, but it doesn't work inside Facebook Messenger.

You could try the window variable %WIN . It is in the user guide and mentioned on this forum a few hundred times. You need to enable tasker in your android accessibility setting for %WIN to work. 

Thomas Riley

unread,
Oct 9, 2014, 9:16:46 PM10/9/14
to tas...@googlegroups.com
Sorry Rich, I forgot to mention that I have actually tried %WIN.

%WIN just displays "Messenger" on both the sending text and the picture part of the app, so it's not quite what I'm looking for.
Reply all
Reply to author
Forward
0 new messages