0

This may not be something that is possible but I have tried a few things.

I have attempted to set the contacts from my provider into a group that is set to not visible (GROUP_VISIBLE, 0). However, without fail they still show up in the contacts list.

Also, I have set the contacts to have a setting to not be visible and to not show ungrouped contacts and tried several variations of grouping/ungrouping.

Essentially, my goal is to have contacts that primarily are just used for CallerId.

Ideas, thoughts?

Zach S.
  • 130
  • 1
  • 9

1 Answers1

1

Contact apps usually allow the user to select the display options he/she likes.

Contact apps are different between different devices, but the options are usually:

  1. Display all contacts (ignoring GROUP_VISIBLE)
  2. Display visible groups only (usually referred to as "custom" allowing the user the make certain groups visible or not)
  3. Display a specific group.

By making your contacts in hidden groups you'll be hiding them for some of your users, but not all, also, users could still select a checkbox to make your contact groups visible.

What most caller-ID apps do, is register for incoming-call events, and display a popup with the caller-ID info on top of the stock incoming call screen.

You can use WindowManager.LayoutParams.TYPE_SYSTEM_ALERT to make a view always-on-top so it's above the incoming call screen (like Facebook chatheads). See this: How to create always-top fullscreen overlay activity in Android just be sure to make your view a small popup and not full screen, so the user will be able to answer the call.

marmor
  • 27,641
  • 11
  • 107
  • 150
  • I am glad to see you have stated many of the same things I found while working on this. Based on your statements, is it correct to assume that varying versions/os of android each decide differently whether or not to show groups even if they are marked as not visible? – Zach S. Oct 27 '17 at 18:28
  • it's not tied to an Android version, it's up to the Contacts app itself, either the one that shipped with the device, or a contacts app the user downloaded from Google Play. Some will hide those contacts by default, some will show them by default, but all allow the user to hide/show such groups manually in settings. so there's no way to hide contacts in a way they will never be seen. – marmor Oct 27 '17 at 20:24