android intent vs observer -


i wondering when should favour intent based approach on classic oberserver design pattern in android app.

would wize use intent's publish events within 1 activity?

definition

observer maintain list of dependents notify change. on other side intent abstract description of operation. can received same or multiple application perform task.

synchronous vs asynchronous

observer synchronous changes effect right-way. intent asynchronous.

binding

observer bindings compile time. on other side intent bindings @ run time

secure

for internal communication observer secure intent broadcast message , can receive message.

intent provide additional functionality on observer on android platform

  • communicating third party application , processes.
  • receive system notification perform task
  • application module reuse third party app. (ex taking pic)
  • intent stays around , app can retrieve data in later time (sticky intent)

would wise use intent's publish events within 1 activity?

this depend on requirement. requirement see 1 needed.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -