Issue Types

## Overview

| Correctness
1 | warning ScopedStorage: Affected by scoped storage
3 | warning DefaultLocale: Implied default locale in case conversion
14 | warning InlinedApi: Using inlined constants on older versions
17 | error NewApi: Calling new methods on older versions
1 | warning UnusedAttribute: Attribute unused on older versions
5 | error WrongConstant: Incorrect constant
1 | warning QueryPermissionsNeeded: Using APIs affected by query permissions
4 | warning GradleDependency: Obsolete Gradle Dependency
1 | warning SourceLockedOrientationActivity: Incompatible setRequestedOrientation value
1 | warning UnsupportedChromeOsCameraSystemFeature: Looking for Rear Camera only feature
| Performance
4 | warning WakelockTimeout: Using wakeLock without timeout
5 | warning StaticFieldLeak: Static Field Leaks
| Disabled Checks (38)

## Affected by scoped storage

../../src/main/AndroidManifest.xml:12: WRITE_EXTERNAL_STORAGE no longer provides write access when targeting Android 10+

      9   <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
     10   <uses-permission android:name="android.permission.WAKE_LOCK"/>
     11   <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
     12   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     13   <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
     14   <uses-permission android:name="android.permission.MICROPHONE" />
     15   <application>

Scoped storage is enforced on Android 10+ (or Android 11+ if using `requestLegacyExternalStorage`). In particular, `WRITE_EXTERNAL_STORAGE` will no longer provide write access to all files; it will provide the equivalent of `READ_EXTERNAL_STORAGE` instead.
The `MANAGE_EXTERNAL_STORAGE` permission can be used to manage all files, but it is rarely necessary and most apps on Google Play are not allowed to use it. Most apps should instead migrate to use scoped storage. To modify or delete files, apps should request write access from the user as described at https://developer.android.com/reference/android/provider/MediaStore#createWriteRequest.
More info: https://developer.android.com/preview/privacy/storage#scoped-storage
To suppress this error, use the issue id "ScopedStorage" as explained in the Suppressing Warnings and Errors section.
ScopedStorage Correctness Warning Priority 8/10

## Implied default locale in case conversion

../../src/main/java/com/dyteMobileSdk/FileViewer/RNFileViewerModule.java:72: Implicitly using the default locale is a common source of bugs: Use `toLowerCase(Locale)` instead. For strings meant to be internal use `Locale.ROOT`, otherwise `Locale.getDefault()`.

      69             return;
      70         }
      71
      72         String extension = MimeTypeMap.getFileExtensionFromUrl(path).toLowerCase();
      73         String mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
      74
      75         Intent shareIntent = new Intent();

../../src/main/java/com/dyteMobileSdk/ImagePicker/ReactNativeImagePickerOptions.java:24: Implicitly using the default locale is a common source of bugs: Use `toLowerCase(Locale)` instead. For strings meant to be internal use `Locale.ROOT`, otherwise `Locale.getDefault()`.

     21   includeBase64 = options.getBoolean("includeBase64");
     22
     23   String videoQualityString = options.getString("videoQuality");
     24   if(!TextUtils.isEmpty(videoQualityString) && !videoQualityString.toLowerCase().equals("high")) {
     25       videoQuality = 0;
     26   }

