My question pretty much close to Java notify/observer design pattern . I worked in different java / Android programming. One thing i wanted to understand is how publisher know what are the class implementing the given interface. For example in android when camera is ready there is a method being calling if you implement a particular interface . How android calling this method method when camera open with out registering my class to android.
class mydevice implements camerainterface{
public void cameraup(){
// Implementing my logic when camera up. How android know that there is class //mydevice which is implementing my interface
}
}
How android know my class mydevice and calling this cameraup method.
I hope ,i explained my question in detail to understand.