zer0stimulus
zer0stimulus

Reputation: 23676

Android: Proper way to reuse my app's activities?

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?

Upvotes: 0

Views: 299

Answers (2)

Cheryl Simon
Cheryl Simon

Reputation: 46844

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.

Upvotes: 0

Pontus Gagge
Pontus Gagge

Reputation: 17278

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.

Upvotes: 2

Related Questions