Is there an official, data-protected way to show caller-id information on the current Phone app, during a phone call?
Asked Answered
M

0

6

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

  1. 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?

  2. 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?

Magnify answered 5/3, 2020 at 15:47 Comment(7)
Have you found a solution for the issue with the Samsung phones? I'm facing the same problem.Londrina
@BWappsandmore No. But you can always use the new API of Android, to replace the Phone app completely, or an API for callerID apps ( CallScreeningService )Magnify
Thank you so much for your reply, which new API of Android do you mean?Londrina
@BWappsandmore There is a new API to replace the Phone app, but it has a huge amount of work if indeed you plan to implement the UI of during phone calls. Example: github.com/arekolek/simple-phoneMagnify
@android developer I faced the same problem.Do you have a solution for Samsung devices?Lw
@EnesBAŞKAYA No. I have no idea what you can do.Magnify
@android developer Thank you for your quick response. I wish you good workLw

© 2022 - 2024 — McMap. All rights reserved.