I am using the Android Class CallScreeningService onScreenCall(Call.Details calldetails) to get all incoming calls and everything works fine! From now I have an error, that on Android 10 devices the function calldetails.getExras() and calldetails.getIntentExtras() always returns NULL, instead of a Bundle, where I can read some further information. On Android 9 devices and older everything works fine.
Someone has a similar issue? Here is the Source Code and some Declarations:
public class IncomingCallService extends CallScreeningService {
@Override
public void onScreenCall(Call.Details callDetails) {
if (callDetails.getExtras() != null) {
Log.d(LOG_TAG, "Everything works on Android 9 or older");
}else{
Log.d(LOG_TAG, "Its Null on Android 10!");
}
if (callDetails.getIntentExtras() != null) {
Log.d(LOG_TAG, "Everything works on Android 9 or older");
}else{
Log.d(LOG_TAG, "Its Null on Android 10!");
}
}
And Manifest.xml:
<service android:name=".call_handler.IncomingCallService"
android:permission="android.permission.BIND_SCREENING_SERVICE">
<intent-filter>
<action android:name="android.telecom.CallScreeningService"/>
</intent-filter>
</service>