Background
I've found an interesting article and github repository that shows that it's possible to let the Phone app to show caller-id information of people, during a phone call, so I'm wondering if that's the official way to do it, or something else.
This sample shows that in order to provide this data, you need to implement ContentProvider.
The problem
It seems to me almost like a hack, and seeing that it works on some (most?) devices, but not on Samsung devices.
It could be just that Samsung's own app doesn't use this data for some reason.
But there is another problem: If I make an app that serves another app to show caller-id data, it would be better to do it only for the currently default phone app, during a phone call.
I wouldn't want just any app to reach this data and fetch it all. Sadly, I don't see any way to use ContentProvider that will allow queries only for the current phone app. I could perhaps check if currently the device is during a phone call, but that's not much of a data protection...
What I've tried
Thing is, there is practically no information about this rare case over the Internet, no questions whatsoever. OK, there is this one, but it points to the same solution...
I searched a lot to even reach this article and repository.
The questions
Is this really the official way to provide data for the Phone app? If not, how should I do it? Would it work for all devices, including Samsung?
For data-protection, is there a way for ContentProvider to allow queering data only for specific apps, during runtime ? Meaning that for each query, I could check which app requests the query?