Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>public final class ContactsContract </code></pre> <p>It Simply says Android Contact Provider is a final class. From Java 101 we know we can not extend final class. So the answer is no.</p> <pre><code>I would like to do is to add an additional icon to the standard contacts list </code></pre> <p>I am not seeing this as a big problem. You can create your own <code>ContentProvider</code> and retrieve data when you display back this data to your app. You can use an ID field to map original Contact with your own contact. You can add as many field as you want. </p> <pre><code>when it is pressed will cause my application to be notified and handle the call. </code></pre> <p>You can not modify standard phonebook app but you can have your own phonebook and do whatever you wanna do like add button with each contact or additional image to display. Considering those additional data are stored on your ContentProvider. </p> <p>But, for Handling call from standard phonebook app you do not need any custom content provider. You just need following <code>IntentFilter</code> in your <code>AndroidManifest</code> file.</p> <pre><code>&lt;intent-filter&gt; &lt;action android:name="android.intent.action.CALL_PRIVILEGED" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;data android:scheme="tel" /&gt; &lt;/intent-filter&gt; </code></pre> <p>And the permission, </p> <pre><code>&lt;uses-permission android:name="android.permission.CALL_PHONE" /&gt; </code></pre> <p>This will provide user an option to pick a dialer application which going to be your app or the standard dialer app to complete the dialing process. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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