[Q]Refreshing Zooper from SL4A - Zooper Widget General

I've got a Zooper module that I'm using to control the lights in my apartment. I'm calling SL4A scripts from Zooper that call an API running on a webserver to toggle the lights. I'm using wget with #SEX# in zooper to query the status of the lights off my server.
The problem I'm having is that I can't update the widget after the lights toggle. I did just start playing with it today, but I'm not seeing any means to do this from SL4A.
I'm using Python in SL4A.
Edit: I tried sending an intent to Zooper to set an unused variable from SL4A, though I don't think it's sending right.
Code:
activity = 'org.zooper.zw.action.TASKERVAR'
extras = {}
extras['org.zooper.zw.tasker.var.extra.STRING_VAR'] = '#Ta#'
extras['org.zooper.zw.tasker.var.extra.STRING_TEXT'] = 'a'
extras['org.zooper.zw.tasker.var.extra.INT_VERSION_CODE'] = '1'
packagename = 'org.zooper.zw'
classname = 'org.zooper.zw.tasker.var.extra.BUNDLE'
intent = droid.makeIntent(activity, None, None, extras, None, packagename, classname).result
droid.sendBroadcastIntent(intent)

Related

Removing Facebook HTC Data

Is there a way to easily remove the facebook tags on contacts in outlook? it's the stuff that says :
<HTCData><!-- Please do not modify -->
<Facebook>id:xxxxxx/friendof:xxxxxxxxxxx</Facebook>
</HTCData>
Thanks!
Yes PLEASE? I don't use a Sense ROM anymore and this is annoying!
I don't even have this phone anymore. Maybe I will write something to do this for us.
HTC tag removal in contact notes!
I just sat down on my break and created this code to strip out the HTC tags from the contact notes:
Code:
Sub HTCbGone()
Dim objContactsFolder As Outlook.MAPIFolder
Dim objContacts As Outlook.Items
Dim objContact As Object
Dim StartPos As Integer
Dim EndPos As Integer
Dim iCount As Integer
' Specify with which contact folder to work
Set objContactsFolder = _
Session.GetDefaultFolder(olFolderContacts)
Set objContacts = objContactsFolder.Items
iCount = 0
' Process the changes
For Each objContact In objContacts
If TypeName(objContact) = "ContactItem" Then
StartPos = InStr(objContact.Body, "<HTCData>")
EndPos = InStr(objContact.Body, "</HTCData>") + 10
If StartPos > 0 Then
If StartPos = 1 Then
If Len(EndPos) > EndPos + 1 Then
objContact.Body = Mid(objContact.Body, EndPos + 1)
Else
objContact.Body = ""
End If
Else
If Len(EndPos) > EndPos + 1 Then
objContact.Body = Left(objContact.Body, StartPos = 1)
Else
objContact.Body = Left(objContact.Body, StartPos - 1) & Mid(objContact.Body, EndPos + 1)
End If
End If
iCount = iCount + 1
objContact.Save
End If
End If
Next
' Display the results
MsgBox "Number of contacts updated:" & Str$(iCount), , _
"HTCbGone Finished"
' Clean up
Set objContact = Nothing
Set objContacts = Nothing
Set objContactsFolder = Nothing
End Sub
To run this, I opened Outlook. Selected Macro(s) from the Tools pull-down menu (or press [ALT+F8]). Created a new Macro called HTCbGone and pasted this code over everything. Then I just ran it.
Use at your own risk.
Happy scripting,
GinoRP
THANK YOU!!!! (I only type in all caps 2 or 3 times a year) If HTC was a person I would kick him in the teeth because of what they have done to my 500+ contacts in my Microsoft Exchange account.
How could the people at HTC justify code that puts notes on contacts only invisible to a HTC device and visible everywhere else?? How could they think that would annoy no one? Blows my effing mind.
Kinda thanks but for me it did not work.
I made and run the macro.
Then I noticed some things got lost though!
Before I began I made a copy of the contacts folder in Outlook (recommended!).
I used the "modified" tab to see what contacts where changed when.
There was an extra URL in the note position for a contact which I put there earlier today.
After running the macro the Facebook data was gone but so was the URL.
Because it changed many contacts I did not bother to look further if other things gotten lost but rather just emptied the folder and restored from backup folder.
I am do work with DB and such but did not find anything special in the script which could explain my output.
Sorry to bring up a dead thread, but is there a way to do this without outlook?
i am still interested as well- can anyone come up with a better way not using outlook?
Remove HTC Notes Using CSV
DeMiNe0 said:
Sorry to bring up a dead thread, but is there a way to do this without outlook?
Click to expand...
Click to collapse
I was trying to figure out this very same thing and came across this thread in my searching. I also don't look Outlook, but I found a really simple, quick, and effective way to manually get rid of all those pesky HTC notes in under five minutes, for those that don't use Outlook:
1) Go into the contacts view in Gmail
2) Click the "More" dropdown box and select "Export"
3) Ensure that the "All Contacts" option is selected, choose the "Outlook CSV format," and export
4) After the file downloads, open it up in Excel (or your choice spreadsheet program)
5) Find the column labeled "Notes," and then just scroll down and clear all the cells with HTC data in them
6) Save the file, ensuring it is still in CSV format
7) Back in your Google Contact Manager, delete all your contacts
NOTE: Before deleting your contacts you will want to export a Google CSV file of all your contacts for backup. You can also the "More > Restore" feature to go back to a previous point in time if something goes wrong.​8) Import the CSV file you saved in step 6
That's it! Your contact book should be restored to the exact way it was, minus the obnoxious HTC data. With 1,000+ contacts, I was able to do this in about two minutes. Again, be sure you have backups of your contacts or know how to use Google's Restore contacts feature in case something goes wrong, but this should work simply enough. Also, I just selected all the cells in the Notes column and cleared all their data, but if you have any notes saved for any of your contacts, you'll want to scroll through the spreadsheet file and be sure you only delete cells with HTC data.
I hope this helps!
---------- Post added at 01:09 AM ---------- Previous post was at 12:52 AM ----------
You should also be aware that this method may cause you to lose your contacts photos, as well as any joined contacts you have in your Android address book. However, if you want to attach your contacts Facebook photos permanently to their Google contact entry (something HTC's method did not do), you should check out this tool; in just a couple clicks, you can have all those photos matched up again and restored:
[I can't post links yet, but just Google "Facebook Google Contact Sync" and click on the first return. It is a great little tool made by a dev called "Heart of Angel."]
mredmond2012 said:
I was trying to figure out this very same thing and came across this thread in my searching. I also don't look Outlook, but I found a really simple, quick, and effective way to manually get rid of all those pesky HTC notes in under five minutes, for those that don't use Outlook:
1) Go into the contacts view in Gmail
2) Click the "More" dropdown box and select "Export"
3) Ensure that the "All Contacts" option is selected, choose the "Outlook CSV format," and export
4) After the file downloads, open it up in Excel (or your choice spreadsheet program)
5) Find the column labeled "Notes," and then just scroll down and clear all the cells with HTC data in them
6) Save the file, ensuring it is still in CSV format
7) Back in your Google Contact Manager, delete all your contacts
NOTE: Before deleting your contacts you will want to export a Google CSV file of all your contacts for backup. You can also the "More > Restore" feature to go back to a previous point in time if something goes wrong.​8) Import the CSV file you saved in step 6
That's it! Your contact book should be restored to the exact way it was, minus the obnoxious HTC data. With 1,000+ contacts, I was able to do this in about two minutes. Again, be sure you have backups of your contacts or know how to use Google's Restore contacts feature in case something goes wrong, but this should work simply enough. Also, I just selected all the cells in the Notes column and cleared all their data, but if you have any notes saved for any of your contacts, you'll want to scroll through the spreadsheet file and be sure you only delete cells with HTC data.
I hope this helps!
---------- Post added at 01:09 AM ---------- Previous post was at 12:52 AM ----------
You should also be aware that this method may cause you to lose your contacts photos, as well as any joined contacts you have in your Android address book. However, if you want to attach your contacts Facebook photos permanently to their Google contact entry (something HTC's method did not do), you should check out this tool; in just a couple clicks, you can have all those photos matched up again and restored:
[I can't post links yet, but just Google "Facebook Google Contact Sync" and click on the first return. It is a great little tool made by a dev called "Heart of Angel."]
Click to expand...
Click to collapse
In addition to the thanks button, I think you deserve a "thanks" post. This was so useful and in addition to removing that HTC garbage, I removed all the other data I found unnecessary.
Remove With a Simple Java Program, If you know Java
Ozark_8125 said:
Is there a way to easily remove the facebook tags on contacts in outlook? it's the stuff that says :
<HTCData><!-- Please do not modify -->
<Facebook>id:xxxxxx/friendof:xxxxxxxxxxx</Facebook>
</HTCData>
Thanks!
Click to expand...
Click to collapse
I know I am too late to reply this post but I actually searched a solution today and found this post where some one also had same issue.
Using gdata java api I wrote a small program to remove notes from all of your contacts. Maximum 800 (Congifurable) Here is the Java Program :
Code:
import java.net.URL;
import com.google.gdata.client.Query;
import com.google.gdata.client.contacts.ContactsService;
import com.google.gdata.data.PlainTextConstruct;
import com.google.gdata.data.TextContent;
import com.google.gdata.data.contacts.ContactEntry;
import com.google.gdata.data.contacts.ContactFeed;
/**
* This is a test template
*/
public class ContactNotesCleaner {
public static String feedUrlString = "https COLON SLASH SLASH www DOT google DOT com SLASH m8 SLASH feeds SLASH contacts SLASH default SLASH full";
public static void main(String[] args) throws Exception {
// Create a new Contacts service
ContactsService myService = new ContactsService(<Any App Name>);
myService.setUserCredentials(<Your Gmail Id>, <Your Password>);
updateAllContacts(myService);
}
public static void updateAllContacts(ContactsService myService) throws Exception {
URL feedUrl = new URL(feedUrlString);
Query myQuery = new Query(feedUrl);
myQuery.setMaxResults(800);
ContactFeed resultFeed = myService.query(myQuery, ContactFeed.class);
// Print the results
System.out.println(resultFeed.getTitle().getPlainText());
for (ContactEntry entry : resultFeed.getEntries()) {
if (entry.getContent() != null) {
updateNotesContent(myService, entry);
}
}
}
private static void updateNotesContent(ContactsService myService, ContactEntry entry) throws Exception {
TextContent textContent = (TextContent) entry.getContent();
if (textContent.getContent() != null) {
String plainText = textContent.getContent().getPlainText();
if (plainText != null && plainText.startsWith("<HTCData>")) {
String newPlainText = "";
textContent.setContent(new PlainTextConstruct(newPlainText.trim()));
entry.setContent(textContent);
URL editUrl = new URL(entry.getEditLink().getHref());
ContactEntry contactEntry = myService.update(editUrl, entry);
System.out.println(entry.getName().getFullName().getValue() + " " + "Updated: " + contactEntry.getUpdated().toString());
}
}
}
}
I have executed the above program and tested it. You need gdata lib files:
gdata-media-1.0.jar
gdata-client-meta-1.0.jar
gdata-contacts-3.0.jar
gdata-client-1.0.jar
gdata-contacts-meta-3.0.jar
gdata-core-1.0.jar
guava-14.0.1.jar
gdataplugin.jar -- I am not sure what this jar does, even if it is required or not.
This is a bit complex for some users to run a java program, this way you will not loose the chat invites and other important information of your contact.
Note: Even if I have tested above program 10 times, I would not give any guaranty it will work for you.
- CAM
cmehta82 said:
I know I am too late to reply this post but I actually searched a solution today and found this post where some one also had same issue.
Using gdata java api I wrote a small program to remove notes from all of your contacts. Maximum 800 (Congifurable) Here is the Java Program
Click to expand...
Click to collapse
Your Java program worked!
I attached all the required libraries in a .zip-file. Include them in your Java project and copy the code from cmehta82 post above.
Replace <Your Gmail Id> with your emailadress:
Replace <Your Password> with your application specific password, generated at https://accounts.google.com/b/0/IssuedAuthSubTokens#accesscodes
Replace the feed URL string with https://www.google.com/m8/feeds/contacts/default/full
Can't JOIN contacts if HTCData exists in notes field
I wrote up my solution to this problem a little bit here thanks to the this forum thread above.
http://androidforums.com/samsung-ga...tcdata-exists-in-notes-field.html#post5968115
Python script to remove HTCData
Used to be a HTC phone user and it really messed up my contacts with the XML data. I am using a Mac and have written a Python script to get rid of the HTCData tag.
I posted the script here: http://kongjinjie.wordpress.com/2013/10/29/remove-htcdata-from-apple-contacts/
I don't know if this works on other OS, only tested on my Mac. I hope it helps!
EDIT:
Do not use this for those who setup Sync to Google. After running this script, it doesn't seeem to initiate a sync to Google. Anyone knows how to force a sync to Google? Is there a timestamp I can change to identify the latest version?
cmehta82 said:
I know I am too late to reply this post but I actually searched a solution today and found this post where some one also had same issue.
Using gdata java api I wrote a small program to remove notes from all of your contacts. Maximum 800 (Congifurable) Here is the Java Program :
Code:
import java.net.URL;
import com.google.gdata.client.Query;
import com.google.gdata.client.contacts.ContactsService;
import com.google.gdata.data.PlainTextConstruct;
import com.google.gdata.data.TextContent;
import com.google.gdata.data.contacts.ContactEntry;
import com.google.gdata.data.contacts.ContactFeed;
/**
* This is a test template
*/
public class ContactNotesCleaner {
public static String feedUrlString = "https COLON SLASH SLASH www DOT google DOT com SLASH m8 SLASH feeds SLASH contacts SLASH default SLASH full";
public static void main(String[] args) throws Exception {
// Create a new Contacts service
ContactsService myService = new ContactsService(<Any App Name>);
myService.setUserCredentials(<Your Gmail Id>, <Your Password>);
updateAllContacts(myService);
}
public static void updateAllContacts(ContactsService myService) throws Exception {
URL feedUrl = new URL(feedUrlString);
Query myQuery = new Query(feedUrl);
myQuery.setMaxResults(800);
ContactFeed resultFeed = myService.query(myQuery, ContactFeed.class);
// Print the results
System.out.println(resultFeed.getTitle().getPlainText());
for (ContactEntry entry : resultFeed.getEntries()) {
if (entry.getContent() != null) {
updateNotesContent(myService, entry);
}
}
}
private static void updateNotesContent(ContactsService myService, ContactEntry entry) throws Exception {
TextContent textContent = (TextContent) entry.getContent();
if (textContent.getContent() != null) {
String plainText = textContent.getContent().getPlainText();
if (plainText != null && plainText.startsWith("<HTCData>")) {
String newPlainText = "";
textContent.setContent(new PlainTextConstruct(newPlainText.trim()));
entry.setContent(textContent);
URL editUrl = new URL(entry.getEditLink().getHref());
ContactEntry contactEntry = myService.update(editUrl, entry);
System.out.println(entry.getName().getFullName().getValue() + " " + "Updated: " + contactEntry.getUpdated().toString());
}
}
}
}
I have executed the above program and tested it. You need gdata lib files:
gdata-media-1.0.jar
gdata-client-meta-1.0.jar
gdata-contacts-3.0.jar
gdata-client-1.0.jar
gdata-contacts-meta-3.0.jar
gdata-core-1.0.jar
guava-14.0.1.jar
gdataplugin.jar -- I am not sure what this jar does, even if it is required or not.
This is a bit complex for some users to run a java program, this way you will not loose the chat invites and other important information of your contact.
Note: Even if I have tested above program 10 times, I would not give any guaranty it will work for you.
- CAM
Click to expand...
Click to collapse
P1nGu1n_ said:
Your Java program worked!
I attached all the required libraries in a .zip-file. Include them in your Java project and copy the code from cmehta82 post above.
Replace <Your Gmail Id> with your emailadress:
Replace <Your Password> with your application specific password, generated at https://accounts.google.com/b/0/IssuedAuthSubTokens#accesscodes
Replace the feed URL string with https://www.google.com/m8/feeds/contacts/default/full
Click to expand...
Click to collapse
Where do you configure the app name and password?>
ginorp said:
I just sat down on my break and created this code to strip out the HTC tags from the contact notes:
Code:
Sub HTCbGone()
Dim objContactsFolder As Outlook.MAPIFolder
Dim objContacts As Outlook.Items
Dim objContact As Object
Dim StartPos As Integer
Dim EndPos As Integer
Dim iCount As Integer
' Specify with which contact folder to work
Set objContactsFolder = _
Session.GetDefaultFolder(olFolderContacts)
Set objContacts = objContactsFolder.Items
iCount = 0
' Process the changes
For Each objContact In objContacts
If TypeName(objContact) = "ContactItem" Then
StartPos = InStr(objContact.Body, "<HTCData>")
EndPos = InStr(objContact.Body, "</HTCData>") + 10
If StartPos > 0 Then
If StartPos = 1 Then
If Len(EndPos) > EndPos + 1 Then
objContact.Body = Mid(objContact.Body, EndPos + 1)
Else
objContact.Body = ""
End If
Else
If Len(EndPos) > EndPos + 1 Then
objContact.Body = Left(objContact.Body, StartPos = 1)
Else
objContact.Body = Left(objContact.Body, StartPos - 1) & Mid(objContact.Body, EndPos + 1)
End If
End If
iCount = iCount + 1
objContact.Save
End If
End If
Next
' Display the results
MsgBox "Number of contacts updated:" & Str$(iCount), , _
"HTCbGone Finished"
' Clean up
Set objContact = Nothing
Set objContacts = Nothing
Set objContactsFolder = Nothing
End Sub
To run this, I opened Outlook. Selected Macro(s) from the Tools pull-down menu (or press [ALT+F8]). Created a new Macro called HTCbGone and pasted this code over everything. Then I just ran it.
Use at your own risk.
Happy scripting,
GinoRP
Click to expand...
Click to collapse
Sorry for this reply in this old thread, but you might lose data running the VBA code from GinoRP. I found a lot of small mistakes.
Here is the corrected code. You can run it multiple times if there is more than one <HTCData> tag in a specific contact.
Code:
Sub HTCbGone()
Dim objContactsFolder As Outlook.MAPIFolder
Dim objContacts As Outlook.Items
Dim objContact As Object
Dim StartPos As Integer
Dim EndPos As Integer
Dim iCount As Integer
' Specify with which contact folder to work
Set objContactsFolder = _
Session.GetDefaultFolder(olFolderContacts)
Set objContacts = objContactsFolder.Items
iCount = 0
' Process the changes
For Each objContact In objContacts
If TypeName(objContact) = "ContactItem" Then
StartPos = InStr(objContact.Body, "<HTCData>")
EndPos = InStr(objContact.Body, "</HTCData>") + 10
If StartPos > 0 Then
If StartPos = 1 Then
If Len(objContact.Body) > EndPos + 1 Then
objContact.Body = Mid(objContact.Body, EndPos)
Else
objContact.Body = ""
End If
Else
If Len(objContact.Body) = EndPos - 1 Then
objContact.Body = Left(objContact.Body, StartPos - 1)
Else
objContact.Body = Left(objContact.Body, StartPos - 1) & Mid(objContact.Body, EndPos)
End If
End If
iCount = iCount + 1
objContact.Save
End If
End If
Next
' Display the results
MsgBox "Number of contacts updated:" & Str$(iCount), , _
"HTCbGone Finished"
' Clean up
Set objContact = Nothing
Set objContacts = Nothing
Set objContactsFolder = Nothing
End Sub

[Q] VB and the ApplicationBar

Using VB, im trying to add an application bar in the code (rather than xaml). I have the following code:
Code:
Public Sub New()
InitializeComponent()
Dim appBar As ApplicationBar
appBar = New ApplicationBar
appBar.IsMenuEnabled = True
appBar.IsVisible = True
appBar.Opacity = 1
Dim icon As New Uri("/Images/expand.png", UriKind.Relative)
Dim cmdStart As New ApplicationBarIconButton(icon)
cmdStart.Text = "Start"
'AddHandler (cmdStart.Click), test_click()
appBar.Buttons.Add(cmdStart)
' Set the data context of the listbox control to the sample data
DataContext = App.ViewModel
End Sub
However when i run it in the emulator there is no application bar! No error either. It is a pivot application also but this shouldnt make a difference surely? any ideas?
The application bar is accessible via the ApplicationBar property of the Page class you're deriving from. You don't need to create your own instance.
Thanks, I actually figured this out just after i posted the question. Thanks anyway.

WP7 - how to update the bound data in a chart?

Hi,
I'm having a hard time for, what I guess, is a simple question...
Here is the code I'm using to render the amChart
In short, my situation is tha the chart always renders the same datapoints...and there is no way I can change them!
Code:
Dim Y_Value_0 As Double = 0.0
Dim Y_Value_1 As Double = 0.0
Dim Y_Value_2 As Double = 0.0
Dim Y_Value_3 As Double = 0.0
Dim Y_Value_4 As Double = 0.0
Public Class ItemValues
Public Property Range() As String
Public Property Value() As Double
End Class
Private DataPoints As New ObservableCollection(Of ItemValues)() From
{New ItemValues() With {.Range = "200", .Value = Y_Value_0}, _
New ItemValues() With {.Range = "400", .Value = Y_Value_1}, _
New ItemValues() With {.Range = "600", .Value = Y_Value_2}, _
New ItemValues() With {.Range = "800", .Value = Y_Value_3}}
Public ReadOnly Property Data() As ObservableCollection(Of ItemValues)
Get
Return DataPoints
End Get
End Property
Private Sub Page_Graphs_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded
Me.Fill_Graph()
End Sub
Private Sub Fill_Graph()
Y_Value_0 = -5
Y_Value_1 = -10
Y_Value_2 = -20
Y_Value_3 = -50
Me.DataContext = Me
End Sub
However, there is no way, that when the chart is rendered it takes the new values...
In short, how to make the graph to take my data points?
Thanks in advance for any help!
You need to use INotifyPropertyChanged interface so the databound control knows when to update itself.
http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged.aspx
Check out the "Windows Phone Databound Application" template installed by default if you want to see a working project. It uses a listbox but it's the same concept.

[GUIDE] Create a syncing ToDo list with Zooper and Tasker

How to creating a To Do list that syncs across devices using Tasker, Zooper widget pro and a dropsync-like app.
What this does is looks at a text file on your device and splits the variables up by lines, so if you just create a text file and have each of your tasks on a separate line, this process will split them up into separate variables and list them in your zooper widget. all you need to do is find a nice text editor to do your editing. I use the Dropbox text editor as it works nicely for my needs, but you could use any app you like that does the job.
Here are the steps:
Set up a folder pair with your dropsync or foldersync or whatever app you prefer.
In that folder, create a text file e.g. ToDoList.txt
In Tasker: create a new task e.g. ZTODO that includes:
Variable Set:
Name = %newline
To = (press the enter key so that it’s a carriage return) <don’t just type this text like a moron.
Read File:
File = (press search button and locate text file)
To Var = %TODO
Variable Split:
Name = %TODO
Splitter = %newline
Zooper widget Pro Variable:
Config = ZW var: TODO1 | ZW text: %TODO1
If = %TODO1 Is Set
Zooper widget Pro Variable:
i. Config = ZW var: TODO1 | ZW text: (Press space bar)
ii. If = %TODO1 Isn’t Set
Zooper widget Pro Variable:
i. Config = ZW var: TODO2 | ZW text: %TODO2
ii. If = %TODO2 Is Set
Zooper widget Pro Variable:
Config = ZW var: TODO2 | ZW text: (Press space bar)
If = %TODO2 Isn’t Set
Repeat Steps 4-5 for however many lines you generally have in your to do list increasing the numbers accordingly. I have up to TODO8
Create another task in Tasker e.g. Open TODO
Open file:
i. File = (press search button and locate text file)
In Zooper: Create a new widget
Add a Rich Text element
Edit text manually to:
i. TO Do:
#TTODO1#
#TTODO2#
#TTODO3#
#TTODO4#
Etc until you have them all in there.
Create a module OnTap action linked to the Tasker Task created in 4 above.
You’re done. Choose your favourite text editor to do the editing and the changes should sync across you devices.
If you have any questions or can think of a better way to do this comment below.
[Update] You'll also need to trigger the initial task in a tasker profile. I have one that essentially just runs it every 30 minutes to update the widget.
Cheers
this..

[TASKER] [PROFILES] [HELP] for S6 Edge Plus enthusiasts

As a huge fan of Tasker and a huge fan of this s6e+, this thread is dedicated to the pursuit of awesomeness! Feel free to SHARE your creations, to ASK for help, and to ASSIST others! The learning curve is steep in the beginning, which can be intimidating for new users, but after the concept is understood, the possibilities are limitless!
I would describe myself as an experienced novice level user. I'll try to help answer questions whenever possible, but there are often multiple ways to skin the cat when using Tasker. Alternative solutions are encouraged! I'll keep the OP up to date with helpful links and share some of my personal creations in the second post. In the third post, I'll share anything specifically related to our device. Fourth post are user created favorites.
If you share anything and would like it included in the OP or first few posts, send me a pm!
What are your favorite profiles & tasks?? Has anybody made use of the edges yet for a cool scene?
Tasker website and downloads: http://tasker.dinglisch.net/
Tasker google group forums, great place to find help: https://groups.google.com/forum/m/#!forum/tasker
Nice tutorial and help thread: http://forum.xda-developers.com/showthread.php?t=1110775
Tasker user wiki: http://tasker.wikidot.com/profile-index
Joao forums for Autoapps plugins: http://forum.joaoapps.com/index.php
Sent from my g928c
Some of my personal creations:
CALL RECORDER
Here's an easy call recorder project I made to automatically record all incoming/outgoing calls and store them according to caller/date/time.
https://www.dropbox.com/s/bxxxbw3z7wn5pne/Call_Recorder.prj.xml?dl=0
*******************
SAY TRAFFIC REPORT
I'll post this one as a description...you would have to make it your own, but the concept is described below. It's an Autovoice profile that gets the most up to date Philadelphia traffic conditions from Twitter, then speaks them outloud to me. The cool part is that the speech can be paused with the press of a button or automatically if a call comes in:
Code:
Profile: Voice - Traffic Report - Philly (227)
State: AutoVoice Recognized [ Configuration:Event Behaviour: true
Command: "philly traffic" ]
Enter: Twitter Philly Traffic (228)
A1: Variable Set [ Name:%NewLine To:
Do Maths: off Append: off ]
A2: Variable Set [ Name:%Space To: Do Maths: off Append: off ]
A3: Run Shell [ Command:su
sqlite3 /data/data/com.twitter.android/databases/390939457-23.db
SELECT datetime(statuses.created/1000, 'unixepoch', 'localtime'), created, author_id, content FROM statuses WHERE author_id = 249854777 AND date(datetime(created/1000 , 'unixepoch', 'localtime')) = date('now', 'localtime') AND created/1000 > ('%TIMES'-3600) ORDER BY created DESC; Timeout (Seconds):0 Use Root: off Store Output In:%Twitter Store Errors In:%TwitError Store Result In:%TwitResult ]
A4: AutoVoice Continuous [ Configuration:
Stopping continuous voice recognition Package:com.joaomgcd.autovoice Name:AutoVoice Continuous Timeout (Seconds):0 ]
A5: Media Volume [ Level:15 Display: off Sound: off ]
A6: Variable Set [ Name:%Pause To:0 Do Maths: off Append: off ]
A7: Show Scene [ Name:Speech Pauser Display As: overlay, Blocking Horizontal Position:184 Vertical Position:100 Animation:System Show Exit Button: off Continue Task Immediately: on ]
A8: If [ %Twitter Set ]
A9: Variable Split [ Name:%Twitter Splitter:%NewLine Delete Base: off ]
A10: For [ Variable:%Traffic Items:%Twitter() ]
A11: Variable Split [ Name:%Traffic Splitter:| Delete Base: off ]
A12: Variable Split [ Name:%Traffic1 Splitter:%Space Delete Base: off ]
A13: Variable Search Replace [ Variable:%Traffic4 Search:# Ignore Case: off Multi-Line: off One Match Only: off Store Matches In: Replace Matches: on Replace With: ]
A14: Variable Split [ Name:%Traffic4 Splitter:http:// Delete Base: off ]
A15: Perform Task [ Name: Philly Traffic Abbreviation Conversion Priority:%priority + 1 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop: off ]
A16: Variable Set [ Name:%SearchTime To:%Traffic12 Do Maths: off Append: off ]
A17: Perform Task [ Name:Time Conversion Priority:%priority + 1 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop: off ]
A18: Perform Task [ Name:SPEECH Task Pauser Priority:%priority + 1 Parameter 1 (%par1):%Traffic41 was reported at %SearchTime1 %SearchTime2 %SearchTime3 Parameter 2 (%par2): Return Value Variable: Stop: off ]
A19: End For
A20: Else If [ %index !Set ]
A21: Say [ Text:There haven't been any traffic alerts reported within the last hour. Would you like me to check another hour back? Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus: on Network: off Continue Task Immediately: off ]
A22: Get Voice [ Title:Check Another Hour? Language Model:Free Form Language: Maximum Results:1 Timeout (Seconds):10 ]
A23: If [ %VOICE Set ]
A24: If [ %VOICE ~ yes ]
A25: Run Shell [ Command:su
sqlite3 /data/data/com.twitter.android/databases/390939457-23.db
SELECT datetime(statuses.created/1000, 'unixepoch', 'localtime'), created, author_id, content FROM statuses WHERE author_id = 249854777 AND date(datetime(created/1000 , 'unixepoch', 'localtime')) = date('now', 'localtime') AND created/1000 > ('%TIMES'-7200) ORDER BY created DESC; Timeout (Seconds):0 Use Root: off Store Output In:%Twitter Store Errors In:%TwitError Store Result In:%TwitResult ]
A26: Variable Set [ Name:%index To:1 Do Maths: off Append: off ]
A27: Goto [ Type:Action Label Number:1 Label:Top Anchor ]
A28: Else If [ %VOICE ~ no ]
A29: Goto [ Type:Action Label Number:1 Label:End Anchor ]
A30: End If
A31: Else
A32: Goto [ Type:Action Label Number:1 Label:Check another hour ]
A33: End If
A34: Else If [ %index ~ 1 ]
A35: Say [ Text:There haven't been any traffic alerts reported within the last two hours. Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus: on Network: off Continue Task Immediately: off ]
A36: End If
A37: Destroy Scene [ Name:Speech Pauser ]
A38: AutoVoice Continuous [ Configuration:
Starting continuous voice recognition without headset
Persistent Notification: true Package:com.joaomgcd.autovoice Name:AutoVoice Continuous Timeout (Seconds):0 ]
*****************
HUNTING TIMES
This one is my baby. It's made to be a standalone app, but I'll never publish it. This neat project analyzes sun and moon positions for the user's precise location and also every detail of the hourly weather forecast, to create a score of the probability of seeing wildlife...specifically deer. You can enter a zip code or click the button to get your location. You can enter any date or click the button for today's date.
Calculation of the solunar data is very complex, so I've used Javascript embedded in a local html document and processed by a hidden Web View element. That document and the needed library is in Solunar.zip...in order for this project to run, that needs to be unzipped into sdcard/HuntingTimes/ directory. The html and libraries are copyrighted and used with permission. I edited the files to pass variables directly to Tasker for twilights, sunrise/sunset and moonrise/moonset times for any coordinates, at any date.
I coded all the analysis.
Scoring factors are:
Twilight
Sunrise/Sunset
Lunar overhead/underfoot major periods
Lunar rise/set minor periods
Weather conditions (cloudy/sunny/rain/snow/many more) weighted by % chance of precip when appropriate
Barometric pressure measurement
Barometric pressure trend
Temperature
Wind speed
Others...
Hourly scoring detail is available up to 14 days from current date. Beyond that, a single score for the entire day is calculated from solunar data only. You can choose any future date you wish.
https://www.dropbox.com/s/xlu382ip88vma97/Hunting_Times.prj.xml?dl=0
https://www.dropbox.com/s/oxeefyurgy2rqa4/Solunar.zip?dl=0
********************
DASHCAM
This project launches with my car mode and discreetly records hd video through my windshield (while in the windshield mount), without displaying the view on screen (so I can use Maps or other apps) and without recording audio (so the mic is free to receive voice commands/ phone calls/etc). The recording is done with a third party app (Background Video Recorder [BVR] formerly called Secret Video Recorder [SVR]) and I use tasker to start/stop the recordings and organize the storage structure.
https://www.dropbox.com/s/7t6st60uxxss77j/Dashcam.prj.xml?dl=0
*****************
KILL ALL APPS
Tasker has a built in kill action...sometimes it doesn't work. There are a few plugins that work better but not 100%...a year or so ago I was trying to solve how to close google app, so I made my own task. This was in my car mode and I had would trigger by voice command or by waving my hand near the proximity sensor, to kill the current app. I made another modified version that looped until all apps were killed, which was part of my Exit Car Mode. That's what I've attached here:
https://www.dropbox.com/s/tc5yosesd0dzrfb/Kill_All_Apps.tsk.xml?dl=0
****************
MUTE GOOGLE APP
I use autovoice continuous mode heavily. It works by restarting google's voice recognition every 5 seconds. Google has hard coded that annoying beep into its app, without a toggle to turn it off. Only known solution before this was to mute the entire media volume channel...which means all other useful audio is muted (music, map directions, TTS, etc). This fix uses an xposed module called App Settings which can mute all the sound from any individual app. I use Tasker to detect when Autovoice is active, then turn off the sound for Google App...when Autovoice is off, turn the sound back on for Google App. Since they're is no direct way to toggle this setting subtly with an intent, I use the Auto Input plugin to accomplish the job.
Video of how it works:
https://www.dropbox.com/s/3ksgzlhdepkleif/SCR_20151223_000917.mp4?dl=0
Code:
Profile: AVC On Listener (42)
Event: Variable Set [ Variable:%AVCONTINUOUS Value:true User Variables Only: Off ]
Enter: Turn AVC Profiles On (47)
A1: If [ %GoogleSound !~ Off ]
A2: Secure Settings [ Configuration:AutoInput: service.ServiceAccessibility - Enabled Package:com.intangibleobject.securesettings.plugin Name:Secure Settings Timeout (Seconds): 0 ]
A3: Set Clipboard [ Text:google app Add: Off ]
A4: Launch App [ App:App Settings Data: Exclude From Recent Apps: Off Always Start New Copy: Off ]
A5: AutoInput Action [ Configuration:Type: Text
Value: name or package
Action : Paste
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A6: AutoInput Action [ Configuration:Type: Text
Value: com.google
Action : Click
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A7: AutoInput Action [ Configuration:Type: Text
Value: mute audio
Action : Click
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A8: AutoInput Action [ Configuration:Type: Id
Value: de.robv.android.xposed.mods.appsettings:id/menu_save
Action : Click
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A9: AutoInput Action [ Configuration:Type: Id
Value: android:id/button1
Action : Click
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A10: Perform Task [ Name:Kill Current App Priority:%priority+1 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop: off ]
A11: Secure Settings [ Configuration:AutoInput: service.ServiceAccessibility - Disabled Package:com.intangibleobject.securesettings.plugin Name:Secure Settings Timeout (Seconds):0 ]
A12: Variable Set [ Name:%GoogleSound To: Off Do Maths: Off Append: Off ]
A13: End If
*******************
MUTE GOOGLE TONES FOR AUTOVOICE
That annoying tone that Google voice recognition is listening...the reason why we have to mute the whole media stream...which very much limits the possibilities of using TTS features (like Maps directions & traffic updates) at the same time as Autovoice*Continuous... I solved the problem. It works beautifully!
Requires Root
Requires Xposed
Requires module: App Settings
Requires Auto Input
The Xposed module, App Settings, allows you to mute the sound for any individual app. It mutes all the sound for the app though, not just the voice recognition tones, so this setting needs to be managed with Tasker.
I use a Variable Set event to trigger if %AVCONTINUOUS ~ true, to run a task that uses Auto Input to turn google app sound off. And another profile to turn google app sound back on when %AVCONTINUOUS ~ false. This effectively mutes that tone without having to make Autovoice mute the whole media channel, which is extremely useful for me!
Code:
Profile: AVC On Listener (42)
Event: Variable Set [ Variable:%AVCONTINUOUS Value:true User Variables Only: Off ]
Enter: Turn AVC Profiles On (47)
A1: If [ %GoogleSound !~ Off ]
A2: Secure Settings [ Configuration:AutoInput: service.ServiceAccessibility - Enabled Package:com.intangibleobject.securesettings.plugin Name:Secure Settings Timeout (Seconds): 0 ]
A3: Set Clipboard [ Text:google app Add: Off ]
A4: Launch App [ App:App Settings Data: Exclude From Recent Apps: Off Always Start New Copy: Off ]
A5: AutoInput Action [ Configuration:Type: Text
Value: name or package
Action : Paste
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A6: AutoInput Action [ Configuration:Type: Text
Value: com.google
Action : Click
Is Tasker Action: false
Check Screen State: falsePackage:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A7: AutoInput Action [ Configuration:Type: Text
Value: mute audio
Action : Click
Is Tasker Action: false
Check Screen State: falsePackage:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A8: AutoInput Action [ Configuration:Type: Id
Value: de.robv.android.xposed.mods.appsettings:id/menu_save
Action : Click
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A9: AutoInput Action [ Configuration:Type: Id
Value: android:id/button1
Action : Click
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A10: Perform Task [ Name:Kill Current App Priority:%priority+1 Parameter*1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop: Off ]
A11: Secure Settings [ Configuration:AutoInput: service.ServiceAccessibility - Disabled Package:com.intangibleobject.securesettings.plugin Name:Secure Settings Timeout (Seconds): 0 ]
A12: Variable Set [ Name:%GoogleSound To: Off Do Maths: Off Append: Off ]
A13: End If
*****************
SEND MY ETA
This one is useful when navigating. It is an Autovoice profile that sends an SMS to a contact of my choice with my eta.
https://www.dropbox.com/s/f39zqz8ht0jjo09/Voice___Send_My_ETA.prf.xml?dl=0
*********************
VOICE CONTROLLED GOOGLE PLAY MUSIC
Play any artist/album/song/playlist on Google Play Music. This Autovoice profile uses regex matching for flexibility. You can say "Play artist Keller Williams" or "Play song Vicarious" etc...and the appropriate playlist will play from your library if it exists or from the 'radio station' if it doesn't.
https://www.dropbox.com/s/3jm4ey212zy79hr/Voice___Play_Music.prf.xml?dl=0
Sent from my g928c
Specific tasks/profiles/projects for our Galaxy S6 Edge+
RUGGEDHUNTER'S AUTOCOCKTAIL & NOTIFICATIONS
This is a Tasker kid app that I made. Check out the link:
XDA Thread
Please hit the Thanks button if you'll find this feature useful!
Reserved
Favorites
Sent from my g928c
Nice work - I also have issues killing apps with Tasker...nothing seems to close Waze and Play Music after getting out of the car!
DPLOY said:
Nice work - I also have issues killing apps with Tasker...nothing seems to close Waze and Play Music after getting out of the car!
Click to expand...
Click to collapse
Thanks. As long as Waze/Play Music is running in the foreground, the task above should work perfectly for you. If you need to kill it while running in the background (notification pulldown), a simple modification should get it done. :beer:
Sent from my g928c
OP and S6 Edge+ features section updated.
Sent from my S6 Edge+ g928c
BobCatRom
XDA Tasker Week in Review
Sent from my g928c
Echoe ROM
RuggedHunter said:
XDA Tasker Week in Review
Sent from my g928c
Echoe ROM
Click to expand...
Click to collapse
mate..for me the most most wanted feature is the device led blink on the emmc activity....epic feature....will give anything if anyone made it!
vagenrider said:
mate..for me the most most wanted feature is the device led blink on the emmc activity....epic feature....will give anything if anyone made it!
Click to expand...
Click to collapse
Sounds like a fun project. I can tell you that the native LED action in Tasker doesn't work for all devices, but if not, there's probably a plug-in that would work.
I'm only loosely familiar with what emmc is. If there's something specific to look at in the system to determine if there's current activity on that chip, just point me in the right direction and I might be able to work with it....modified files/broadcast intent...anything like that happen during "emmc activity"?
Sent from my g928c
Echoe ROM
RuggedHunter said:
Sounds like a fun project. I can tell you that the native LED action in Tasker doesn't work for all devices, but if not, there's probably a plug-in that would work.
I'm only loosely familiar with what emmc is. If there's something specific to look at in the system to determine if there's current activity on that chip, just point me in the right direction and I might be able to work with it....modified files/broadcast intent...anything like that happen during "emmc activity"?
Sent from my g928c
Echoe ROM
Click to expand...
Click to collapse
my friend thanks so much for the interest..believe me if you made it will be a w e s o m e for me..i dont care if build it on script commands or tasker..my progress for now is some script commands-combinations but won't work..
here..
#!/system/bin/sh
#
echoe mmc0 > /sys/class/leds:led_r/trigger;
Yeah, activating the led with a script is another good idea. But what exactly do you mean by "emmc activity"? The hard part will be detecting whatever that is and using it to trigger the action.
Sent from my g928c
Echoe ROM
RuggedHunter said:
Yeah, activating the led with a script is another good idea. But what exactly do you mean by "emmc activity"? The hard part will be detecting whatever that is and using it to trigger the action.
Sent from my g928c
Echoe ROM
Click to expand...
Click to collapse
sorry mate..i mean mmc0 (internal memory activity)..i think its possible but my point is that we must found the proper led path and proper commands to get it and my coding knowledge doesn't helps me a lot..
Does anyone know how to detect when the Edge panel has been opened, or how to make a scene over top?
sleedham said:
Does anyone know how to detect when the Edge panel has been opened, or how to make a scene over top?
Click to expand...
Click to collapse
To detect when the edge FEEDS are on for edge autococktail, I was using dumpsys window windows and detect the blocking window name of the main panel.
Certainly it's not the same for the edge PANEL... But if I had a suggestion it would be to dig thru a dumpsys and see if anything sticks out.
Sent from my iPhone using Tapatalk

Categories

Resources