Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>For a comparison of Notifications on iOS vs. Intents on Android, I came up w/ following summary: </p> <p>Commonalities: </p> <ul> <li>Both mechanisms can be used to register for any notifications that report system changes your application needs (e.g., the battery level changes)</li> <li>both types can trigger lifecycle state changes</li> </ul> <p>Differences:</p> <ul> <li>Granularity level <ul> <li>Intents are used to pass information between Activities, Services or Broadcast receivers</li> <li>Notifications can be used to pass information between any kind of objects, be it either fine-granular to notify sbdy when a single GUI element changes, or coarse-granular to react when certain system events arrive <br/> <br/></li> </ul></li> <li>IPC <ul> <li>Intents can be used for inter-application communication (implicit Intents, no specific receiving component mentioned, late-binding), as well as intra-app communication (explicit Intents, receiving component specified, early-binding)</li> <li>Notifications are limited to intra-application communication on iOS (is there another way of achieving this?) <br/> <br/></li> </ul></li> <li>Use Case: <ul> <li>Intents are usually used to start other Activities (e.g., display another screen) or start some Services (e.g., play a music in background).</li> <li>on iOS, one would have to implement one's own logic to transition to another screen or start playing some music in background.</li> </ul></li> </ul> <p>In the end, what my question comes down to, was: <strong>as these concepts seem to be fundamentally different, is this a true obstacle for designing platform-independent Android-/iOS-Apps?</strong><br> <em>Or do you have suggestions on how to "abstract" those mechanisms, and minimize porting efforts?</em> (cross-platform solutions also must have means to translate these concepts into native code behind the scenes?)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload