[Q] Send data from Tasker using the Share feature - Android Q&A, Help & Troubleshooting

Trying to make Tasker automatically open and populate Astrid todo's task edit fields the way that so many other apps can using the Share menu. With pretty much any app being able to do this using Share, I figured it wouldn't be too hard to make Tasker do the same, but I'm having trouble finding out how.
I'm using the beta of Tasker so Send Intent replaces the previous two intent actions. The fields available are Action, Category, Mime Type, Extra, Package, Class, and Target. Right now Package is set to com.timsu.astrid and Class to com.todoroo.astrid.activity.TaskEditActivity, which manages to open the task edit screen. That intent is however from the Astrid widget so I don't know if that's even the right thing to use if doing this via the Share ability.
I'm not a dev so doing this blindly. Any help would be appreciated

Hi, did you manage to get this to work?

I stopped using Astrid ages ago. Compared to what I built from scratch using Tasker, it's **** for my use

Related

NFC Task Launcher Question

Well, I emailed the developer about this question a couple days ago...still waiting...but just in case some of you high IQ guys know how to do this...
I have a tag that I set up to open up the Navigation app. In Task Launcher, when I select the Navigation app...there is a command below it: CUSTOM...open a specific activity within an app. There are no option in the app itself to change it...but it looks like I need to type what I want launched once the Navigation app is opened.
I want the Map activity to launch...what code do I need to put in there? Looks like there already is a code there...and it looked like it was going to do what I wanted...but it doesn't do anything. (com.google.android.maps.driveabout.app.DestinationActivity)
SiNJiN76 said:
Well, I emailed the developer about this question a couple days ago...still waiting...but just in case some of you high IQ guys know how to do this...
I have a tag that I set up to open up the Navigation app. In Task Launcher, when I select the Navigation app...there is a command below it: CUSTOM...open a specific activity within an app. There are no option in the app itself to change it...but it looks like I need to type what I want launched once the Navigation app is opened.
I want the Map activity to launch...what code do I need to put in there? Looks like there already is a code there...and it looked like it was going to do what I wanted...but it doesn't do anything. (com.google.android.maps.driveabout.app.DestinationActivity)
Click to expand...
Click to collapse
Hey, I'm on vacation but have been answering emails - mostly from my phone. I don't see any that didn't get responses, when did you email?
That custom activity field is for specifying a full package and activity within that package, like you cite at the end of your post. Right now you have to type it out (mainly because this was never intended to be widely used) going forward there are plans to make this more user friendly.
Can you grab the logcat output when you try to launch that activity (enable debugging in the app) and send that? I should be back tomorrow or Wednesday and can get back to proper work.

[Q] Tasker/Torque Integration

