Android Question How to check the "android.permission.ANSWER_PHONE_CALLS" on B4A 8.0?

DonManfred

Expert
Licensed User
Longtime User
Did you tried to request this permission with runtimepermissionslib? Did you get any error?
The - dangerous - Permission is: "android.permission.ANSWER_PHONE_CALLS"

I dont think that you can answer a phone call from B4A without userintervention.
I mean; i dont think that Android allows your app to answer a Call.
I may be wrong
 
Last edited:
Upvote 0

palmzac

Active Member
Licensed User
Longtime User
Hi DonManfred,

The problem is that I want to upgrade my existing project to SDK 26. One of function is allow user to block incoming call by Tel No. On SDK 26, the endcall() need android.permission.ANSWER_PHONE_CALLS. Would you help me ? Thanks !

https://developer.android.com/reference/android/telecom/TelecomManager#endCall()

 
Upvote 0

palmzac

Active Member
Licensed User
Longtime User
Hi DonManfred,

I want to grant 'ANSWER_PHONE_CALLS' permission. Is it possible ?

like this:
B4X:
    If rp.Check(rp.PERMISSION_ANSWER_PHONE_CALLS) = False Then
        Log("No GRANT !!!!")
        rp.CheckAndRequest(rp.PERMISSION_ANSWER_PHONE_CALLS)
        Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
        
        If rp.Check(rp.PERMISSION_ANSWER_PHONE_CALLS) = False Then
            Activity.Finish
        End If
        
    End If

 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…