Launching Handcent's Quick Compose feature. (via intents?)

386 views
Skip to first unread message

Hagure

unread,
Nov 22, 2010, 12:50:00 AM11/22/10
to Tasker
Hello all!

I've been trying to figure out for a while now how to create a Task
that will launch the Quick Compose feature of Handcent.

Normally, it is accessed by long pressing the search button, but I
have also been able to bring it up in Launcher Pro's "Activity"
feature. After looking at how this is done, I came up with this:

<string>intent:#Intent;action=android.intent.action.MAIN;component=com.handcent.nextsms/
com.handcent.sms.ui.HcQuickComposeActivity;end</string>

I assume that: "com.handcent.nextsms" refers to the Handcent app, and
"com.handcent.sms.ui.HcQuickComposeActivity" refers to the Quick
Compose activity.

I've tried playing around blindly with the Action/Component intents to
get this to work, but to no avail.

Anyone have any ideas?

Hagure

unread,
Nov 22, 2010, 2:58:00 PM11/22/10
to Tasker
To give some background:
Right now, I do not have a default set for my Search Long Press, so I
get the standard "Complete action using" dialog, listing a few
different apps, "Handcent Quick Compose" being one of them.
What I am attempting to do, is to recreate this dialog with a Tasker,
taking out some unnecessary actions, and adding a few of my own.

I looked through Handcent's manifest.xml and found this:

<activity android:theme="@android:style/Theme.Dialog"
android:label="@string/menu_item_handcent_quick_compose"
android:name="com.handcent.sms.ui.HcQuickComposeActivity"
android:taskAffinity="com.handcent.sms.quickcompose"
android:launchMode="singleInstance" android:configChanges="locale|
keyboardHidden|orientation" android:windowSoftInputMode="stateHidden|
adjustPan">
<intent-filter>
<action
android:name="android.intent.action.SEARCH_LONG_PRESS" />
<category android:name="android.intent.category.DEFAULT" /
>
</intent-filter>
</activity>

It seems that there's no special intent to call the activity (unlike
the example in the "How to Launch an Activity like Launcher Pro"
thread). While I am able to make a Action Intent task that emulates a
Search Long Press (in return bringing up the aforementioned dialog),
I'm still stumped as far as bringing up the Quick Compose app.

Hagure

unread,
Nov 26, 2010, 7:21:25 PM11/26/10
to Tasker
After some more reading into the android documentation, I _think_ I
might know how to do it.
Since the only intent that is described is SEARCH_LONG_PRESS, that's
the only one I can call to access it. So I call that one as an Action
Intent:

Action: android.intent.action.SEARCH_LONG_PRESS
Cat: Default
Data: (none)

Then, I pass these as Extras:

Extra1: android:theme="@android:style/Theme.Dialog"
Extra2:android:name="com.handcent.sms.ui.HcQuickComposeActivity"
Extra3:android:taskAffinity="com.handcent.sms.quickcompose"
Extra4:android:launchMode="singleInstance"
android:configChanges="locale|keyboardHidden|orientation"
Extra5:android:windowSoftInputMode="stateHidden|adjustPan"

Unfortunately, I am unable to test this theory since Tasker currently
only allows 2 extras to be passed.

Does this sound right to anyone? I'm not even sure if this is how
"Extras" work... I'd like to reiterate that I have no idea what I'm
doing, and am mainly attempting this to learn more about how intents
work in general. The way Launcher Pro makes it happen so easily makes
me feel like I'm missing something really obvious though!


PS: Does anyone know of any apps/sdk tools that I could use to test
this? Intent Playground doesn't advanced enough for this.

Hagure

unread,
Nov 26, 2010, 7:38:34 PM11/26/10
to Tasker
Doesn't seem like anyone's interested, but just in case, here's a Task
file that has a bunch of my trial&error tasks from trying to get this
to work. It doesn't list ALL of them, as it's often easier to edit an
existing task, rather than create a new one (Can't wait for a
"duplicate task" function!). But it's a pretty good history of what
I've tried so far.

http://db.tt/Smbr6IK

tomm

unread,
Dec 3, 2010, 3:48:46 PM12/3/10
to Tasker
appreciate the effort, I've tried playing around too even looking into
the activity log of my EVO and still couldn't piece together anything
that has worked.

Tyler Shivers

unread,
Jan 27, 2011, 4:16:53 AM1/27/11
to Tasker
I got my application to work and launch it.


public class QuickText extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setComponent(new
ComponentName("com.handcent.nextsms","com.handcent.sms.ui.HcQuickComposeActivity"));
startActivity(intent);
finish();

}

Hagure

unread,
Jan 28, 2011, 5:50:15 AM1/28/11
to Tasker
Thanks! (for the emails too)

But unfortunately I don't quite understand how to put this in a form
Tasker understands, but I appreciate the help!

John

unread,
Jan 29, 2011, 5:59:58 AM1/29/11
to Tasker
you can load the above in a .py file (python script)
and then "load script" it.

Hagure

unread,
Jan 31, 2011, 2:07:40 AM1/31/11
to Tasker
Hmm... I figured it would be something along these lines, but this
doesn't seem like python code (more java looking). At any rate, I
tried it out in SL4A, but it didn't work. My python knowledge is next
to nothing (I've really gotta sit down with it soon), so I don't know
what's up, but at the very least, the first { doesn't seem to be
closed.

Brandon Canary

unread,
Mar 15, 2011, 8:36:41 AM3/15/11
to Tasker
How do I make this into a launcher pro shortcut file using the
shortcut maker?
http://www.launcherpro.com/shortcutcreator/

Pent

unread,
Mar 16, 2011, 3:56:57 AM3/16/11
to Tasker
> >         Intent intent = new Intent(Intent.ACTION_MAIN);
> >         intent.setComponent(new
> > ComponentName("com.handcent.nextsms","com.handcent.sms.ui.HcQuickComposeAct ivity"));

You won't be able to do it with Tasker's interface yet, because
there's no way to start an activity with Component Intent, that's on
the shortlist for something else though, at which point you would do:

Action: Component Intent
Package: com.handcent.nextsms
Class: com.handcent.sms.ui.HcQuickComposeActivity
Component Type: Service

Pent

Pent

unread,
Mar 16, 2011, 8:12:59 AM3/16/11
to Tasker
> Action: Component Intent
> Package: com.handcent.nextsms
> Class: com.handcent.sms.ui.HcQuickComposeActivity
> Component Type: Service

Yes, that should work next release. Except it should be:

> Package: com.handcent.nextsms
> Class: com.handcent.sms.ui.HcQuickComposeActivity
> Target: Activity


Pent

Hagure

unread,
Mar 24, 2011, 5:03:28 PM3/24/11
to Tasker
Awesome! Can't wait!

Pent

unread,
Mar 25, 2011, 4:37:15 AM3/25/11
to Tasker
> Awesome! Can't wait!

The beta is out, give it a try if you don't mind betas :-)

Pent

kperk14

unread,
May 19, 2012, 1:24:53 PM5/19/12
to tas...@googlegroups.com

>  Package: com.handcent.nextsms
>  Class: com.handcent.sms.ui.HcQuickComposeActivity
>  Target: Activity

I tried this out today. It pulls up the Quick Compose Activity, but I also get a message that the Mail app has crashed and needs to force close. It's as if it pulls up the mail app as well as the Quick Compose. Any idea why that keeps happening?

kperk14

unread,
May 19, 2012, 4:11:02 PM5/19/12
to tas...@googlegroups.com
Nevermind, figured it out.
Reply all
Reply to author
Forward
0 new messages