title: Provide the caller id for incoming call from my own app
body: <p>I want to write an App that can identify the phone number of incoming (unknown) calls by looking into a table inside my app (e.g. an SQLite Database Table).</p>
  
  <p>I already implemented this in iOS using a <a href="https://developer.apple.com/documentation/callkit/cxcalldirectoryextensioncontext" rel="noreferrer">Call Directory Extension</a>, but for Android the only option I can find is using a 
   <a href="https://stackoverflow.com/questions/15683952/pop-up-window-over-android-native-incoming-call-screen-like-true-caller-android">BroadcastReceiver with a popup above the native incoming call screen</a> to show contact information.</p>
  
  <p><a href="https://developer.android.com/reference/android/provider/ContactsContract.Directory.html" rel="noreferrer">ContactsContract.Directory</a> seems to offer the possibility to create custom directories where the native call app could look up the caller id. Unfortunately, I can't find any good examples on how to accomplish this.</p>
  
  <p>Does anybody know if it is possible to implement the caller id using the ContactsContract.Directory or if there is something similar  in Android to the Call Directory Extension in Android? If that is the case, an example code would be really helpful.</p>