[Android Apps and Games] strictlyrude27:
APPS YOU NEED

See post #1 for links to all required apps.

Android 2.2+

Tasker

Texter

SL4A

Perl for Android (or your interpreter of choice, but the script I provide is for Perl)

INSTALLATION

<----VERY IMPORTANT! DOES NOT WORK STRAIGHT OUT OF THE BOX.

Download Tasker_Texty_V1.2.zip. Place all files ending with "prf.xml" into /sdcard/Tasker/profiles . Place Texty.tsk.xml into /sdcard/Tasker/tasks . Import all profiles and tasks by opening Tasker; hit Menu; hit Profile Data; "Import One Profile" and "Import One Task". Place markSMSread.pl into /sdcard/SL4A/scripts .

Create the Texty (it's now officially named Texter, but I didn't want to bother changing the words in the profiles, not to mention "Texty" sounds way better to me) widget on your home screen. Check out the Tasker website if you need help on how to do this.

Open up the "Texty Profile" profile. Change "Load App" from "Messaging" to your favorite SMS app (or keep it as default if that's what you prefer.)

Remove the "Type: System Lock" action, and replace it with "Display->System Lock". You will need to give Tasker administrative capabilities.

As necessary, change the "wait" values in the Texty Active; Texty Display On; and Texty Display Off profiles. See below, "Scripts and Profiles", on the rationale for this.

Enjoy the wonderful amalgamation of Texter, Tasker, and Android! Happy texting :)

ADVANCED: SCRIPTS AND PROFILES

I include this section redundantly so people can see what exactly goes into the setup. This way you can be confident that you're customizing your profiles exactly how you want to, and you can see my rationale for why I used certain numbers, variables, etc.

Tasker cannot clear the unread SMS notification on its own, so I use SL4A to do it. Here is the Perl script I use (you can of course use your own script and programming language if you'd like):

use strict;
use warnings;
use Android;

# See http://goo.gl/Qw0WK for original code

my $droid = Android->new();
my $msgs = $droid->smsGetMessageIds(1);

my $i = 0;
while ($msgs->{result}[$i]){
$droid->smsMarkMessageRead([$msgs->{result}[$i]], 1);
$i++;
}

I will assume you're familiar with Tasker language. At some point I will just post profiles you can import. If you need help with any steps, just ask! I'll do my best to respond in a timely fashion.

Note before importing/creating profiles: You need to make sure %TEXTY is clear on boot. I don't know if variables are cleared on phone restarts; I took no chances and wrote into my Boot profile to clear %TEXTY. If someone can let me know, that would be appreciated.

WIDGET-TASK: "TEXTY"

Initial Icon: Texty app look

Notes: You may need to write everything without the "Set Widget Icon"; make the widget; then edit the task and re-make the widget. Tasker looks for widgets to change icons, and it can't change the icon of a non-existent widget.

1) If %TEXTY ! Set

2) Notify (title: "Texty Active"; icon: whatever you want; permanent: ON)

3) Set Widget Icon (name: Texty; icon: whatever you want, I use the stock SMS icon)

4) Variable set (%TEXTY to 1)

5) Stop

6) End If

7) If (%TEXTY Is Set)

8) Set Widget Icon (name: Texty, icon: original Texty icon)

9) Notify Cancel (title:"Texty Active")

10) Variable Clear: %TEXTY

11) End If

PROFILE: TEXTY ACTIVE

Condition: Event: Received Text

Notes: Mess around with the wait statements to see if there's a sweet spot. You might find a 2 second wait might open and close your SMS program before the popup notify comes up. I'm still trying to find all the right numbers myself. (I think I've settled on 5, but that could change all willy-nilly like)

1) If %TEXTY is set

2) Wait 5 seconds

3) IF %TEXTYSCN !~ on

4) Load App: your SMS app of choice (to clear the notification bar and/or popup notifies)

5) SL4A: markSMSread.pl

6) Wait 1 second

7) Go Home

8) System Lock

9) End If

10) End If

PROFILE: DISPLAY ON

Condition: Event: Display On

Notes: Adjust the wait: if it's too long, the main profile will clear your popup notify and sleep your phone if you receive a message soon after starting to use your phone; too short and the main profile might not clear your popup notify at all [see the wait statement in the Texty Active profile]

1) If %Texty Is set

2) Wait 10 seconds

3) Variable set: %TEXTYSCN to on

4) END IF

PROFILE: DISPLAY OFF

Condition: Event: Display Off

Notes: Adjust the wait: if it's too long, the main profile won't clear your popup notify if you receive a text shortly after display turns off; too short and %TEXTYSCN might accidentally get flipped to on.

1) If %Texty is set

2) Wait 15 seconds IF %TEXTYSCN ~ off

3) Variable set: %TEXTYSCN to off

4) End if

PROFILE: PHONE OFFHOOK

Condition: Event: Phone Offhook

1) Profile Status: Texty Active -> Off IF %TEXTY is set

PROFILE: PHONE IDLE

Condition: Event: Phone Idle

1) Profile Status: Texty Active -> ON

PROFILE: CLEAR TEXTYSCN

Condition: Event: Variable cleared: %TEXTY

1) Variable Clear: %TEXTYSCN

Conclusion

I hope my work has helped anyone else as obsessive as I am about the meshing of their technology. I am of the school of thought that anything I do on my phone I should be able to do on my computer, and vice versa - I use Chrome to Phone, android2cloud, etc - I don't ever want to be tethered to any single device. These Tasker profiles have gotten me one step closer to realizing that dream.

CREDITS

brandall: for his excellent Tasker work! He was the inspiration for me to write this post up.

Max from the android-scripting Google group: for helping me create the markSMSread.pl script.

The developers of Texty, Tasker, GO SMS, and SL4A. Without them, there wouldn't be us.

TO DO

further testing to find edge cases, etc

CHANGELOG

v1.2:
-->fixed import bug - because System Lock action requires admin capabilities, Tasker would not import. Now requires user to manually add action.
-->restored markSMSread.pl workaround - Texter only clears SMS when you hit "close" or "reply", but the notification does not go away.
-->added more installation instructions
v1.1:
-->removed markSMSread.pl workaround - Texter now clears SMS notifications on its own.
-->added v1.1 .zip to easily import profiles.
v1.0:
-->initial release

Please hit the Thanks button if I helped you with your Texter experience!