Track Recording in a certain profile should activate the flight mode automatical

Started by Graf Geo, July 22, 2024, 11:32:22

0 Members and 1 Guest are viewing this topic.

Graf Geo

Hi, I have just discovered this forum section on Tasker.  :)

I recently installed Tasker for the first time and have already created some useful profiles. So far I have only created a profile for Locus that automatically activates GPS when Locus is running in the foreground. It works fine.

What I would like to have: I have a recording profile "Running" that I have always used for jogging. When I'm jogging, I always switch on flight mode so that I'm not disturbed when I'm out and about. Of course, I forget to do this from time to time and then an incoming message or call annoys me in the middle of the run.

Is there any way to get Tasker to automatically activate flight mode when the recording is started in the Running profile (and only in the Running profile)?

I think I read somewhere on the web that someone has set this up, but I can no longer find the page. ChatGPT has given me instructions, which are unfortunately not useful.

I am an absolute beginner with tasker and am still finding it quite difficult.

Translated with www.DeepL.com/Translator (free version)
SG S10, Android 12, LM 4 Gold (last Release version or Beta)
  •  

lor74cas

HI,
you can create a profile that activates based on notifications.
When a Locus notification appears with "running" then activate flight mode.
Locus Map 4
Locus Map for Garmin
Locus Tasker
  •  

Graf Geo

Thank you very much, but unfortunately I can't get it to work. I tried to create a corresponding profile (according to the instructions of Chat GPT), where I could also type in Chinese characters:

Profil
Event: Notification
Owner Application: Locus

(Permisson has been granted.)

Task:
1. Variable Set
Name %NotifyText To %NTEXT
2. If %NotifyText ~ *Laufen*
3. Flight Mode AN
4. End If

See screenshot.

But nothing happens. Not even when testing.

I would need proper instructions for dummies, please. thanks


SG S10, Android 12, LM 4 Gold (last Release version or Beta)
  •  

Graf Geo

I think I've got it. Chat GPT is simply not ideal for something like this.

I've now managed it with trial and error and a bit of thinking. It's much easier. Just write *Laufen* in the Title line in the profile (Event: Notification, Owner Application: Locus) and you're done. Unfortunately, I didn't realise what the individual title, text, subtext etc. fields meant at first and where you can rewrite them.

Supplement: And a second profile switches flight mode off again after the recording has ended, which generates a different notification. Perfect.
SG S10, Android 12, LM 4 Gold (last Release version or Beta)
  •  
    The following users thanked this post: Tapio

Tapio

I am not testing it, also no experience with notification interception. Just compare with this one, don't waste actions, don't create unnecessary global variables.
For super simple profile tasks of no value use anonymous tasks (are created if you don't name the profiles task). They just belong to a profile and don't appear in your task list.

https://taskernet.com/shares/?user=AS35m8kdDIMDeveQcQfRglam%2Fah1mTW%2FWcg05FZ39c0i1q%2F77iY3E7cIwxCkXqJTaTA%3D&id=Profile%3AAirplane

The notification profile passes many local variables %eventprm into the entry task.
Tapiola MFV4+ theme for OAM Maps:
Discuss - Releases - DL latest - Install latest
  •  
    The following users thanked this post: Graf Geo

lor74cas

Event
Owner: Locus Map (use the app selector)
Title: *Laufen*

Task
airplane mode
Locus Map 4
Locus Map for Garmin
Locus Tasker
  •  
    The following users thanked this post: Graf Geo

Graf Geo

Quote from: Tapio on July 22, 2024, 14:55:15I am not testing it, ...
For super simple profile tasks of no value use anonymous tasks (are created if you don't name the profiles task). They just belong to a profile and don't appear in your task list.

https://taskernet.com/shares/?user=AS35m8kdDIMDeveQcQfRglam%2Fah1mTW%2FWcg05FZ39c0i1q%2F77iY3E7cIwxCkXqJTaTA%3D&id=Profile%3AAirplane

The notification profile passes many local variables %eventprm into the entry task.

That's right. It's shorter, more elegant and also works.
first task:
%eventprm2 ~ *Laufen*  -> Flight Mode ON
second task:
%eventprm3 ~ *Laufstrecke* (Track name component that is automatically saved in this profile) -> Flight Mode OFF

Thanks!
SG S10, Android 12, LM 4 Gold (last Release version or Beta)
  •  
    The following users thanked this post: Tapio