Reputation: 130
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?
Upvotes: 0
Views: 804
Reputation: 28229
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:
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.
Upvotes: 1