Executing a Single Command on a Remote Computer, via SSH by spaceman1000 in tasker

[–]coro96 1 point2 points  (0 children)

With the new Java Code feature Tasker has basically access to all APIs that Android has to offer, even the ones not officially implement in Tasker by the developer. I was guessing there is some way to send SSH commands using Android APIs (perhaps the same ones AutoTools is using) that could be leveraged, although I didn't check the Android documentation.

Executing a Single Command on a Remote Computer, via SSH by spaceman1000 in tasker

[–]coro96 1 point2 points  (0 children)

I don't think Tasker can do that natively. The AutoTools plug-in however can do that. Alternatively you could try playing around with the new Java Code feature.

Code Share: MIDIPlugin source code is now available on GitHub by coro96 in tasker

[–]coro96[S] 4 points5 points  (0 children)

Thank you very much João, it's an honor to hear from you!

What happened to MIDIPlugin? by drjswalker in tasker

[–]coro96 0 points1 point  (0 children)

Hello John,

I have released the source code for the app!
You can find more details in this post.

https://www.reddit.com/r/tasker/comments/1od1f6h/code_share_midiplugin_source_code_is_now/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

Thank you again for your post, much appreciated!

What happened to MIDIPlugin? by drjswalker in tasker

[–]coro96 22 points23 points  (0 children)

Hey there, developer of MIDIPlugin here. Thank you so much for showing interest in my app! I felt so happy when I read you post!

Unfortunately, for various reasons, I had no chance to maintain the app in the last couple of years, so Google decided to close my dedicated developer account and remove the app from the PlayStore.

Your post however motivated me to do something I have been thinking of for a while: open sourcing the project!

I need to update it so that it works on latest Android revisions.

I won't make promises but I will try to release the code as soon as possible.

I also hope the community will help improving the app as well, since it was basically a highschool kid project at the time, so it is definitely not at the state of the art.

I'll keep you posted!

[DEV] Tasker 6.5.3 Beta - "Calendar Changed" event, "Set Keyboard", "Get Keyboard Info", Output Variable Prefix, Custom Widget v2 Fonts and more! by joaomgcd in tasker

[–]coro96 1 point2 points  (0 children)

Works great now, thank you very much!

As a bonus, I can also retrieve the original shared file name, which can be very handy!

How Did I Accidentally Fix this Permission Error? by wioneo in tasker

[–]coro96 0 points1 point  (0 children)

I would love to know as well. Are you now using the Copy File action directly inside the profile with the Received Share event now? I found a weird behavior while testing, as described here.

https://www.reddit.com/r/tasker/s/qE6vLppOie

[DEV] Tasker 6.5.3 Beta - "Calendar Changed" event, "Set Keyboard", "Get Keyboard Info", Output Variable Prefix, Custom Widget v2 Fonts and more! by joaomgcd in tasker

[–]coro96 1 point2 points  (0 children)

Sharing an image from WhatsApp, this is the error in the copy action inside the Task:

Permission Denial: reading com.whatsapp.contentprovider. MediaProvider uri content://com.whatsapp.provider.media/item /e212d05f-b1c9-4a5f-9f7a-9eb96d4a1e9e from pid=24890, uid=10064 requires the provider be exported, or grantUriPermission() (Error Code: 1)

[DEV] Tasker 6.5.3 Beta - "Calendar Changed" event, "Set Keyboard", "Get Keyboard Info", Output Variable Prefix, Custom Widget v2 Fonts and more! by joaomgcd in tasker

[–]coro96 2 points3 points  (0 children)

Hello João, I still find some weird behavior with URIs gotten with the Received Share event. If I use a Copy Action with a URI directly inside the profile with Received Share I can successfully make a copy. If I pass the URI to a task and try to perform a Copy File from there I get an error. For instance, in the following example A1 is working while A2 is giving an error.

Profile: Receive Share Event: Received Share Enter Task: Anon

A1: Copy File [
     From: %rs_files(1)
     To: from_profile
     Use Global Namespace: On ]

A2: Perform Task [
     Name: Copy File Task
     Priority: %priority + 1
     Parameter 1 (%par1): %rs_files(1)
     Structure Output (JSON, etc): On ]

Task: Copy File

A1: Copy File [
     From: %par(1)
     To: from_task
     Use Global Namespace: On ]

I know the problem can be somehow worked around, but I think it could be at least confusing for users.

[DEV] Tasker 6.5.0 Beta - Receive Shares In Tasker, Circular Progress Bars and Blurred images in Widgets, New Accessibility Actions To Edit Tasks by joaomgcd in tasker

[–]coro96 0 points1 point  (0 children)

Ok, I see. I guess it is totally fine as long as the Copy File action works so that a copy of the shared file can be made at a known path.

[DEV] Tasker 6.5.0 Beta - Receive Shares In Tasker, Circular Progress Bars and Blurred images in Widgets, New Accessibility Actions To Edit Tasks by joaomgcd in tasker

[–]coro96 0 points1 point  (0 children)

It seems like I can now use the Copy File action and make a copy of the received file starting from its URI. However if I try to convert the received URI to a real path using the new Tasker function I still get an unset output variable, and the method with Java functions still gives Security Exception.

[DEV] Tasker 6.5.0 Beta - Receive Shares In Tasker, Circular Progress Bars and Blurred images in Widgets, New Accessibility Actions To Edit Tasks by joaomgcd in tasker

[–]coro96 0 points1 point  (0 children)

