9
टुकड़े में अनुमति की जांच कैसे करें
मैं एक टुकड़े के अंदर एक अनुमति की जांच करना चाहता हूं। मेरा कोड: // Here, thisActivity is the current activity if (ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) { // Should we show an explanation? if (ActivityCompat.shouldShowRequestPermissionRationale(getActivity(), android.Manifest.permission.ACCESS_FINE_LOCATION)) { // Show an explanation to the user *asynchronously* -- don't block // this …