Uploaded by khaledtaha1022001

Lecture-0918-04-2022

advertisement
Intent is used to run action from any mobile application to another
mobile application component.
If activity A in an app and wanted to communicate with activity B in
another app, they must do it through Intent.
Ex: If you opened mobile browser, and clicked on email address,
application will run a window that contains the email details.
There are 3 ways for calling using intent:
1- Call another activity without passing data:
I have a button if I clicked on it, activity b will be called.
2- Call another activity and passing data:
If I clicked on ok activity B will be called, and data is saved inside intent
and sent to A.
3- Call another activity and pass data lastly return results back and
calling activity:
Activity A sent to activity B data, then B processed this data and got
results, saved them inside intent, and sent back to A.
Download