I am trying to implement a native module which provides connection service in react native. But I am facing an error. As I am not an android/java developer, I am not being able to find the cause of the following error.
E:\projects\deets-mobile-cp\node_modules\react-native-connection-service\android\src\main\java\com\genm\CallConnection.java:10: error: cannot find symbol
@TargetApi(Build.VERSION_CODES.O_MR1)
^
symbol: variable O_MR1
location: class VERSION_CODES
E:\projects\deets-mobile-cp\node_modules\react-native-connection-service\android\src\main\java\com\genm\CallConnection.java:14: error: cannot find symbol
setConnectionProperties(PROPERTY_SELF_MANAGED);
^
symbol: variable PROPERTY_SELF_MANAGED
location: class CallConnection
CallConnection.java
package com.genm;
import android.annotation.TargetApi;
import android.os.Build;
import android.telecom.Connection;
import android.util.Log;
import static android.content.ContentValues.TAG;
@TargetApi(Build.VERSION_CODES.O_MR1)
public class CallConnection extends Connection{
public CallConnection(){
setConnectionProperties(PROPERTY_SELF_MANAGED);
setAudioModeIsVoip(true);
}
@Override
public void onAnswer(){
Log.d(TAG, "On answer to the call");
}
}