I know that this has been discussed several times in the past, and up to now it seems like there was no solution. However according to the issue tracker from Google, since Android 8, this was resolved by means of using this code :
if(Build.VERSION.SDK_INT >= 26) {
if(checkSelfPermission("android.permission.ANSWER_PHONE_CALLS") == PackageManager.PERMISSION_GRANTED) {
TelecomManager tm = (TelecomManager) this.getSystemService(Context.TELECOM_SERVICE);
if(tm != null)
tm.acceptRingingCall();
}
}
This is java code, and just before I test it using the javaobject method in b4a, I was wondering if there was a better way to do it in b4a ?
So to be clear, is there someone who could
convert the code to b4a
Thanks !