what should I do with the constants which are causing some problem.?
import static android.net.ConnectivityManager.TYPE_BLUETOOTH;
import static android.net.ConnectivityManager.TYPE_DUMMY;
import static android.net.ConnectivityManager.TYPE_ETHERNET;
import static android.net.ConnectivityManager.TYPE_MOBILE;
import static android.net.ConnectivityManager.TYPE_MOBILE_DUN;

If you are looking for an alternative API in harmonyos, you should check - Netcapabilities class from package
ohos.net.NetCapabilities.It has the following corresponding attributes -