tags:

views:

53

answers:

2

What's the proper way for other people to reuse my Activities? Should they hard code the intent actions in their app or is it customary to provide them with a jar file enumerating my app's intent actions? Is there a less tightly-coupled way to lookup the intent actions?

+2  A: 

First of all, take a look at openintents.org and see if there's any match to what your activity does.

Secondly, documentation is always a good idea.

Having the intent details hardcoded in their applications should work just fine. After all, the intents are part of your public interface and shouldn't change.

Pontus Gagge
Yes to openintents.org. If you find a registered intent there that's close enough to what your activity does, you should write your activity to respond to that intent (and add it to your manifest.)If you don't find an intent at openintents.org that does what you want, then you should register your new one.
Edward Falk
A: 

Your applications manifest should announce what sorts of things your activity can handle, via intent-filters. Outside users can read the manifest to determine what actions you support, and invoke them via action intents.

See intents and intent filters for more details.

Mayra