../../src/main/java/com/dyteMobileSdk/FS/Uploader.java:214: Implicitly using the default locale is a common source of bugs: Use `toLowerCase(Locale)` instead. For strings meant to be internal use `Locale.ROOT`, otherwise `Locale.getDefault()`.

     211   String type = null;
     212   String extension = MimeTypeMap.getFileExtensionFromUrl(path);
     213   if (extension != null) {
     214       type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension.toLowerCase());
     215   }
     216   if (type == null) {
     217       type = "*/*";

Calling `String#toLowerCase()` or `#toUpperCase()` without specifying an explicit locale is a common source of bugs. The reason for that is that those methods will use the current locale on the user's device, and even though the code appears to work correctly when you are developing the app, it will fail in some locales. For example, in the Turkish locale, the uppercase replacement for `i` is not `I`.
If you want the methods to just perform ASCII replacement, for example to convert an enum name, call `String#toUpperCase(Locale.US)` instead. If you really want to use the current locale, call `String#toUpperCase(Locale.getDefault())` instead.
More info: https://developer.android.com/reference/java/util/Locale.html#default_locale
To suppress this error, use the issue id "DefaultLocale" as explained in the Suppressing Warnings and Errors section.
DefaultLocale Correctness Warning Priority 6/10

## Using inlined constants on older versions

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:79: Field requires API level 21 (current min is 16): `android.media.AudioManager#ACTION_HEADSET_PLUG`

       76   private boolean automatic = true;
       77   private boolean isProximityRegistered = false;
       78   private boolean proximityIsNear = false;
       79   private static final String ACTION_HEADSET_PLUG = (android.os.Build.VERSION.SDK_INT >= 21) ? AudioManager.ACTION_HEADSET_PLUG : Intent.ACTION_HEADSET_PLUG;
       80   private BroadcastReceiver wiredHeadsetReceiver;
       81   private BroadcastReceiver noisyAudioReceiver;
       82   private BroadcastReceiver mediaButtonReceiver;

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:641: Field requires API level 21 (current min is 16): `android.media.AudioAttributes#USAGE_VOICE_COMMUNICATION`

      638
      639         if (mAudioAttributes == null) {
      640             mAudioAttributes = new AudioAttributes.Builder()
      641                     .setUsage(AudioAttributes.USAGE_VOICE_COMMUNICATION)
      642                     .setContentType(AudioAttributes.CONTENT_TYPE_SPEECH)
      643                     .build();
      644         }

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:642: Field requires API level 21 (current min is 16): `android.media.AudioAttributes#CONTENT_TYPE_SPEECH`

      639         if (mAudioAttributes == null) {
      640             mAudioAttributes = new AudioAttributes.Builder()
      641                     .setUsage(AudioAttributes.USAGE_VOICE_COMMUNICATION)
      642                     .setContentType(AudioAttributes.CONTENT_TYPE_SPEECH)
      643                     .build();
      644         }

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:959: Field requires API level 21 (current min is 16): `android.media.AudioAttributes#USAGE_VOICE_COMMUNICATION`

      956     //data.put("audioStream", AudioManager.STREAM_VOICE_CALL); // --- lagacy
      957     // --- The ringback doesn't have to be a DTMF.
      958     // --- Should use VOICE_COMMUNICATION for sound during call or it may be silenced.
      959     data.put("audioUsage", AudioAttributes.USAGE_VOICE_COMMUNICATION);
      960     data.put("audioContentType", AudioAttributes.CONTENT_TYPE_MUSIC);
      961
      962     setMediaPlayerEvents((MediaPlayer)mRingback, "mRingback");

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:960: Field requires API level 21 (current min is 16): `android.media.AudioAttributes#CONTENT_TYPE_MUSIC`

      957     // --- The ringback doesn't have to be a DTMF.
      958     // --- Should use VOICE_COMMUNICATION for sound during call or it may be silenced.
      959     data.put("audioUsage", AudioAttributes.USAGE_VOICE_COMMUNICATION);
      960     data.put("audioContentType", AudioAttributes.CONTENT_TYPE_MUSIC);
      961
      962     setMediaPlayerEvents((MediaPlayer)mRingback, "mRingback");

+ 9 More Occurrences...
../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:1026: Field requires API level 21 (current min is 16): `android.media.AudioAttributes#USAGE_VOICE_COMMUNICATION`

     1023   data.put("setLooping", false);
     1024   //data.put("audioStream", AudioManager.STREAM_VOICE_CALL); // --- lagacy
     1025   // --- Should use VOICE_COMMUNICATION for sound during a call or it may be silenced.
     1026   data.put("audioUsage", AudioAttributes.USAGE_VOICE_COMMUNICATION);
     1027   data.put("audioContentType", AudioAttributes.CONTENT_TYPE_SONIFICATION); // --- CONTENT_TYPE_MUSIC?
     1028
     1029   setMediaPlayerEvents((MediaPlayer)mBusytone, "mBusytone");

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:1027: Field requires API level 21 (current min is 16): `android.media.AudioAttributes#CONTENT_TYPE_SONIFICATION`

     1024   //data.put("audioStream", AudioManager.STREAM_VOICE_CALL); // --- lagacy
     1025   // --- Should use VOICE_COMMUNICATION for sound during a call or it may be silenced.
     1026   data.put("audioUsage", AudioAttributes.USAGE_VOICE_COMMUNICATION);
     1027   data.put("audioContentType", AudioAttributes.CONTENT_TYPE_SONIFICATION); // --- CONTENT_TYPE_MUSIC?
     1028
     1029   setMediaPlayerEvents((MediaPlayer)mBusytone, "mBusytone");
     1030   mBusytone.startPlay(data);

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:1096: Field requires API level 21 (current min is 16): `android.media.AudioAttributes#USAGE_NOTIFICATION_RINGTONE`

     1093   data.put("setLooping", true);
     1094
     1095   //data.put("audioStream", AudioManager.STREAM_RING); // --- lagacy
     1096   data.put("audioUsage", AudioAttributes.USAGE_NOTIFICATION_RINGTONE); // --- USAGE_NOTIFICATION_COMMUNICATION_REQUEST?
     1097   data.put("audioContentType", AudioAttributes.CONTENT_TYPE_MUSIC);
     1098
     1099   setMediaPlayerEvents((MediaPlayer) mRingtone, "mRingtone");

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:1097: Field requires API level 21 (current min is 16): `android.media.AudioAttributes#CONTENT_TYPE_MUSIC`

     1094
     1095   //data.put("audioStream", AudioManager.STREAM_RING); // --- lagacy
     1096   data.put("audioUsage", AudioAttributes.USAGE_NOTIFICATION_RINGTONE); // --- USAGE_NOTIFICATION_COMMUNICATION_REQUEST?
     1097   data.put("audioContentType", AudioAttributes.CONTENT_TYPE_MUSIC);
     1098
     1099   setMediaPlayerEvents((MediaPlayer) mRingtone, "mRingtone");

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallProximityManager.java:147: Field requires API level 21 (current min is 16): `android.os.PowerManager#RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY`

     144   synchronized (mProximityLock) {
     145       if (mProximityLock.isHeld()) {
     146           try {
     147               int flags = waitForNoProximity ? PowerManager.RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY : 0;
     148               mPowerManagerRelease.invoke(mProximityLock, flags);
     149               Log.d(TAG, "releaseProximityWakeLock()");
     150           } catch (Exception e) {

../../src/main/java/com/dyteMobileSdk/DocumentPicker/RNDocumentPickerModule.java:144: Field requires API level 19 (current min is 16): `android.content.Intent#EXTRA_MIME_TYPES`

     141                 ReadableArray types = args.getArray(OPTION_TYPE);
     142                 if (types != null && types.size() > 1) {
     143                     String[] mimeTypes = readableArrayToStringArray(types);
     144                     intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes);
     145                 } else if (types.size() == 1) {
     146                     intent.setType(types.getString(0));
     147                 }

../../src/main/java/com/dyteMobileSdk/DocumentPicker/RNDocumentPickerModule.java:151: Field requires API level 18 (current min is 16): `android.content.Intent#EXTRA_ALLOW_MULTIPLE`

     148       }
     149
     150       boolean multiple = !args.isNull(OPTION_MULIPLE) && args.getBoolean(OPTION_MULIPLE);
     151       intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, multiple);
     152
     153       currentActivity.startActivityForResult(Intent.createChooser(intent, null), READ_REQUEST_CODE, Bundle.EMPTY);
     154   } catch (ActivityNotFoundException e) {

../../src/main/java/com/dyteMobileSdk/DocumentPicker/RNDocumentPickerModule.java:243: Field requires API level 19 (current min is 16): `android.provider.DocumentsContract.Document#COLUMN_MIME_TYPE`

     240       String fileName = cursor.getString(displayNameIndex);
     241       map.putString(FIELD_NAME, fileName);
     242   }
     243   int mimeIndex = cursor.getColumnIndex(DocumentsContract.Document.COLUMN_MIME_TYPE);
     244   if (!cursor.isNull(mimeIndex)) {
     245       map.putString(FIELD_TYPE, cursor.getString(mimeIndex));
     246   }

../../src/main/java/com/dyteMobileSdk/ImagePicker/ReactNativeImagePickerUtils.java:117: Field requires API level 17 (current min is 16): `android.content.pm.PackageManager#FEATURE_CAMERA_ANY`

     114
     115   public static boolean isCameraAvailable(Context reactContext) {
     116       return reactContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)
     117               || reactContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY);
     118   }
     119
     120   // Opening front camera is not officially supported in android, the below hack is obtained from various online sources

This check scans through all the Android API field references in the application and flags certain constants, such as static final integers and Strings, which were introduced in later versions. These will actually be copied into the class files rather than being referenced, which means that the value is available even when running on older devices. In some cases that's fine, and in other cases it can result in a runtime crash or incorrect behavior. It depends on the context, so consider the code carefully and decide whether it's safe and can be suppressed or whether the code needs to be guarded.
If you really want to use this API and don't need to support older devices just set the `minSdkVersion` in your `build.gradle` or `AndroidManifest.xml` files.
If your code is deliberately accessing newer APIs, and you have ensured (e.g. with conditional execution) that this code will only ever be called on a supported platform, then you can annotate your class or method with the `@TargetApi` annotation specifying the local minimum SDK to apply, such as `@TargetApi(11)`, such that this check considers 11 rather than your manifest file's minimum SDK as the required API level.
Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.
To suppress this error, use the issue id "InlinedApi" as explained in the Suppressing Warnings and Errors section.
InlinedApi Correctness Warning Priority 6/10

