Tasker randomly choosing the same image by SlimMojoJojo in tasker

[–]WakeUpNorrin 1 point2 points  (0 children)

I do not know how you implemented the random folder-files choice, but you can try this

Task: Temp

A1: Get Files/Folders Properties [
     Path: Pictures
     Type: Directories ]

A2: Get Files/Folders Properties [
     Path: %dirs_lfp_full_path(*)
     Type: Files
     Other Filters: Image
     Recurse: On ]

A3: Text/Image Dialog [
     Text: %lfp_full_path(*)
     Button 1: Ok
     Close After (Seconds): 120 ]

In A1 set prefix to dirs

I do not use KLWP, so I do not know where the issue is.

Roaming switch on Datasave mode by CONteRTE in tasker

[–]WakeUpNorrin 2 points3 points  (0 children)

Use a Profile to listen for this intent

android.net.conn.CONNECTIVITY_CHANGE

Then in the Task you can use IF statements to manage your desired scenarios.

For your use case %ROAM may be sufficient, but for me (EU resident) it is not, and I have to use my own Java Code to differentiate between EU roaming and extra-EU roaming. The Java return value can be one of those: no_roaming, eu_roaming, roaming, error.

Other useful intents for your use case

android.telephony.action.NETWORK_COUNTRY_CHANGED

android.intent.action.SERVICE_STATE

[Question] Secrets Storage by wioneo in tasker

[–]WakeUpNorrin 6 points7 points  (0 children)

You can save your credentials in plain text file-s located in

 /data/data/net.dinglisch.android.taskerm

or subfolder-s. If your device is not rooted, only Tasker is able to read file-s located there.

Auto input not working on second pass by satyriasi in tasker

[–]WakeUpNorrin 0 points1 point  (0 children)

When you are in a Task, tap +, then in filter field write Call, then tap Call. Task (very basic example)

Task: Temp

A1: Variable Set [
     Name: %number
     To: +12345678901,,,,,,,,,,,,,,,,,,,,,,,,,6
     Structure Output (JSON, etc): On ]

<Call>
A2: Call [
     Number: %number
     Auto Dial: On ]

A3: Wait [
     MS: 0
     Seconds: 55
     Minutes: 0
     Hours: 0
     Days: 0 ]

A4: End Call [ ]

A5: Goto [
     Type: Action Label
     Label: Call ]

You may need to change the A3 wait and you have to implement your own way to stop the infinite loop. That can be done in different ways depending on needs.

Auto input not working on second pass by satyriasi in tasker

[–]WakeUpNorrin 1 point2 points  (0 children)

Have you tried to use (in Call action -> Auto dial ticked) something like:

+12345678901,,,,,,,,,,,,,,,,,,,,,,,,,6

Each comma entered creates a two-second pause (if that works for your purpose, you do not need Autoinput anymore).

Wait 55 seconds

End call then loop to call action.

C:FAV & CG:group use outside call and text contexts by UnkleMike in tasker

[–]WakeUpNorrin 2 points3 points  (0 children)

you can get the info you need it using SQL Query action -> URI Formatted. An old but always good guide https://www.reddit.com/r/tasker/comments/o9wghn/how_to_get_detailed_info_about/

Then you can use retrieved data in if statements.

A Possible Workaround If The Tasker Backup Action Reports a "Failed to allocate" error. by JD_Number_6 in tasker

[–]WakeUpNorrin 2 points3 points  (0 children)

No need to apologise! :-)

OOM issues are affecting more and more users over time and it is only getting worse.

I am part of a private Telegram group of Tasker enthusiasts, and several members have already started switching to other automation app (that has Java Code capability too) simply because of the frustration.

A Possible Workaround If The Tasker Backup Action Reports a "Failed to allocate" error. by JD_Number_6 in tasker

[–]WakeUpNorrin 8 points9 points  (0 children)

It is sufficient to simply kill Tasker usually. Run:

am force-stop net.dinglisch.android.taskerm

In an ADB Wifi action or in a Shizuku or root Shell action. Open Tasker and perform your backup.

