What is android intent?
Android folds multiple ideas into the concept of an intent. You can use intents to invoke other applications from your application. You can use intents to invoke internal or external components from your application. You can use intents to raise events so that others can respond in a manner similar to a publish-and-subscribe model. You can use intents to represent actions.
At the simplest level, an intent is an action that you can tell Android to invoke. The action Android invokes depends on what is registered for that action. (Pro Android – Apress)
Register an activity as android intent?
In this section, I want to describe a way to register an activity as an android intent.
If you don’t know how to add an activity, please read my post here. Suppose that you created an activity name MyActivity. Now, open AndroidManifest.xml file, choose the tab AndroidManifest.xml to edit it manually. Add action and category element inside your activity element as below image.
The general convention for an action name is <your-package-name>.intent.action.YOUR ACTION NAME
From now, whenever you need to use your intent, you can invoked it such as below:
String actionName = “sandbox.basic.activity.intent.action.ShowMyActivity”;
Intent newIntent = new Intent(actionName);