get Incoming call contact name and phone number using android studio kotlin
I'm trying to construct an app that requires the name and phone number of the incoming call contact.
I did research to find a solution, but all the data I found was in java and there wasn't much in kotlin.
Code found in Java :
public class ServiceReceiver extends BroadcastReceiver {
@Override
public void onReceive(final Context context, Intent intent) {
TelephonyManager telephony = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);...