[Q] How To Constant Query Device Orientation During Task

160 views
Skip to first unread message

Glenn Brown

unread,
Feb 10, 2016, 7:00:24 PM2/10/16
to Tasker
Hi there, I am working on a project that can display scenes for the relevant task, but how do I get the device to monitor if the device Orientation is changed during the task.

At the moment, I have 2 separate profiles from my task profiles which check Device Orientation and set variables to portrait or landscape & clears the other.

So now when my task runs, it checks the current set variable and shows the correct scene. See attached image.

But how do I make it destroy the scene & show the other orientation scene if go from landscape to portrait, as it has large ran the check to show scene in first place.

The only thing I can think, is to have the show scene as a separate tazk & call it in my main task at the beginning, then middle & end?
tmp_19533-Screenshot_2016-02-10-23-57-43-1706918418.png

Rich D

unread,
Feb 10, 2016, 7:25:26 PM2/10/16
to Tasker Google Groups Post

> At the moment, I have 2 separate profiles from my task profiles which check Device Orientation and set variables to portrait or landscape & clears the other.

Why are you changing the scene when the device rotates?  Tasker already detects device rotation and will show either the portrait or landscape view as needed.  You can edit and change these views as necessary in the scene editor.

Glenn Brown

unread,
Feb 11, 2016, 8:13:00 AM2/11/16
to Tasker
Because, when you make a scene, you have to specify the width x height of the scene in pixels, and Orientation. See attached images.

So when I run my task, it reads the device orientation variable as portrait or landscape and displays correct scene.
I just can't figure out how to get it to destroy the landscape variable scene and show portrait when landscape is cleared and portrait is set
 


tmp_3316-Screenshot_2016-02-11-13-01-26-1644670309.png
tmp_3316-Screenshot_2016-02-11-13-01-001875130710.png

S Williams

unread,
Feb 11, 2016, 8:39:22 AM2/11/16
to Tasker
As Rich stated a single Tasker scene will take care of this. Turn auto rotation on in your device settings then while creating your scene rotate your device between landscape and portrait edit as needed. The scene will then display these two different orientations when launched.

Glenn Brown

unread,
Feb 11, 2016, 7:11:27 PM2/11/16
to Tasker
I had tried this previously & it never seemed to apply each orientations setup correctly. Meaning things would be all over the screen instead.
I have tried this again and it has worked, lol thanks guys.

any advice on how to monitor if device has an active internet connection? doesn't need to be specific as to data or wifi, just as long as connected?

Jean Dowe

unread,
Feb 13, 2016, 9:12:31 PM2/13/16
to Tasker
Make a profile for orientation check, then do a variable check for %PACTIVE matches *,NAMEOFORIENTATIONPROFILE,*

Then run checks for that variable match in your task. Done.

Glenn Brown

unread,
Feb 14, 2016, 5:25:37 AM2/14/16
to tas...@googlegroups.com

I'm past this stage now, thanks to advice regarding turn auto rotate on when creating scenes.

How can I check for an active mobile data or active WiFi connection??

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/W_CSTwD4GEI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Rich D

unread,
Feb 14, 2016, 6:45:47 AM2/14/16
to Tasker Google Groups Post

> How can I check for an active mobile data or active WiFi connection??

'Search' is a good place to start. 

'test for internet connection'

Glenn Brown

unread,
Feb 14, 2016, 8:11:30 AM2/14/16
to tas...@googlegroups.com

Well I've got wifi checks working, but I need mobile data check, any advice ??

--

Rich D

unread,
Feb 14, 2016, 8:20:48 AM2/14/16
to Tasker Google Groups Post

> Well I've got wifi checks working, but I need mobile data check, any advice ??

Did you find the post from the search (of this forum). It had a few options to simply tell if you had a connection.

If you need specific help with your profile then post the exported profile description along with a details of exactly you are trying to  achieve and what is and is not working.

To post your profile or task here...  Long press on the profile or task name / ( 3 dot menu with 4.0+ ) export / export "DESCRIPTION" to clipboard (not XML)

Any linked tasks will be exported with the profile they are linked to..

To be able to export, The beginner mode needs to be off and the profile needs to be named by you (Not the Tasker listed name.  Tasker will list your profile with the context name if you have not given it one).

Reply all
Reply to author
Forward
0 new messages