Android Question Phone calls by the minute

Hello. I want to have a service in b4a, a service where the user can choose the time of the conversation with the phone and when that time is over, the phone call will be automatically cut off by b4a. Do you have a solution, sample source or...?
 

Star-Dust

Expert
Licensed User
Longtime User
Maybe you could do that with Accessibility
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Explaining accessibility services is very complicated.
So I'll limit myself to a small example that definitely works up to Android 12. I don't guarantee for later versions.

To be usable I recommend using a method as long as the service is not interrupted and continues to work even during the call, like this method.
 

Attachments

  • KilCall.zip
    9.8 KB · Views: 12
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
it is possible to be informed when there is an
ongoing call. it is also possible to end a call
programmatically. in theory, you need a
receiver for the first and a simple method
executed in the telecommanager class, probably
with a javaobject. that's the theory. google's
documentation refers to these possibilities.

it's not clear from the documentation whether or not
your app must make the call. in other words, whether
your app can cause a call made by the default calling
app to end. sounds like a privacy issue to me, but the
documentation that i've read doesn't mention it.

if your app must make the call for this towork, then that's
a very big deal and to all intents and purposes, it may be
difficult to implement your idea as you app would have to
become the default calling app (which is not going to happen).
also, what you might manage to do now might be illegal in the
future as google applies more and more restrictions.
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
it is possible to be informed when there is an
ongoing call. it is also possible to end a call
programmatically. in theory, you need a
receiver for the first and a simple method
executed in the telecommanager class, probably
with a javaobject. that's the theory. google's
documentation refers to these possibilities.

it's not clear from the documentation whether or not
your app must make the call. in other words, whether
your app can cause a call made by the default calling
app to end. sounds like a privacy issue to me, but the
documentation that i've read doesn't mention it.

if your app must make the call for this towork, then that's
a very big deal and to all intents and purposes, it may be
difficult to implement your idea as you app would have to
become the default calling app (which is not going to happen).
also, what you might manage to do now might be illegal in the
future as google applies more and more restrictions.
My App only takes care of closing the call when the time runs out. I didn't understand that he wanted to make scheduled calls at a time, but if so that is also something that can be achieved.
 
Upvote 0
Top