Ruby Ruby - 7 months ago 30
Android Question

What's the difference between activity and intent in Android?

Can anyone explain to me the difference between an "Activity" and an "Intent" on the Android platform?


In very simple language, Activity is your user interface and whatever you can do with a user interface. When you move from one user interface, you need to launch that new user interface with an Intent. The Intent is your event that is passed along with data from the first user interface to another.

Intents can be used between user interfaces and background services too. Also an Intent is passed when you want to broadcast data to all activities and background services.

Intent lives as an object, activity lives with a face and interactions. Hope it has been helpful.