## Calling new methods on older versions

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:640: Call requires API level 21 (current min is 16): `new android.media.AudioAttributes.Builder`

      637         }
      638
      639         if (mAudioAttributes == null) {
      640             mAudioAttributes = new AudioAttributes.Builder()
      641                     .setUsage(AudioAttributes.USAGE_VOICE_COMMUNICATION)
      642                     .setContentType(AudioAttributes.CONTENT_TYPE_SPEECH)
      643                     .build();

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:641: Call requires API level 21 (current min is 16): `android.media.AudioAttributes.Builder#setUsage`

      638
      639         if (mAudioAttributes == null) {
      640             mAudioAttributes = new AudioAttributes.Builder()
      641                     .setUsage(AudioAttributes.USAGE_VOICE_COMMUNICATION)
      642                     .setContentType(AudioAttributes.CONTENT_TYPE_SPEECH)
      643                     .build();
      644         }

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:642: Call requires API level 21 (current min is 16): `android.media.AudioAttributes.Builder#setContentType`

      639         if (mAudioAttributes == null) {
      640             mAudioAttributes = new AudioAttributes.Builder()
      641                     .setUsage(AudioAttributes.USAGE_VOICE_COMMUNICATION)
      642                     .setContentType(AudioAttributes.CONTENT_TYPE_SPEECH)
      643                     .build();
      644         }

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:643: Call requires API level 21 (current min is 16): `android.media.AudioAttributes.Builder#build`

      640             mAudioAttributes = new AudioAttributes.Builder()
      641                     .setUsage(AudioAttributes.USAGE_VOICE_COMMUNICATION)
      642                     .setContentType(AudioAttributes.CONTENT_TYPE_SPEECH)
      643                     .build();
      644         }
      645
      646         if (mAudioFocusRequest == null) {

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:647: Call requires API level 26 (current min is 16): `new android.media.AudioFocusRequest.Builder`

      644   }
      645
      646   if (mAudioFocusRequest == null) {
      647       mAudioFocusRequest = new AudioFocusRequest.Builder(AudioManager.AUDIOFOCUS_GAIN_TRANSIENT)
      648               .setAudioAttributes(mAudioAttributes)
      649               .setAcceptsDelayedFocusGain(false)
      650               .setWillPauseWhenDucked(false)

+ 12 More Occurrences...
../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:648: Call requires API level 26 (current min is 16): `android.media.AudioFocusRequest.Builder#setAudioAttributes`

      645
      646   if (mAudioFocusRequest == null) {
      647       mAudioFocusRequest = new AudioFocusRequest.Builder(AudioManager.AUDIOFOCUS_GAIN_TRANSIENT)
      648               .setAudioAttributes(mAudioAttributes)
      649               .setAcceptsDelayedFocusGain(false)
      650               .setWillPauseWhenDucked(false)
      651               .setOnAudioFocusChangeListener(this)

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:649: Call requires API level 26 (current min is 16): `android.media.AudioFocusRequest.Builder#setAcceptsDelayedFocusGain`

      646   if (mAudioFocusRequest == null) {
      647       mAudioFocusRequest = new AudioFocusRequest.Builder(AudioManager.AUDIOFOCUS_GAIN_TRANSIENT)
      648               .setAudioAttributes(mAudioAttributes)
      649               .setAcceptsDelayedFocusGain(false)
      650               .setWillPauseWhenDucked(false)
      651               .setOnAudioFocusChangeListener(this)
      652               .build();

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:650: Call requires API level 26 (current min is 16): `android.media.AudioFocusRequest.Builder#setWillPauseWhenDucked`

      647       mAudioFocusRequest = new AudioFocusRequest.Builder(AudioManager.AUDIOFOCUS_GAIN_TRANSIENT)
      648               .setAudioAttributes(mAudioAttributes)
      649               .setAcceptsDelayedFocusGain(false)
      650               .setWillPauseWhenDucked(false)
      651               .setOnAudioFocusChangeListener(this)
      652               .build();
      653   }

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:651: Call requires API level 26 (current min is 16): `android.media.AudioFocusRequest.Builder#setOnAudioFocusChangeListener`

      648                     .setAudioAttributes(mAudioAttributes)
      649                     .setAcceptsDelayedFocusGain(false)
      650                     .setWillPauseWhenDucked(false)
      651                     .setOnAudioFocusChangeListener(this)
      652                     .build();
      653         }

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:652: Call requires API level 26 (current min is 16): `android.media.AudioFocusRequest.Builder#build`

      649                     .setAcceptsDelayedFocusGain(false)
      650                     .setWillPauseWhenDucked(false)
      651                     .setOnAudioFocusChangeListener(this)
      652                     .build();
      653         }
      654
      655         int requestAudioFocusRes = audioManager.requestAudioFocus(mAudioFocusRequest);

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:655: Call requires API level 26 (current min is 16): `android.media.AudioManager#requestAudioFocus`

      652                     .build();
      653         }
      654
      655         int requestAudioFocusRes = audioManager.requestAudioFocus(mAudioFocusRequest);
      656
      657         String requestAudioFocusResStr;
      658         switch (requestAudioFocusRes) {

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:719: Call requires API level 26 (current min is 16): `android.media.AudioManager#abandonAudioFocusRequest`

      716          return "";
      717      }
      718
      719      int abandonAudioFocusRes = audioManager.abandonAudioFocusRequest(mAudioFocusRequest);
      720      String abandonAudioFocusResStr;
      721      switch (abandonAudioFocusRes) {
      722          case AudioManager.AUDIOFOCUS_REQUEST_FAILED:

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:1501: Call requires API level 21 (current min is 16): `android.media.MediaPlayer#setAudioAttributes`

     1498
     1499   // --- the `minSdkVersion` is 21 since RN 64,
     1500   // --- if you want to suuport api < 21, comment out `setAudioAttributes` and use `setAudioStreamType((Integer) data.get("audioStream"))` instead
     1501   setAudioAttributes(
     1502       new AudioAttributes.Builder()
     1503           .setUsage((Integer) data.get("audioUsage"))
     1504           .setContentType((Integer) data.get("audioContentType"))

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:1502: Call requires API level 21 (current min is 16): `new android.media.AudioAttributes.Builder`

     1499   // --- the `minSdkVersion` is 21 since RN 64,
     1500   // --- if you want to suuport api < 21, comment out `setAudioAttributes` and use `setAudioStreamType((Integer) data.get("audioStream"))` instead
     1501   setAudioAttributes(
     1502       new AudioAttributes.Builder()
     1503           .setUsage((Integer) data.get("audioUsage"))
     1504           .setContentType((Integer) data.get("audioContentType"))
     1505           .build()

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:1503: Call requires API level 21 (current min is 16): `android.media.AudioAttributes.Builder#setUsage`

     1500   // --- if you want to suuport api < 21, comment out `setAudioAttributes` and use `setAudioStreamType((Integer) data.get("audioStream"))` instead
     1501   setAudioAttributes(
     1502       new AudioAttributes.Builder()
     1503           .setUsage((Integer) data.get("audioUsage"))
     1504           .setContentType((Integer) data.get("audioContentType"))
     1505           .build()
     1506   );

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:1504: Call requires API level 21 (current min is 16): `android.media.AudioAttributes.Builder#setContentType`

     1501                 setAudioAttributes(
     1502                     new AudioAttributes.Builder()
     1503                         .setUsage((Integer) data.get("audioUsage"))
     1504                         .setContentType((Integer) data.get("audioContentType"))
     1505                         .build()
     1506                 );

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:1505: Call requires API level 21 (current min is 16): `android.media.AudioAttributes.Builder#build`

     1502                     new AudioAttributes.Builder()
     1503                         .setUsage((Integer) data.get("audioUsage"))
     1504                         .setContentType((Integer) data.get("audioContentType"))
     1505                         .build()
     1506                 );
     1507
     1508                 // -- will start at onPrepared() event

This check scans through all the Android API calls in the application and warns about any calls that are not available on all versions targeted by this application (according to its minimum SDK attribute in the manifest).
If you really want to use this API and don't need to support older devices just set the `minSdkVersion` in your `build.gradle` or `AndroidManifest.xml` files.
If your code is deliberately accessing newer APIs, and you have ensured (e.g. with conditional execution) that this code will only ever be called on a supported platform, then you can annotate your class or method with the `@TargetApi` annotation specifying the local minimum SDK to apply, such as `@TargetApi(11)`, such that this check considers 11 rather than your manifest file's minimum SDK as the required API level.
If you are deliberately setting `android:` attributes in style definitions, make sure you place this in a `values-v` NN folder in order to avoid running into runtime conflicts on certain devices where manufacturers have added custom attributes whose ids conflict with the new ones on later platforms.
Similarly, you can use tools:targetApi="11" in an XML file to indicate that the element will only be inflated in an adequate context.
Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.
To suppress this error, use the issue id "NewApi" as explained in the Suppressing Warnings and Errors section.
NewApi Correctness Error Priority 6/10

## Attribute unused on older versions

../../src/main/AndroidManifest.xml:24: Attribute `usesCleartextTraffic` is only used in API level 23 and higher (current min is 16)

     21               <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_viewer_provider_paths" />
     22         </provider>
     23   </application>
     24       <application android:usesCleartextTraffic="true" >
     25         <provider
     26             android:name="com.logrocket.core.ApplicationInitProvider"
     27             android:authorities="${applicationId}.logrocket-init"

This check finds attributes set in XML files that were introduced in a version newer than the oldest version targeted by your application (with the `minSdkVersion` attribute).
This is not an error; the application will simply ignore the attribute. However, if the attribute is important to the appearance or functionality of your application, you should consider finding an alternative way to achieve the same result with only available attributes, and then you can optionally create a copy of the layout in a layout-vNN folder which will be used on API NN or higher where you can take advantage of the newer attribute.
Note: This check does not only apply to attributes. For example, some tags can be unused too, such as the new `<tag>` element in layouts introduced in API 21.
Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.
To suppress this error, use the issue id "UnusedAttribute" as explained in the Suppressing Warnings and Errors section.
UnusedAttribute Correctness Warning Priority 6/10

## Incorrect constant

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:230: Must be one of: AudioManager.MODE_NORMAL, AudioManager.MODE_RINGTONE, AudioManager.MODE_IN_CALL, AudioManager.MODE_IN_COMMUNICATION, AudioManager.MODE_CALL_SCREENING, android.media.AudioManager.MODE_CALL_REDIRECT, android.media.AudioManager.MODE_COMMUNICATION_REDIRECT

      227     private void storeOriginalAudioSetup() {
      228         Log.d(TAG, "storeOriginalAudioSetup()");
      229         if (!isOrigAudioSetupStored) {
      230             origAudioMode = audioManager.getMode();
      231             origIsSpeakerPhoneOn = audioManager.isSpeakerphoneOn();
      232             origIsMicrophoneMute = audioManager.isMicrophoneMute();
      233             isOrigAudioSetupStored = true;

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:244: Must be one of: AudioManager.MODE_NORMAL, AudioManager.MODE_RINGTONE, AudioManager.MODE_IN_CALL, AudioManager.MODE_IN_COMMUNICATION, AudioManager.MODE_CALL_SCREENING, android.media.AudioManager.MODE_CALL_REDIRECT, android.media.AudioManager.MODE_COMMUNICATION_REDIRECT

      241   if (isOrigAudioSetupStored) {
      242       setSpeakerphoneOn(origIsSpeakerPhoneOn);
      243       setMicrophoneMute(origIsMicrophoneMute);
      244       audioManager.setMode(origAudioMode);
      245       if (getCurrentActivity() != null) {
      246           getCurrentActivity().setVolumeControlStream(AudioManager.USE_DEFAULT_STREAM_TYPE);
      247       }

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:811: Must be one or more of: AudioManager.GET_DEVICES_INPUTS, AudioManager.GET_DEVICES_OUTPUTS

      808   if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
      809       return audioManager.isWiredHeadsetOn();
      810   } else {
      811       final AudioDeviceInfo[] devices = audioManager.getDevices(AudioManager.GET_DEVICES_ALL);
      812       for (AudioDeviceInfo device : devices) {
      813           final int type = device.getType();
      814           if (type == AudioDeviceInfo.TYPE_WIRED_HEADSET) {

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallManagerModule.java:1735: Must be one or more of: AudioManager.GET_DEVICES_INPUTS, AudioManager.GET_DEVICES_OUTPUTS

     1732   if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
     1733       return audioManager.isWiredHeadsetOn();
     1734   } else {
     1735       final AudioDeviceInfo[] devices = audioManager.getDevices(AudioManager.GET_DEVICES_ALL);
     1736       for (AudioDeviceInfo device : devices) {
     1737           final int type = device.getType();
     1738           if (type == AudioDeviceInfo.TYPE_WIRED_HEADSET) {

../../src/main/java/com/dyteMobileSdk/BluetoothHeadsetDetect/RNBluetoothHeadsetDetectModule.java:93: Must be one of: BluetoothAdapter.STATE_DISCONNECTED, BluetoothAdapter.STATE_CONNECTING, BluetoothAdapter.STATE_CONNECTED, BluetoothAdapter.STATE_DISCONNECTING

      90   public static boolean isBluetoothHeadsetConnected() {
      91       BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
      92       return mBluetoothAdapter != null && mBluetoothAdapter.isEnabled()
      93               && mBluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET) == BluetoothProfile.STATE_CONNECTED;
      94   }
      95
      96   @RequiresApi(api = Build.VERSION_CODES.M)

Ensures that when parameter in a method only allows a specific set of constants, calls obey those rules.
To suppress this error, use the issue id "WrongConstant" as explained in the Suppressing Warnings and Errors section.
WrongConstant Correctness Error Priority 6/10

## Using APIs affected by query permissions

../../src/main/java/com/dyteMobileSdk/FileViewer/RNFileViewerModule.java:92: Consider adding a `<queries>` declaration to your manifest when calling this method; see https://g.co/dev/packagevisibility for details

      89   final Activity currActivty = getCurrentActivity();
      90   if(currActivty!=null) {
      91       PackageManager pm = currActivty.getPackageManager();
      92       if (shareIntent.resolveActivity(pm) != null) {
      93           try {
      94               getCurrentActivity().startActivityForResult(intentActivity, currentId + RN_FILE_VIEWER_REQUEST);
      95               sendEvent(OPEN_EVENT, currentId, null);

Apps that target Android 11 cannot query or interact with other installed apps by default. If you need to query or interact with other installed apps, you may need to add a `<queries>` declaration in your manifest.
As a corollary, the methods `PackageManager#getInstalledPackages` and `PackageManager#getInstalledApplications` will no longer return information about all installed apps. To query specific apps or types of apps, you can use methods like `PackageManager#getPackageInfo` or `PackageManager#queryIntentActivities`.
More info: https://g.co/dev/packagevisibility
To suppress this error, use the issue id "QueryPermissionsNeeded" as explained in the Suppressing Warnings and Errors section.
QueryPermissionsNeeded Correctness Warning Priority 5/10

## Obsolete Gradle Dependency

../../build.gradle:10: A newer version of com.android.tools.build:gradle than 4.1.3 is available: 7.2.2

      7         }
      8
      9         dependencies {
     10             classpath 'com.android.tools.build:gradle:4.1.3'
     11         }
     12     }
     13 }

../../build.gradle:64: A newer version of androidx.swiperefreshlayout:swiperefreshlayout than 1.0.0 is available: 1.1.0

     61 dependencies {
     62     //noinspection GradleDynamicVersion
     63     implementation "com.facebook.react:react-native:+"  // From node_modules
     64     implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
     65     implementation "androidx.exifinterface:exifinterface:1.3.1"
     66     implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
     67

../../build.gradle:65: A newer version of androidx.exifinterface:exifinterface than 1.3.1 is available: 1.3.3

     62     //noinspection GradleDynamicVersion
     63     implementation "com.facebook.react:react-native:+"  // From node_modules
     64     implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
     65     implementation "androidx.exifinterface:exifinterface:1.3.1"
     66     implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
     67
     68

../../build.gradle:66: A newer version of androidx.localbroadcastmanager:localbroadcastmanager than 1.0.0 is available: 1.1.0

     63     implementation "com.facebook.react:react-native:+"  // From node_modules
     64     implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
     65     implementation "androidx.exifinterface:exifinterface:1.3.1"
     66     implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
     67
     68

This detector looks for usages of libraries where the version you are using is not the current stable release. Using older versions is fine, and there are cases where you deliberately want to stick with an older version. However, you may simply not be aware that a more recent version is available, and that is what this lint check helps find.
Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.
To suppress this error, use the issue id "GradleDependency" as explained in the Suppressing Warnings and Errors section.
GradleDependency Correctness Warning Priority 4/10

## Incompatible setRequestedOrientation value

../../src/main/java/com/dyteMobileSdk/DyteHelperModule.java:171: You should not lock orientation of your activities, so that you can support a good user experience for any device or orientation

     168            @Override
     169            public void run() {
     170                existingOrientation = activity.getRequestedOrientation();
     171                activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
     172            }
     173        });
     174    }

The `Activity` should not be locked to a portrait orientation so that users
can take advantage of the multi-window environments and larger landscape-first screens
that Android runs on such as Chrome OS. To fix the issue, consider calling
`setRequestedOrientation` with the `ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR` or
`ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED` options or removing the call
all together.
To suppress this error, use the issue id "SourceLockedOrientationActivity" as explained in the Suppressing Warnings and Errors section.
SourceLockedOrientationActivity Correctness Warning Priority 4/10

## Looking for Rear Camera only feature

../../src/main/java/com/dyteMobileSdk/ImagePicker/ReactNativeImagePickerUtils.java:116: You should look for any camera available on the device, not just the rear

     113   }
     114
     115   public static boolean isCameraAvailable(Context reactContext) {
     116       return reactContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)
     117               || reactContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY);
     118   }

You should look for the `FEATURE_CAMERA_ANY` features to include all
possible cameras that may be on the device. Looking for `FEATURE_CAMERA`
only looks for a rear facing camera, which certain tablets or Chrome OS
devices don't have, as well as newer device configurations and modes may place the
device in a state where the rear camera is not available. To fix the issue,
look for `FEATURE_CAMERA_ANY` instead.
To suppress this error, use the issue id "UnsupportedChromeOsCameraSystemFeature" as explained in the Suppressing Warnings and Errors section.
UnsupportedChromeOsCameraSystemFeature Correctness Warning Priority 4/10

## Using wakeLock without timeout

../../src/main/java/com/dyteMobileSdk/DyteHelperModule.java:200: Provide a timeout when requesting a wakelock with `PowerManager.Wakelock.acquire(long timeout)`. This will ensure the OS will cleanup any wakelocks that last longer than you intend, and will save your user's battery.

     197     @ReactMethod
     198     public void backgroundTimerStart(final int delay) {
     199         if (!wakeLock.isHeld())
     200             wakeLock.acquire();
     201
     202         handler = new Handler();
     203         runnable = new Runnable() {

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallProximityManager.java:135: Provide a timeout when requesting a wakelock with `PowerManager.Wakelock.acquire(long timeout)`. This will ensure the OS will cleanup any wakelocks that last longer than you intend, and will save your user's battery.

     132         synchronized (mProximityLock) {
     133             if (!mProximityLock.isHeld()) {
     134                 Log.d(TAG, "acquireProximityWakeLock()");
     135                 mProximityLock.acquire();
     136             }
     137         }
     138     }

../../src/main/java/com/dyteMobileSdk/incallmanager/InCallWakeLockUtils.java:56: Provide a timeout when requesting a wakelock with `PowerManager.Wakelock.acquire(long timeout)`. This will ensure the OS will cleanup any wakelocks that last longer than you intend, and will save your user's battery.

      53                 if (timeout > 0) {
      54                     lock.acquire(timeout);
      55                 } else {
      56                     lock.acquire();
      57                 }
      58                 return true;
      59             }

../../src/main/java/com/dyteMobileSdk/BackgroundTimer/RNBackgroundTimer.java:55: Provide a timeout when requesting a wakelock with `PowerManager.Wakelock.acquire(long timeout)`. This will ensure the OS will cleanup any wakelocks that last longer than you intend, and will save your user's battery.

     52
     53     @ReactMethod
     54     public void backgroundTimerStart(final int delay) {
     55         if (!wakeLock.isHeld()) wakeLock.acquire();
     56
     57         handler = new Handler();
     58         runnable = new Runnable() {

Wakelocks have two acquire methods: one with a timeout, and one without. You should generally always use the one with a timeout. A typical timeout is 10 minutes. If the task takes longer than it is critical that it happens (i.e. can't use `JobScheduler`) then maybe they should consider a foreground service instead (which is a stronger run guarantee and lets the user know something long/important is happening).
Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.
To suppress this error, use the issue id "WakelockTimeout" as explained in the Suppressing Warnings and Errors section.
WakelockTimeout Performance Warning Priority 9/10

## Static Field Leaks

../../src/main/java/com/dyteMobileSdk/DyteInstanceManager.java:16: Do not place Android context classes in static fields (static reference to `ReactInstanceManager` which has field `mCurrentActivity` pointing to `Activity`); this is a memory leak

     13
     14
     15 public class DyteInstanceManager {
     16     public static ReactInstanceManager instance;
     17     public static ReactRootView reactRootView;
     18     public static RNPermissionsModule permissionsHandler;

../../src/main/java/com/dyteMobileSdk/FS/RNFSManager.java:369: This `AsyncTask` class should be static or leaks might occur (anonymous com.dyteMobileSdk.FS.RNFSManager.CopyFileTask)

      366       final File inFile = new File(filepath);
      367
      368       if (!inFile.renameTo(new File(destPath))) {
      369         new CopyFileTask() {
      370           @Override
      371           protected void onPostExecute (Exception ex) {
      372             if (ex == null) {

../../src/main/java/com/dyteMobileSdk/FS/RNFSManager.java:392: This `AsyncTask` class should be static or leaks might occur (anonymous com.dyteMobileSdk.FS.RNFSManager.CopyFileTask)

      389
      390   @ReactMethod
      391   public void copyFile(final String filepath, final String destPath, ReadableMap options, final Promise promise) {
      392     new CopyFileTask() {
      393       @Override
      394       protected void onPostExecute (Exception ex) {
      395         if (ex == null) {

../../src/main/java/com/dyteMobileSdk/FS/RNFSManager.java:405: This `AsyncTask` class should be static or leaks might occur (com.dyteMobileSdk.FS.RNFSManager.CopyFileTask)

      402     }.execute(filepath, destPath);
      403   }
      404
      405   private class CopyFileTask extends AsyncTask<String, Void, Exception> {
      406     protected Exception doInBackground(String... paths) {
      407       try {
      408         String filepath = paths[0];

../../src/main/java/com/dyteMobileSdk/ReactInstanceManagerHolder.java:9: Do not place Android context classes in static fields (static reference to `ReactInstanceManager` which has field `mCurrentActivity` pointing to `Activity`); this is a memory leak

      6 import com.facebook.react.bridge.ReactContext;
      7
      8 public class ReactInstanceManagerHolder {
      9     public static ReactInstanceManager reactInstanceManager;
     10
     11     static Activity getCurrentActivity() {
     12         ReactContext reactContext

A static field will leak contexts.
Non-static inner classes have an implicit reference to their outer class. If that outer class is for example a `Fragment` or `Activity`, then this reference means that the long-running handler/loader/task will hold a reference to the activity which prevents it from getting garbage collected.
Similarly, direct field references to activities and fragments from these longer running instances can cause leaks.
ViewModel classes should never point to Views or non-application Contexts.
To suppress this error, use the issue id "StaticFieldLeak" as explained in the Suppressing Warnings and Errors section.
StaticFieldLeak Performance Warning Priority 6/10

## Disabled Checks

One or more issues were not run by lint, either because the check is not enabled by default, or because it was disabled with a command line flag or via one or more `lint.xml` configuration files in the project directories.
AppLinksAutoVerifyError
Disabled By: Default
Ensures that app links are correctly set and associated with website.
More info: https://g.co/appindexing/applinks
To suppress this error, use the issue id "AppLinksAutoVerifyError" as explained in the Suppressing Warnings and Errors section.
AppLinksAutoVerifyWarning
Disabled By: Default
Ensures that app links are correctly set and associated with website.
More info: https://g.co/appindexing/applinks
To suppress this error, use the issue id "AppLinksAutoVerifyWarning" as explained in the Suppressing Warnings and Errors section.
BackButton
Disabled By: Default
According to the Android Design Guide,
"Other platforms use an explicit back button with label to allow the user to navigate up the application's hierarchy. Instead, Android uses the main action bar's app icon for hierarchical navigation and the navigation bar's back button for temporal navigation."
This check is not very sophisticated (it just looks for buttons with the label "Back"), so it is disabled by default to not trigger on common scenarios like pairs of Back/Next buttons to paginate through screens.
More info: https://material.io/design/
To suppress this error, use the issue id "BackButton" as explained in the Suppressing Warnings and Errors section.
ConvertToWebp
Disabled By: Default
The WebP format is typically more compact than PNG and JPEG. As of Android 4.2.1 it supports transparency and lossless conversion as well. Note that there is a quickfix in the IDE which lets you perform conversion.
Launcher icons must be in the PNG format.
Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.
To suppress this error, use the issue id "ConvertToWebp" as explained in the Suppressing Warnings and Errors section.
DalvikOverride
Disabled By: Default
The Dalvik virtual machine will treat a package private method in one class as overriding a package private method in its super class, even if they are in separate packages.
If you really did intend for this method to override the other, make the method `protected` instead.
If you did not intend the override, consider making the method private, or changing its name or signature.
Note that this check is disabled be default, because ART (the successor to Dalvik) no longer has this behavior.
To suppress this error, use the issue id "DalvikOverride" as explained in the Suppressing Warnings and Errors section.
DuplicateStrings
Disabled By: Default
Duplicate strings can make applications larger unnecessarily.
This lint check looks for duplicate strings, including differences for strings where the only difference is in capitalization. Title casing and all uppercase can all be adjusted in the layout or in code.
More info: https://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType
To suppress this error, use the issue id "DuplicateStrings" as explained in the Suppressing Warnings and Errors section.
EasterEgg
Disabled By: Default
An "easter egg" is code deliberately hidden in the code, both from potential users and even from other developers. This lint check looks for code which looks like it may be hidden from sight.
To suppress this error, use the issue id "EasterEgg" as explained in the Suppressing Warnings and Errors section.
ExpensiveAssertion
Disabled By: Default
In Kotlin, assertions are not handled the same way as from the Java programming language. In particular, they're just implemented as a library call, and inside the library call the error is only thrown if assertions are enabled.
This means that the arguments to the `assert` call will always be evaluated. If you're doing any computation in the expression being asserted, that computation will unconditionally be performed whether or not assertions are turned on. This typically turns into wasted work in release builds.
This check looks for cases where the assertion condition is nontrivial, e.g. it is performing method calls or doing more work than simple comparisons on local variables or fields.
You can work around this by writing your own inline assert method instead:

    @Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
    inline fun assert(condition: () -> Boolean) {
        if (_Assertions.ENABLED && !condition()) {
            throw AssertionError()
        }
    }

In Android, because assertions are not enforced at runtime, instead use this:

    inline fun assert(condition: () -> Boolean) {
        if (BuildConfig.DEBUG && !condition()) {
            throw AssertionError()
        }
    }

To suppress this error, use the issue id "ExpensiveAssertion" as explained in the Suppressing Warnings and Errors section.
FieldGetter
Disabled By: Default
Accessing a field within the class that defines a getter for that field is at least 3 times faster than calling the getter. For simple getters that do nothing other than return the field, you might want to just reference the local field directly instead.
NOTE: As of Android 2.3 (Gingerbread), this optimization is performed automatically by Dalvik, so there is no need to change your code; this is only relevant if you are targeting older versions of Android.
More info: https://developer.android.com/training/articles/perf-tips#internal_get_set
To suppress this error, use the issue id "FieldGetter" as explained in the Suppressing Warnings and Errors section.
GoogleAppIndexingApiWarning
Disabled By: Default
Adds URLs to get your app into the Google index, to get installs and traffic to your app from Google Search.
More info: https://g.co/AppIndexing/AndroidStudio
Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.
To suppress this error, use the issue id "GoogleAppIndexingApiWarning" as explained in the Suppressing Warnings and Errors section.
GoogleAppIndexingWarning
Disabled By: Default
Adds URLs to get your app into the Google index, to get installs and traffic to your app from Google Search.
More info: https://g.co/AppIndexing/AndroidStudio
Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.
To suppress this error, use the issue id "GoogleAppIndexingWarning" as explained in the Suppressing Warnings and Errors section.
GradleCompatible
Disabled By: Command line flag
There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your `targetSdkVersion`).
Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.
To suppress this error, use the issue id "GradleCompatible" as explained in the Suppressing Warnings and Errors section.
IconExpectedSize
Disabled By: Default
There are predefined sizes (for each density) for launcher icons. You should follow these conventions to make sure your icons fit in with the overall look of the platform.
More info: https://material.io/design/iconography/
To suppress this error, use the issue id "IconExpectedSize" as explained in the Suppressing Warnings and Errors section.
ImplicitSamInstance
Disabled By: Default
Kotlin's support for SAM (single accessor method) interfaces lets you pass a lambda to the interface. This will create a new instance on the fly even though there is no explicit constructor call. If you pass one of these lambdas or method references into a method which (for example) stores or compares the object identity, unexpected results may happen.
To suppress this error, use the issue id "ImplicitSamInstance" as explained in the Suppressing Warnings and Errors section.
InvalidPackage
Disabled By: Default
This check scans through libraries looking for calls to APIs that are not included in Android.
When you create Android projects, the classpath is set up such that you can only access classes in the API packages that are included in Android. However, if you add other projects to your libs/ folder, there is no guarantee that those .jar files were built with an Android specific classpath, and in particular, they could be accessing unsupported APIs such as java.applet.
This check scans through library jars and looks for references to API packages that are not included in Android and flags these. This is only an error if your code calls one of the library classes which wind up referencing the unsupported package.
To suppress this error, use the issue id "InvalidPackage" as explained in the Suppressing Warnings and Errors section.
KotlinPropertyAccess
Disabled By: Default
For a method to be represented as a property in Kotlin, strict “bean”-style prefixing must be used.
Accessor methods require a ‘get’ prefix or for boolean-returning methods an ‘is’ prefix can be used.
More info: https://android.github.io/kotlin-guides/interop.html#property-prefixes
To suppress this error, use the issue id "KotlinPropertyAccess" as explained in the Suppressing Warnings and Errors section.
LambdaLast
Disabled By: Default
To improve calling this code from Kotlin,
parameter types eligible for SAM conversion should be last.
More info: https://android.github.io/kotlin-guides/interop.html#lambda-parameters-last
To suppress this error, use the issue id "LambdaLast" as explained in the Suppressing Warnings and Errors section.
LintImplPsiEquals
Disabled By: Default
You should never compare two PSI elements for equality with `equals`;
use `isEquivalentTo(PsiElement)` instead.
To suppress this error, use the issue id "LintImplPsiEquals" as explained in the Suppressing Warnings and Errors section.
LintImplUnexpectedDomain
Disabled By: Default
This checks flags URLs to domains that have not been explicitly whitelisted for use as a documentation source.
To suppress this error, use the issue id "LintImplUnexpectedDomain" as explained in the Suppressing Warnings and Errors section.
LogConditional
Disabled By: Default
The `BuildConfig` class provides a constant, `DEBUG`, which indicates whether the code is being built in release mode or in debug mode. In release mode, you typically want to strip out all the logging calls. Since the compiler will automatically remove all code which is inside a `if (false)` check, surrounding your logging calls with a check for `BuildConfig.DEBUG` is a good idea.
If you really intend for the logging to be present in release mode, you can suppress this warning with a `@SuppressLint` annotation for the intentional logging calls.
To suppress this error, use the issue id "LogConditional" as explained in the Suppressing Warnings and Errors section.
MangledCRLF
Disabled By: Default
On Windows, line endings are typically recorded as carriage return plus newline: \r\n.
This detector looks for invalid line endings with repeated carriage return characters (without newlines). Previous versions of the ADT plugin could accidentally introduce these into the file, and when editing the file, the editor could produce confusing visual artifacts.
More info: https://bugs.eclipse.org/bugs/show_bug.cgi?id=375421
To suppress this error, use the issue id "MangledCRLF" as explained in the Suppressing Warnings and Errors section.
MinSdkTooLow
Disabled By: Default
The value of the `minSdkVersion` property is too low and can be incremented without noticeably reducing the number of supported devices.
Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.
To suppress this error, use the issue id "MinSdkTooLow" as explained in the Suppressing Warnings and Errors section.
NegativeMargin
Disabled By: Default
Margin values should be positive. Negative values are generally a sign that you are making assumptions about views surrounding the current one, or may be tempted to turn off child clipping to allow a view to escape its parent. Turning off child clipping to do this not only leads to poor graphical performance, it also results in wrong touch event handling since touch events are based strictly on a chain of parent-rect hit tests. Finally, making assumptions about the size of strings can lead to localization problems.
To suppress this error, use the issue id "NegativeMargin" as explained in the Suppressing Warnings and Errors section.
NewerVersionAvailable
Disabled By: Default
This detector checks with a central repository to see if there are newer versions available for the dependencies used by this project. This is similar to the `GradleDependency` check, which checks for newer versions available in the Android SDK tools and libraries, but this works with any MavenCentral dependency, and connects to the library every time, which makes it more flexible but also much slower.
Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.
To suppress this error, use the issue id "NewerVersionAvailable" as explained in the Suppressing Warnings and Errors section.
NoHardKeywords
Disabled By: Default
Do not use Kotlin’s hard keywords as the name of methods or fields.
These require the use of backticks to escape when calling from Kotlin.
Soft keywords, modifier keywords, and special identifiers are allowed.
For example, Mockito’s `when` function requires backticks when used from Kotlin:
val callable = Mockito.mock(Callable::class.java)
Mockito.`when`(callable.call()).thenReturn(/* … */)
More info: https://android.github.io/kotlin-guides/interop.html#no-hard-keywords
To suppress this error, use the issue id "NoHardKeywords" as explained in the Suppressing Warnings and Errors section.
PermissionImpliesUnsupportedChromeOsHardware
Disabled By: Default
The `<uses-permission>` element should not require a permission that implies an unsupported Chrome OS hardware feature. Google Play assumes that certain hardware related permissions indicate that the underlying hardware features are required by default. To fix the issue, consider declaring the corresponding uses-feature element with `required="false"` attribute.
More info: https://developer.android.com/topic/arc/manifest.html#implied-features
Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.
To suppress this error, use the issue id "PermissionImpliesUnsupportedChromeOsHardware" as explained in the Suppressing Warnings and Errors section.
Registered
Disabled By: Default
Activities, services and content providers should be registered in the `AndroidManifest.xml` file using `<activity>`, `<service>` and `<provider>` tags.
If your activity is simply a parent class intended to be subclassed by other "real" activities, make it an abstract class.
More info: https://developer.android.com/guide/topics/manifest/manifest-intro.html
To suppress this error, use the issue id "Registered" as explained in the Suppressing Warnings and Errors section.
RequiredSize
Disabled By: Default
All views must specify an explicit `layout_width` and `layout_height` attribute. There is a runtime check for this, so if you fail to specify a size, an exception is thrown at runtime.
It's possible to specify these widths via styles as well. GridLayout, as a special case, does not require you to specify a size.
To suppress this error, use the issue id "RequiredSize" as explained in the Suppressing Warnings and Errors section.
SelectableText
Disabled By: Default
If a `<TextView>` is used to display data, the user might want to copy that data and paste it elsewhere. To allow this, the `<TextView>` should specify `android:textIsSelectable="true"`.
This lint check looks for TextViews which are likely to be displaying data: views whose text is set dynamically. This value will be ignored on platforms older than API 11, so it is okay to set it regardless of your `minSdkVersion`.
Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.
To suppress this error, use the issue id "SelectableText" as explained in the Suppressing Warnings and Errors section.
StopShip
Disabled By: Default
Using the comment `// STOPSHIP` can be used to flag code that is incomplete but checked in. This comment marker can be used to indicate that the code should not be shipped until the issue is addressed, and lint will look for these. In Gradle projects, this is only checked for non-debug (release) builds.
In Kotlin, the `TODO()` method is also treated as a stop ship marker; you can use it to make incomplete code compile, but it will throw an exception at runtime and therefore should be fixed before shipping releases.
Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.
To suppress this error, use the issue id "StopShip" as explained in the Suppressing Warnings and Errors section.
SyntheticAccessor
Disabled By: Default
A private inner class which is accessed from the outer class will force the compiler to insert a synthetic accessor; this means that you are causing extra overhead. This is not important in small projects, but is important for large apps running up against the 64K method handle limit, and especially for libraries where you want to make sure your library is as small as possible for the cases where your library is used in an app running up against the 64K limit.
To suppress this error, use the issue id "SyntheticAccessor" as explained in the Suppressing Warnings and Errors section.
TypographyQuotes
Disabled By: Default
Straight single quotes and double quotes, when used as a pair, can be replaced by "curvy quotes" (or directional quotes). This can make the text more readable.
Note that you should never use grave accents and apostrophes to quote, `like this'.
(Also note that you should not use curvy quotes for code fragments.)
More info: https://en.wikipedia.org/wiki/Quotation_mark
Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.
To suppress this error, use the issue id "TypographyQuotes" as explained in the Suppressing Warnings and Errors section.
UnknownNullness
Disabled By: Default
To improve referencing this code from Kotlin, consider adding
explicit nullness information here with either `@NonNull` or `@Nullable`.
You can set the environment variable
`ANDROID_LINT_NULLNESS_IGNORE_DEPRECATED=true`
if you want lint to ignore classes and members that have been annotated with
`@Deprecated`.
More info: https://android.github.io/kotlin-guides/interop.html#nullability-annotations
To suppress this error, use the issue id "UnknownNullness" as explained in the Suppressing Warnings and Errors section.
UnpackedNativeCode
Disabled By: Default
This app loads native libraries using `System.loadLibrary()`.
Consider adding `android:extractNativeLibs="false"` to the `<application>` tag in AndroidManifest.xml. Starting with Android 6.0, this will make installation faster, the app will take up less space on the device and updates will have smaller download sizes.
Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.
To suppress this error, use the issue id "UnpackedNativeCode" as explained in the Suppressing Warnings and Errors section.
UnsupportedChromeOsHardware
Disabled By: Default
The `<uses-feature>` element should not require this unsupported Chrome OS hardware feature. Any uses-feature not explicitly marked with `required="false"` is necessary on the device to be installed on. Ensure that any features that might prevent it from being installed on a Chrome OS device are reviewed and marked as not required in the manifest.
More info: https://developer.android.com/topic/arc/manifest.html#incompat-entries
Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.
To suppress this error, use the issue id "UnsupportedChromeOsHardware" as explained in the Suppressing Warnings and Errors section.
UnusedIds
Disabled By: Default
This resource id definition appears not to be needed since it is not referenced from anywhere. Having id definitions, even if unused, is not necessarily a bad idea since they make working on layouts and menus easier, so there is not a strong reason to delete these.
The unused resource check can ignore tests. If you want to include resources that are only referenced from tests, consider packaging them in a test source set instead.
You can include test sources in the unused resource check by setting the system property lint.unused-resources.include-tests=true, and to exclude them (usually for performance reasons), use lint.unused-resources.exclude-tests=true.
Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.
To suppress this error, use the issue id "UnusedIds" as explained in the Suppressing Warnings and Errors section.
ValidActionsXml
Disabled By: Default
Ensures that an actions XML file is properly formed
To suppress this error, use the issue id "ValidActionsXml" as explained in the Suppressing Warnings and Errors section.
WrongThreadInterprocedural
Disabled By: Default
Searches for interprocedural call paths that violate thread annotations in the program. Tracks the flow of instantiated types and lambda expressions to increase accuracy across method boundaries.
More info: https://developer.android.com/guide/components/processes-and-threads.html#Threads
To suppress this error, use the issue id "WrongThreadInterprocedural" as explained in the Suppressing Warnings and Errors section.

## Suppressing Warnings and Errors

Lint errors can be suppressed in a variety of ways:
1. With a `@SuppressLint` annotation in the Java code
2. With a `tools:ignore` attribute in the XML file
3. With a //noinspection comment in the source code
4. With ignore flags specified in the `build.gradle` file, as explained below
5. With a `lint.xml` configuration file in the project
6. With a `lint.xml` configuration file passed to lint via the --config flag
7. With the --ignore flag passed to lint.
To suppress a lint warning with an annotation, add a `@SuppressLint("id")` annotation on the class, method or variable declaration closest to the warning instance you want to disable. The id can be one or more issue id's, such as `"UnusedResources"` or `{"UnusedResources","UnusedIds"}`, or it can be `"all"` to suppress all lint warnings in the given scope.
To suppress a lint warning with a comment, add a `//noinspection id` comment on the line before the statement with the error.
To suppress a lint warning in an XML file, add a `tools:ignore="id"` attribute on the element containing the error, or one of its surrounding elements. You also need to define the namespace for the tools prefix on the root element in your document, next to the `xmlns:android` declaration:
`xmlns:tools="http://schemas.android.com/tools"`
To suppress a lint warning in a `build.gradle` file, add a section like this:

    android {
        lintOptions {
            disable 'TypographyFractions','TypographyQuotes'
        }
    }

Here we specify a comma separated list of issue id's after the disable command. You can also use `warning` or `error` instead of `disable` to change the severity of issues.
To suppress lint warnings with a configuration XML file, create a file named `lint.xml` and place it at the root directory of the module in which it applies.
The format of the `lint.xml` file is something like the following:

    <?xml version="1.0" encoding="UTF-8"?>
    <lint>
        <!-- Ignore everything in the test source set -->
        <issue id="all">
            <ignore path="\*/test/\*" />
        </issue>

        <!-- Disable this given check in this project -->
        <issue id="IconMissingDensityFolder" severity="ignore" />

        <!-- Ignore the ObsoleteLayoutParam issue in the given files -->
        <issue id="ObsoleteLayoutParam">
            <ignore path="res/layout/activation.xml" />
            <ignore path="res/layout-xlarge/activation.xml" />
            <ignore regexp="(foo|bar)\.java" />
        </issue>

        <!-- Ignore the UselessLeaf issue in the given file -->
        <issue id="UselessLeaf">
            <ignore path="res/layout/main.xml" />
        </issue>

        <!-- Change the severity of hardcoded strings to "error" -->
        <issue id="HardcodedText" severity="error" />
    </lint>

To suppress lint checks from the command line, pass the --ignore flag with a comma separated list of ids to be suppressed, such as:
`$ lint --ignore UnusedResources,UselessLeaf /my/project/path`
For more information, see https://developer.android.com/studio/write/lint.html#config