Explicit and Implicit Intents

An explicit intent names its target class, such as Intent(context, NoteActivity::class.java). An implicit intent names only an action and a type, and the system offers every activity whose intent filter matches, so BookNest can share without knowing which apps the reader has:

Sharing a book with an implicit intent (ShareBook.kt, excerpt)Kotlin
fun shareBook(context: Context, book: Book) {
  val send = Intent(Intent.ACTION_SEND).apply {   // implicit: action + type, no class
    type = "text/plain"
    putExtra(Intent.EXTRA_SUBJECT, book.title)
    putExtra(Intent.EXTRA_TEXT, context.getString(R.string.share_text,
      book.title, book.author, "booknest://book/${book.id}"))
  }
  context.startActivity(Intent.createChooser(send, context.getString(R.string.share_via)))
}

createChooser always shows the system share sheet. In the other direction, a booknest://book/<id> filter (Manifest Permissions) makes MainActivity answer ACTION_VIEW. Send the intent a browser would, then try to start the private NoteActivity:

A deep link from adb, then an attempt to start the private activityShell
adb shell am start -a android.intent.action.VIEW -d "booknest://book/3"
adb shell am start -n com.example.booknest/.NoteActivity
Output
Starting: Intent { act=android.intent.action.VIEW dat=booknest://book/... }
Warning: Activity not started, intent has been delivered to currently running top-most
  instance.
Starting: Intent { cmp=com.example.booknest/.NoteActivity }
Exception occurred while executing 'start':
java.lang.SecurityException: Permission Denial: starting Intent { flg=0x10000000 xflg=0x4
  cmp=com.example.booknest/.NoteActivity } from null (pid=9974, uid=2000) not exported from
    uid 10217

The singleTop MainActivity got the link in onNewIntent() and showed "Opened from a link: Salt and Saffron"; NoteActivity is exported="false", hence the refusal. Verified App Links are in Deep Links.