I'm looking for a way to use data from Torque in Tasker.
I want to take data from torque and use it to drive actions in Tasker. Specifically, I'd like to turn the screen on when the engine comes on. Is anyone aware of previous work done in this area that might get me started? Or, would I need to code a Tasker plugin?
I'm aware I could accomplish this using ACC power as the on/off flag, but I'd like to charge the tablet at all times and not just when the car is running.
I know this is an old post but I'm interested in this same thing. My goal is to actually get intake air temperatures onto my pebble watch by passing them from Torque to Tasker and finally to the Pebble.
Hi, so still nothing new *push*
I'd also like to integrate Torque variables into Tasker very much. E.g. disabling the security keyguard as long as the motor is running, enable security when the motor is off. (So you can leave your phone in the car with others whilst refueling...
Any ideas?
Torque and AIDL interface
hunchi said:
Hi, so still nothing new *push*
I'd also like to integrate Torque variables into Tasker very much. E.g. disabling the security keyguard as long as the motor is running, enable security when the motor is off. (So you can leave your phone in the car with others whilst refueling...
Any ideas?
Click to expand...
Click to collapse
Hi
You'll need to use the AIDL 'api' interface that Torque supports to talk to it. Sensors information is retrieved only when it is asked for (and if the data was broadcast over intents, android would probably go slow when you're doing upwards of 100sensors/second refresh rates)
The AIDL interface will be the way forwards to get what you want though (then you can do with it what you want in terms of rebroadcasting if you want) - there's some information on it on here: http://torque-bhp.com/forums/?wpforumaction=viewtopic&t=438.0 which should be enough to get people started
Tasker plugin for Torque Pro
Is anyone working on this? It would be very useful to be able to have Tasker monitor Torque variables and be able to perform actions based on their values.
iraf said:
Is anyone working on this? It would be very useful to be able to have Tasker monitor Torque variables and be able to perform actions based on their values.
Click to expand...
Click to collapse
I've been able to do this following some disperse advice from the web.
Torque
As you see, Torque is able to write a CSV file with selected parameters. All that it basically does is to add a line at the end of that file listing those parameters values. In its settings you can change the frequency of modifications to that file. In my device this file is stored at /storage/emulated/0/torqueLogs/trackLog.csv.
Tasker
Once in Tasker you should set a profile to act on each change done by Torque to it. I've found the profile to be Event > File Modified and to retrieve those parameters inside the file, set up a task that runs the following Shell Command:
tail -1 /storage/emulated/0/torqueLogs/trackLog.csv
This retrieve the last line of the file and stores the output inside a variable. I called it %OBDLOG. A second action inside this task splits this Comma Separated Values (CSV) from that last line using the action Variable Split, and the separator ",". This creates N variables named %OBDLOGN. Example: %OBDLOG1, %OBDLOG2, %OBDLOG3...
Done that, we have to check which value corresponds to the parameter we want.
Bonus Info
You might want to clean this file once it reaches a specific size.
I've done this so that I can say commands through Bluetooth usingTasker Plugin AutoVoice. You can check the logic used by me to say the Coolant Temperature once it reaches 70ÂșC in the attached image.
Sorry not to be able to link outside. XDA prevents me as I'm a newbie! hehe
Cheers!
I'm having trouble finding the trackLog.csv file. I have files in the .torque folder on my sdcard but what options in logging do you have to enable to generate loss in the torqueLogs folder?
Sent from my XT1060 using Tapatalk
Very interesting !!!!
Can you detail all the steps please ?
thanks
Just set up something similar. Setup torque as describer by "dirceucorsetti" above, except I dont use "log rotation".
Below is for tasker.
Profile: Torque
State-Net-BT Near
Name-find your OBD adapter in the list
Min uses regular old BT, so I had to check "Standard Devices"
Enter Task:Start Torque
Exit Task: Stop Torque
Task: Start Torque
App-Launch App-Torque
Task: Stop Torque
Misc-Send-Intent
Action-org.prowl.torque.REQUEST_TORQUE_QUIT
Package-org.prowl.torque
Script-Run Shell
Command- tail -1/storage/emulated/0/torqueLogs/trackLog.csv
Store output in- %OBDLOG
Net-Compose Email
Recipient - your email
Subject - TorqueLog - %DATE
Message-%OBDLOG
File-Delete File
File- torqueLogs/trackLog.csv
Of course you could send the file anywhere. I just wanted to share how I start and stop torque automatically. That seemed to always be the issue.
Interestingly I can also start Waze in this task. I could never figure out how to get taker to detect when I was driving. Until I remembered the OBD adapter.
good info! I started googling about tasker and torque integration not really expecting much result. I want to build a custom interface to run on my in-dash nexus7 that reflects some of the torque info/stats. Thats a good start!
Also found this listing of torque intents and data it logs.
http://torque-bhp.com/wiki/PluginDocumentation
Gator Brah said:
good info! I started googling about tasker and torque integration not really expecting much result. I want to build a custom interface to run on my in-dash nexus7 that reflects some of the torque info/stats. Thats a good start!
Also found this listing of torque intents and data it logs.
http://torque-bhp.com/wiki/PluginDocumentation
Click to expand...
Click to collapse
Not exactly on topic, but do you guys have any idea how to launch a torque plugin from tasker? I'd love to get my racing dash to launch automatically, but I cant seem to figure out how to make that happen.
I would like to see an actual plugin for torque. Just starting to work with it. Would like to use utter to announce things. And autovoice to ask it questions. Never can get torque to tell me its at operating temp. Also looking for any more creative ideas from people. This could be fun.
Sent from my HTC One_M8 using XDA Free mobile app
Getting error "sh: <stdin>[2]: tail: not found" under variables
Sent from my Nexus 7 using XDA Free mobile app
Installed busy box. Forgot since I installed android L. And file was /sdcard/torquelogs.
Sent from my Nexus 7 using XDA Free mobile app
Back at it after updating tablet to "m". I have my 9 variables I want and that keep refreshing. But after I rename them it just replaces it and the renamed variable says at the same number. What am I missing. Also had to change "tail -1" to "tail -n 1" for it to read last line.
Sent from my Pixel XL using Tapatalk

Speck Selection for Android

I just recently switched to a Moto X from an iPhone 5, and I am looking for the one feature that I used every day on my iPhone. The speak selection feature. On iOS you can select any text, in basically any app, and click "speak" from the context menu. The device will read the text back to you without kicking you out of the app you were using or anything like that.
I found a similar app for Android, it's called Easy Text to Speech. However, this app works by monitoring the clipboard. Is there perhaps a way to do this without having to use the clipboard. For instance, by using the share option, but without having to switch to another program. I want to be able to browse the internet, select what I want to be read, and have it read to me without getting out of the browser or the app that I am using.
Perhaps there is a framework for Android for adding custom contextual commands?
Thanks for any help.
- Bogdan

Asking for an example of correct use of activity lifecycle management.

Ive been reading about how android manages system resources behind the scenes and ive had a few questions i didnt see on the page. So android uses Onpause/Onstop/Onresume etc to manage resources while youre using the app, but i cant figure out exactly how i would use these.
So i am building a test drawing app, when on my canvas i can draw just fine, i use the app browser to view other apps while over mine (my app is Onpause believe)
then i Oncreate another app when i select its thumbnail (putting my app in Onstop?), In the app browser i then select my app again and as i return back to my app my drawing will be gone and ill see a blank canvas. Here are my questions.
1. Do i have to save to bundle instance state? And how?
2. How would i write that? Onstop(){
//like this?
};
Does it have to be the last line on the class?

Using Android intents for automation

I'm working on doing some automation on my phone, and I want to perform some actions that I'm hoping I can perform using Android intents. I'm not very knowledgeable about how they work or how to find them, but I'm trying to hack some stuff together.
Here's my main question: how do I go about figuring out if I can use intents for a particular task or see what I can do with intents?
For example, I would like to be able to trigger the "Share trip progress" feature within Google Maps automatically (using Flic buttons, which allow me to use Android intents). I don't know if I can set up an intent myself to trigger this action in the Google Maps app, and I don't really know where to start in order to try to find out how to do it.
Another example is that I would like to trigger Google Assistant with my Flic button, but I want to use my Anker Roav Bolt in my car to respond to the action. Flic has a function built in to trigger Google Assistant, but it's a lot more invasive in that it opens the prompt on the phone and disrupts my Google Maps navigation as opposed to if I long-pressed the button on my Roav Bolt and it just listens for instructions without disruption. I have no clue if this is something I could trigger using Android intents, but I'd like to find a way to make this smoother.
If you have solutions to these two problems, that would be great. But as I said, I would also like to have a better general understanding of how I could find this stuff myself for future stuff I want to set up on my phone.
Thank you.

Categories

Resources