java - Android: Intent and exchanging data between components -
i read interprocess communication (ipc) , creating send data 1 component component.
knew ipc defines communication channel between different components.
channel have programming interfaces components send data through. ways create interface such aidl, binder, , messenger.
after creating interface, data sent on must parcel. summary steps follows:
1. create programming interface.
2. bind interface application component.
3. components sending data component must convert data parcel.
found called intent can send data 1 component without overhead.
need explanation how intent can send data without having interface created?
intent internally have interface?
relation between intent , ipc, bound service, , interface?
wow have lot of confusion here. let's see if can clear things up.
1)ipc not send data 1 component (it can, inefficient way that). ipc sends data 1 process another. android app 1 process, although doesn't have (services placed process developer). reason important difference processes cannot share memory, special methods ipc needed send data between them.
2)data sent between components not have parcel. that's 1 way, , way android uses when sending startup parameters around. it's not necessary.
3)using binder talk service possible if 2 in same process. method totally avoid using ipc.
4)aidl wrapper around ipc method. aidl uses ipc, tries make normal function calls client.
5)an intent object abstraction data needed start service or activity in android. include parameters, may or may not in parcels. may or may not use ipc send parameters (if target activitiy or service in apk will. if isn't may not).
i think problem here don't understand process is, android component is, , how processes communicate. suggest doing studying on that.
Comments
Post a Comment