I installed AnyCut on my G1 a little while ago. AnyCut is a small app that allows you to create shortcuts to, well, almost anything. It has a mysterious "Make Your Own" option that isn't really documented at all. I started to play with it a bit, and it's not as bad as you would think.
The Make Your Own screen has three fields: Action, Data, and Type. I believe that these line up with the constructor parameters of public Intent(String action, Uri uri, Context packageContext, Class<?> cls). The Action parameter is one of the string consts in the Intent class (such as android.intent.action.VIEW, not Intent.ACTION_VIEW), and the Data parameter should really be called Uri, because it includes the Uri of the item upon which you want to act. See also the list of common intents. I imagine that the Type parameter is a fully-qualified class name, but it can be left blank for most uses. Finally, I suspect that the packageContext parameter is supplied by AnyCut itself.
I haven't yet had a chance to verify any of this against the source code (which I came across while writing this post), but it might be worth a look.
No comments:
Post a Comment