Android Question Looking for a program, or help writing it. Below possible?

lhatch

Member
Licensed User
Hope this is considered a question.

I use my personal phone for work and only want to receive calls from numbers in my phone "contacts" to ring me otherwise transfer to voicemail.

I would like to get help writing this (I write code but not a B2* wiz).

Intercept incoming call
if NOT in the local phone contacts THEN
send to voicemail
else
pass through to default phone app
end if

Is that doable with the android OS changes, permissions, etc. I have a Samsung S22. Next might be Pixel 9a or S25.
 

drgottjr

Expert
Licensed User
Longtime User
technically, this is still possible. but there are too many things that can go wrong. you - or anyone who agrees to help you - should be prepared for a lot of work.
in any case, android already allows calls to be routed to voicemail; you don't need a bespoke app. you set up a kind of "whitelist" in the device's do not disturb
settings which allows certain calls to go through as normal. people not in the list are sent to voicemail. android doesn't want you handling phone calls.
 
Upvote 0

lhatch

Member
Licensed User
I figured with all the Android OS changes it would be a pain, but an app for one person/OS might be doable. It was under notifications and had contacts only. Thanks for the tip. Guess I will get back on something I wrote in B4A years ago and have some fun now.
 
Last edited:
Upvote 0

Alex_197

Well-Known Member
Licensed User
Longtime User
Hope this is considered a question.

I use my personal phone for work and only want to receive calls from numbers in my phone "contacts" to ring me otherwise transfer to voicemail.

I would like to get help writing this (I write code but not a B2* wiz).

Intercept incoming call
if NOT in the local phone contacts THEN
send to voicemail
else
pass through to default phone app
end if

Is that doable with the android OS changes, permissions, etc. I have a Samsung S22. Next might be Pixel 9a or S25.
check this
 

Attachments

  • AnswerCall.zip
    8.2 KB · Views: 43
Upvote 0

emexes

Expert
Licensed User
Longtime User
you set up a kind of "whitelist" in the device's do not disturb settings

possibly don't even need to do that, just select from:

1752992817591.png
 
Upvote 0

lhatch

Member
Licensed User
I went into settings, notifications I believe and found mine. It had messages, what apps can run, etc. Will see if I have a calls like you have. But the junk/spam is always a call or text, and rare a whats app.
 
Upvote 0
Top