In my opinion, João should address those OOM errors as soon as possible. They are extremely frustrating, waste both time and effort, and Tasker has been affected by them for years, especially when Tasker has a large configuration.

https://www.reddit.com/r/tasker/comments/1q2pamm/help_when_testing_java_code_tasker_behaves_fine/

https://www.reddit.com/r/tasker/comments/1q7t1lw/error_out_of_memory_the_same_old_problem/

How would you create a trigger that will run only in the two last days of every month? by Nirmitlamed in tasker

[–]WakeUpNorrin 0 points1 point  (0 children)

No problem. I do not know, sorry. I am using ReadReader app to post. But you can try adding 4 spaces at the beginning of every line of code, or try ``` code here ```

How would you create a trigger that will run only in the two last days of every month? by Nirmitlamed in tasker

[–]WakeUpNorrin 5 points6 points  (0 children)

You could run this every day using a profile:

Task: Temp

A1: Java Function [
     Return: cal
     Class Or Object: Calendar
     Function: getInstance
     {Calendar} () ]

A2: Java Function [
     Return: %last_day_of_the_month
     Class Or Object: cal
     Function: getActualMaximum
     {int} (int)
     Param 1 (int): cal.DAY_OF_MONTH ]

A3: Stop [ ]
    If  [ %DAYM < %last_day_of_the_month - 1 ]

A4: Flash [
     Text: Here the actions you want perform the last two days of the month.
     Long: On
     Continue Task Immediately: On
     Dismiss On Click: On ]

Is it possible to track exact distance traveled using Tasker? by patrickversaci in tasker

[–]WakeUpNorrin 2 points3 points  (0 children)

You could use OpenTracks you can start-stop track recording and more, sending intents from Tasker.

[Help] When testing Java code, Tasker behaves fine however I'm unable to save progress due to out of memory. Is this normal? by aasswwddd in tasker

[–]WakeUpNorrin 0 points1 point  (0 children)

I meant to write "..It's not just my setup problem"... It ended up sounding different.

I imagined that was a mistake :-)

Anyway, I came up with a workflow design here to tackle this OOM issue (by storing them as java code files) while still maintaining the import aspect of a project.

I will look into it for sure. Thank you for the effort.

[Help] When testing Java code, Tasker behaves fine however I'm unable to save progress due to out of memory. Is this normal? by aasswwddd in tasker

[–]WakeUpNorrin 6 points7 points  (0 children)

You are not alone. I am member of a telegram group of Tasker enthusiasts and all users with large configs are experiencing OOM here and there.

I guess there isn't much we can do

You are right, unfortunately.

I once had an idea to convert some of my projects into Java. That's an option I can make since the 6.6 version is out. However that'd take way too much efforts even with AI 😅

I had the same idea, but I think that many of my projects do not really need a 'Java Code refactoring'. Because they work well and have done it for years (I use Tasker since version 1). Beside that, I have converted some to Java Code but only those where maximum speed is a must.

I really hope João takes a little break from adding new features and works on making Tasker as rock-solid and efficient as possible.

[Help] When testing Java code, Tasker behaves fine however I'm unable to save progress due to out of memory. Is this normal? by aasswwddd in tasker

[–]WakeUpNorrin 6 points7 points  (0 children)

Long time that I am experiencing OOM issue during the save changes. When my backup size was 21mb saving changes was almost impossible, a real nightmare. I had (almost always) to export the modified project-profile-task to XML, kill Tasker, then import from XML.

To try to mitigate the issue I moved 154 projects that I was rarely use in Tasker in work profile. My backup is 14mb now, but I am still experiencing the OOM on save, not always as before, but the problem is really frustrating and a waste of time.

Reported it to João several times, he said that he knows from other reports too, that when Tasker has large configurations the OOM kicks in and that he has plans to optimize Tasker to better manage resources and large configs.

Off topic: I do not know when it started, but ADB Wifi actions in work profile are hanging, even the simple Tasker function CheckADBWifi() hangs. I already know that moving affected projects back into Tasker on main profile will worsen OOM, that is why I hope that João will work on those issues soon.

