Giter Site home page Giter Site logo

Comments (16)

khurshid-alam avatar khurshid-alam commented on July 24, 2024 1

@agnostic-apollo That's what I thought. But I can't select the plugin on tasker. It gives the same error ?

Screenshot_2023-08-10-18-55-42

termux-tasker_v0.6.0+892bb45-github-debug.apk

from termux-tasker.

khurshid-alam avatar khurshid-alam commented on July 24, 2024 1

Thanks. I think the issue was restored /userdata partition from backup. Which was missing few bytes may be. That explains why Macrodroid also misbehaving. Updating the app fixed the issue.

from termux-tasker.

Bagunda avatar Bagunda commented on July 24, 2024 1

Can someone explain in human terms?
How to add com.termux.permission.RUN_COMMAND permission?
Tasker v6.1.32.
Termux v0.118.0.
Termux:Tasker v0.6.0.
Android Lineage 10.
Same problem as described in this topic

from termux-tasker.

agnostic-apollo avatar agnostic-apollo commented on July 24, 2024

You need to grant tasker com.termux.permission.RUN_COMMAND permission for Termux:Tasker version >=0.5.

from termux-tasker.

agnostic-apollo avatar agnostic-apollo commented on July 24, 2024

@joaomgcd consider showing a better error if tasker is not granted a permission required by the plugin when adding a new action. Currently, executing the Termux:Tasker action throws the receiver com.termux.tasker.FireReceiver requires permission com.termux.permission.RUN_COMMAND which we don't have %errmsg, which is also not too clear from a user perspective. Maybe just request the permission if its missing or just improve both errors?

The TermuxCommand() function in Tasker Function action has similar issues but its exception is thrown by android and is bit more clear, and is for advance users, so its fine.

Thanks

from termux-tasker.

joaomgcd avatar joaomgcd commented on July 24, 2024

I can't request the permission because it would need to be in the manifest and I can't add all possible plugin permissions to the manifest...
How would you suggest I'd improve the error message?

from termux-tasker.

GitUpGitUp avatar GitUpGitUp commented on July 24, 2024

Maybe say exactly what you need to grant? I also can't figure out the scripts thing but I was hoping to be able to use variables to run in Termux but it looks like I can't do that. Thanks for your response.

from termux-tasker.

agnostic-apollo avatar agnostic-apollo commented on July 24, 2024

@joaomgcd

I can't request the permission because it would need to be in the manifest and I can't add all possible plugin permissions to the manifest...

Yeah, I am aware of that "security" risk, but we haven't implemented a better system yet for that. You can also only request it if you have declared it in the manifest, like with the code here probably. Especially, if you plan to declare AutoApps permissions at least.

How would you suggest I'd improve the error message?

You can throw the same message for other cases, however, if permission is missing, then simply tell the user Tasker needs to be granted <permission> from its App Settings for the plugin action to be added or executed. You can find it under Additional Permissions with the label: <label>. The label or description can be received by PermissionInfo PackageManager.getPermissionInfo() and then PermissionInfo.loadDescription(). Do null checks for both PermissionInfo and description objects obviously ;)

From a user's perspective, he has no idea what an activity, receiver, FireReceiver, etc is.

from termux-tasker.

agnostic-apollo avatar agnostic-apollo commented on July 24, 2024

@GitUpGitUp

I also can't figure out the scripts thing but I was hoping to be able to use variables to run in Termux but it looks like I can't do that.

What script thing? You can pass variable values as arguments to your scripts. Check the templates for scripts and tasks.

from termux-tasker.

khurshid-alam avatar khurshid-alam commented on July 24, 2024

@agnostic-apollo @joaomgcd

How to grant RUN_COMMAND permission in Android 5.0? Any idea?

My phone is rooted and I am using termux and termux-tasker from github run action ( with termux/termux-app#2740)

from termux-tasker.

agnostic-apollo avatar agnostic-apollo commented on July 24, 2024

It should be automatically granted since android 5 didn't have runtime permissions.

from termux-tasker.

agnostic-apollo avatar agnostic-apollo commented on July 24, 2024

Which version of tasker are you using? It needs to be > = 5.9.3. I tested plugin configuration for android 5 on avd and it worked, did not test execution.

#69 (comment)

from termux-tasker.

khurshid-alam avatar khurshid-alam commented on July 24, 2024

@agnostic-apollo This is odd. I have tasker = 5.14.6. I haven't update it to the latest version.

from termux-tasker.

khurshid-alam avatar khurshid-alam commented on July 24, 2024

@agnostic-apollo Thanks. I made it work by updating Tasker app. It is working now.

from termux-tasker.

agnostic-apollo avatar agnostic-apollo commented on July 24, 2024

Great. Welcome. Maybe it was required for tasker to be installed or updated after the termux app was installed that published the permission. Could have checked permission granted status with dumpsys package net.dinglisch.android.taskerm | grep RUN_COMMAND

from termux-tasker.

matejdro avatar matejdro commented on July 24, 2024

@Bagunda

  1. Go to Android's Settings
  2. Apps
  3. Find Tasker
  4. Select Permissions
  5. Select Additional Permissions
  6. Select Termux
  7. Grant

@agnostic-apollo Any chance this could be added to the README or to the text in the termux-tasker app? This thing is pretty obscure and useless error message does not help.

EDIT: I'm an iditiot, it IS in the readme

from termux-tasker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.