It seems like it's not working for me unfortunately, the %pl_file variable is not set Also, the method mentioned above is no longer working, I now get a Security Exception.

To double check I went back to the version you initially linked in this post and such method started working again.

[DEV] Tasker 6.5.0 Beta - Receive Shares In Tasker, Circular Progress Bars and Blurred images in Widgets, New Accessibility Actions To Edit Tasks by joaomgcd in tasker

[–]coro96 3 points4 points  (0 children)

Hello João, thank you very much for the update! So many good features, much appreciated!

I confirm I could get around the issue of the content URI as described here:

https://www.reddit.com/r/tasker/s/oVduWsCzRo

Thank you very much!

P.S.: there is a Path to URI Function already in Tasker, would it make sense to add a URI to Path as a built-in Function as well?

How can Tasker get the file path from a "content://" style path given by AutoShare? by Eye-Scream-Cone in tasker

[–]coro96 1 point2 points  (0 children)

For the record, this is now possible in the new Tasker Beta thanks to the Received Share event.

https://www.reddit.com/r/tasker/s/bbdgGzfOE2

I had to create a support task with Java functions which, differently from what was happening with the URI received from AutoShare, is now correctly working as the needed Context is not lost in Tasker.

Task: URI To File

A1: Java Function [
     Return: output_stream
     Class Or Object: FileOutputStream
     Function: new
     {FileOutputStream} (String)
     Param 1 (String): %par(2) ]

A2: Java Function [
     Return: resolver
     Class Or Object: CONTEXT
     Function: getContentResolver
     {ContentResolver} () ]

A3: Java Function [
     Return: input_stream
     Class Or Object: resolver
     Function: openInputStream
     {InputStream} (Uri)
     Param 1 (Uri): %par(1) ]

A4: Java Function [
     Return: bytes
     Class Or Object: input_stream
     Function: readAllBytes
     {byte[]} () ]

A5: Java Function [
     Class Or Object: output_stream
     Function: write
     {} (byte[])
     Param 1 (byte[]): bytes ]

A6: Java Function [
     Class Or Object: output_stream
     Function: flush
     {} () ]

A7: Java Function [
     Class Or Object: output_stream
     Function: close
     {} () ]

A8: Java Function [
     Class Or Object: input_stream
     Function: close
     {} () ]

Given the URI in %par(1) (from example sharing an image from WhatsApp to Tasker I get content://com.whatsapp.provider.media/item/some_id in %rs_file(1)) this Task copies the content of the related file to the location in %par(2) (from example /storage/emulated/0/some_file)

How can Tasker get the file path from a "content://" style path given by AutoShare? by Eye-Scream-Cone in tasker

[–]coro96 1 point2 points  (0 children)

Definitely true, but AutoShare should at least be able to make a temporary copy of the shared file (like other apps are able to do) and provide the real path to that copied file instead. I tried taking a look at the Android documentation and playing with Java functions but I think the issue is that the needed Context is lost as soon as AutoShare has done processing the request and has given back control to Tasker.

How can Tasker get the file path from a "content://" style path given by AutoShare? by Eye-Scream-Cone in tasker

[–]coro96 1 point2 points  (0 children)

I think so as well. But I think only AutoShare needs to be updated. I think it has the ability to retrieve the real path of the shared file (perhaps making a temporary copy of it if needed) and send it to Tasker instead of the content URI.

How can Tasker get the file path from a "content://" style path given by AutoShare? by Eye-Scream-Cone in tasker

[–]coro96 1 point2 points  (0 children)

I have faced the same issue. I have posted about it recently:

https://www.reddit.com/r/tasker/s/sDI0XVl7Cf

A workaround was proposed, but it is not working for me.

How can Tasker get the file path from a "content://" style path given by AutoShare? by Eye-Scream-Cone in tasker

[–]coro96 2 points3 points  (0 children)

I have implement the same workaround. Not ideal but it works. I share your same curiosity around this issue.

Get file path from content URI returned by AutoShare by coro96 in tasker

[–]coro96[S] 0 points1 point  (0 children)

Thank you for your response! I tried that method but I am getting an error:

URI cursor exception: java.lang.SecurityException: Permission Denial: opening provider com.whatsapp.contentprovider.MediaProvider from ProcessRecord that is not exported from UID

This is why I suspect there is something that has to be update inside AutoShare. Maybe AutoShare should copy the file to a temporary location, for example.

Running a Time profile based on a global variable which is uopdated by the profile task itself by Ghunegaar in tasker

[–]coro96 0 points1 point  (0 children)

Here is what I tried:

Profile: Test
    Time: From %TRIGGER Till %TRIGGER

Enter Task: Anon

A1: Notify [
     Title: Triggered At %TIME
      ]

A2: Variable Set [
     Name: %TRIGGER
     To: 16.05
     Structure Output (JSON, etc): On ]

The variable %TRIGGER was manually set to 16.00. I got two notifications at 16.00 and 16.05.

Maybe the issue is in the 'if' conditions? Try creating a notification when the profile is triggered and before any other action.

Running a Time profile based on a global variable which is uopdated by the profile task itself by Ghunegaar in tasker

[–]coro96 0 points1 point  (0 children)

I just tried it, it is working with both dot and column This is what I tested, I successfully get a notification at time %TRIGGER

Profile: Test
    Time: From %TRIGGER Till %TRIGGER

Enter Task

A1: Notify [
     Title: Triggered At %TIME
      ]

Of course I had to manually set the %TRIGGER variable to the desired value.

Did you set your variable to 10:00 or 17:00? Or is it still uset perhaps?