Are you sure that what you need to check is the permission? Permission is a static, declarative thing that is required from user BEFORE the user installs the app. App permissions cannot be changed without updating the app and thus explicit acceptance from the user. So the logic behind permissions is that simple: if your app has
<uses-permission android:name="android.permission.INTERNET" />
in its manifest and the app is running then you can be sure that the user had accepted the app requirements.
In the case you target your app for SDK 23 or higher (Android 6.0 or higher) and your app want a dangerous permission, you will need to request permissions in run-time:
// Assume thisActivity is the current activity
int permissionCheck = ContextCompat.checkSelfPermission(thisActivity,
Manifest.permission.WRITE_CALENDAR);
Anyway in runtime you might be willing to check is the availability of internet access which has nothing to do with the permission.
For that have a look here: How to check internet access on Android:
public boolean isOnline() {
ConnectivityManager cm =
(ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo netInfo = cm.getActiveNetworkInfo();
return netInfo != null && netInfo.isConnectedOrConnecting();
}
Notice that the code is Android specific and cannot be put into a PCL. So you will need a PCL-declared interface and an Android specific implementation.