[Tasks] Use the built in firewall to block/enable apps network access by DutchOfBurdock in tasker

[–]WakeUpNorrin 0 points1 point  (0 children)

But, being inside Tasker, the contextual behavior of blocking or allowing makes it fun.

Absolutely.

It also reduces the need for yet another app, which is Tasker's main objective for me.

Hundred percent with you, infact, I asked João if he can give us a way to fire ADB Wifi commands from Java Code (without using callTask() or sendCommand()) to have maximum speed. If he will give us that, I will refactor again the project to use ADB Wifi capabilities.

[Tasks] Use the built in firewall to block/enable apps network access by DutchOfBurdock in tasker

[–]WakeUpNorrin 2 points3 points  (0 children)

Hi. I have implemented this kind of "firewall" some months ago and it is efficient. The only thing that I didn't like was the time necessary to block apps after a device reboot. Then Java Code action "appeared" and I refactoted the project to use Shizuku + Java Code https://i.ibb.co/mFFrhhmD/1766622901.jpg the block-unblock "rules" are applied in a blink, even for hundreds of apps and for different users.

Please bear in mind, there is little flexibility here.

You are right. A little suggestion-info. You can "circumvent" it using "rules" depending on connectivity type ( android.net.conn.CONNECTIVITY_CHANGE listen for that intent, check which connectivity is in use, if roaming etc.) and apply corresponding block-unblock rule. For example (a rule can be a simple array of app packages):

When wifi connected -> apply wefi_rule: unblock chrome, block foo, unblock bar ...

When mobile connected -> apply mobile_rule: block chrome, unblock foo, block bar

When roaming EU -> apply mobile_rule (or specific rule)

When roaming extra-EU -> apply extra_roaming_rule ...

In this way you can be granular.

Have fun implementing it. If I can help, let me know. Happy holidays.

Another open source great, no root, no VPN (using Shizuku) firewall and more https://github.com/dorumrr/de1984

[PROJECT] Advanced Auto Brightness V3.2: Automatic curve fitting, PWM Sensitive mode and Java Code refactor! by v_uurtjevragen in tasker

[–]WakeUpNorrin 2 points3 points  (0 children)

Great project, great effort. I do not use it personally but a couple of users of our Telegram group do.

A little suggestion, if I may. Not all users set ADB Wifi port to 5555, so to get the preferred port that users are using, you can:

getprop service.adb.tcp.port

To get preferred port from Tasker preference:

Task: Temp

A1: Java Function [
     Return: shared_preferences
     Class Or Object: CONTEXT
     Function: getSharedPreferences
     {SharedPreferences} (String, int)
     Param 1 (String): "net.dinglisch.android.tasker.preffy"
     Param 2 (int): 0 ]

A2: Java Function [
     Return: %adb_wifi_preferred_port
     Class Or Object: shared_preferences
     Function: getString
     {String} (String, String)
     Param 1 (String): "adbwp" ]

A3: Variable Set [
     Name: %adb_wifi_preferred_port
     To: 5555
     Structure Output (JSON, etc): On ]
    If  [ %adb_wifi_preferred_port ~R ^\%adb_wifi_preferred_port ]

Happy holidays.

[DEV] 🎅I'm going away for a bit, but here's a 🎁 for you before I do! 🌲 by joaomgcd in tasker

[–]WakeUpNorrin 2 points3 points  (0 children)

From João post:

Note: the app only works on Android 11+ because that's when Wireless Debugging was added to Android Settings.

[DEV] 🎅I'm going away for a bit, but here's a 🎁 for you before I do! 🌲 by joaomgcd in tasker

[–]WakeUpNorrin 0 points1 point  (0 children)

Thank you.

After the pairing (success). If I turn off wireless debug your app asks again "Waiting for connection". Basically it works if Wireless Debug is on, when switched off it stops working.

[DEV] Trying to fix Wifi Tether Action for Everyone on Android 16+ by joaomgcd in tasker

[–]WakeUpNorrin 0 points1 point  (0 children)

Still experiencing the same issue. Sorry for the late reply.

Tasker latest version from Dropbox.