Workaround for Profile trigger on File/Folder change?

32 views
Skip to first unread message

nmyshkin

unread,
Aug 11, 2022, 12:25:11 PM8/11/22
to Tasker
I've run into problems with a wonky media scanner and can't seem to get any recognition that a change has been made in a folder or file. I can approach the whole thing differently, making the trigger actions part of the larger task when a certain thing is done, but then I am stuck with needing to access some variables with a different Tasker routine (or eventually, App) and am not sure I can even do that. Maybe finesse around it by saving the variable to a file and then have the second routine read that value?

Anyway, I haven't got much else in terms of "creative" solutions and am hoping someone else might see a simpler route. Whatever the approach, it has to be pretty basic and granular as I am working with a very old version of Tasker and an e-reader running Android 2.1.

Any ideas?

jmjc...@gmail.com

unread,
Aug 18, 2022, 9:42:17 PM8/18/22
to Tasker
Which context did you use? Did you try the File Modified context?

nmyshkin

unread,
Aug 20, 2022, 12:23:54 PM8/20/22
to Tasker
Event>File Modified. Also tried "File Attribute Change". The device is simply not going to be able to detect changes without a reboot. That's just the reality of the old Android OS (and even some newer ones...I sometimes have the same problem with a tablet running Oreo).

nmyshkin

unread,
Aug 20, 2022, 2:32:57 PM8/20/22
to Tasker
Well, I think I have a work-around. It's not what I had hoped, but it will do the job. I wanted the profile to work so I would not have to split the app, thus raising issues with shared variables.

But, I need to share the variables, so I have tried writing a single digit to a file and then reading it back, splitting to get just the single digit as a variable again. This works, but it takes time. These e-readers are not the fastest devices on the block.

The purpose of the variable is to identify the type of book and, therefore, the reading app to open when either the bookcover image or the open book icon in the status bar is tapped. It finally penetrated my thick skull that the second app could do this busy-work in the background, based on whether the first app has closed or not. This is a trick I have used before on this device. That way, when the icon is tapped the variable is already known and it's either choice 1, 2, or 3. Done!
nstg_ui.png

nmyshkin

unread,
Aug 20, 2022, 6:39:38 PM8/20/22
to Tasker
Ha-ha. Not done. These apps just never really close and in this case I need it to remain available for it's major function. I guess I never tried the trick before with a Tasker app.

So I am still in need of a workable trigger.
Reply all
Reply to author
Forward
0 new messages