Lint Report: 244 warnings
Issue Types

Overview

Correctness
5warning DefaultLocale: Implied default locale in case conversion
1warning OldTargetApi: Target SDK attribute is not targeting latest version
1warning UnspecifiedRegisterReceiverFlag: Missing registerReceiver() exported flag
5warning GradleDependency: Obsolete Gradle Dependency
10warning Deprecated: Using deprecated resources
Security
2warning HardwareIds: Hardware Id Usage
2warning SSLCertificateSocketFactoryGetInsecure: Call to SSLCertificateSocketFactory.getInsecure()
1warning ExportedService: Exported service does not require permission
Performance
1warning Wakelock: Incorrect WakeLock usage
1warning WakelockTimeout: Using wakeLock without timeout
8warning ObsoleteLayoutParam: Obsolete layout params
5warning ObsoleteSdkInt: Obsolete SDK_INT Version Check
1warning StaticFieldLeak: Static Field Leaks
1warning HandlerLeak: Handler reference leaks
16warning UseValueOf: Should use valueOf instead of new
5warning InefficientWeight: Inefficient layout weight
1warning Overdraw: Overdraw: Painting regions more than once
72warning UnusedResources: Unused resources
1warning RedundantNamespace: Redundant namespace
1warning UnusedNamespace: Unused namespace
Usability:Icons
3warning IconColors: Icon colors do not follow the recommended visual style
3warning IconDensities: Icon densities validation
Usability
3warning ButtonOrder: Button order
9warning ButtonStyle: Button should be borderless
4warning TextFields: Missing inputType
8warning Autofill: Use Autofill
Accessibility
8warning LabelFor: Missing accessibility label
Internationalization
43warning SetTextI18n: TextView Internationalization
14warning HardcodedText: Hardcoded text
Internationalization:Bidirectional Text
9warning RtlHardcoded: Using left/right instead of start/end attributes
Included Additional Checks (26)
Disabled Checks (39)

Implied default locale in case conversion

../../src/main/java/com/dwanta/android/dap/client/dpsmsg.java:318: Implicitly using the default locale is a common source of bugs: Use String.format(Locale, ...) instead
  315   public boolean set( int id, int value ) {
  316     byte[] b = new byte[25];
  317   // String.format(Locale, ...) instead [DefaultLocale]
  318     String s = String.format("%d", value);                                                          
  319     return this.set( id, s);
  320   }
../../src/main/java/com/dwanta/android/dap/client/dpsmsg.java:885: Implicitly using the default locale is a common source of bugs: Use String.format(Locale, ...) instead
  882     if( field_def[id][0] == short_length ) {
  883       byte[] f = fields.get(id);
  884       byte[] f2 = new byte[f.length + 2];
  885       lenbuf = lenbuf.format("%02d", f.length);                                                     
  886       strncpy( f2, lenbuf, 2, 0 ); 
  887       bytecpy( f2, f, f.length, 2 ); 
../../src/main/java/com/dwanta/android/dap/client/dpsmsg.java:895: Implicitly using the default locale is a common source of bugs: Use String.format(Locale, ...) instead
  892     if( field_def[id][0] == long_length ) {
  893       byte[] f = fields.get(id);
  894       byte[] f2 = new byte[f.length + 3];
  895       lenbuf = lenbuf.format("%03d", f.length);                                                     
  896       strncpy( f2, lenbuf, 3, 0 ); 
  897       //Log.d(TAG, "f2 = " + new String(f2) + " len " +  f.length);
  898       bytecpy( f2, f, f.length, 3 ); 
../../src/main/java/com/dwanta/android/dap/client/dpsmsg.java:905: Implicitly using the default locale is a common source of bugs: Use String.format(Locale, ...) instead
  902     if( field_def[id][0] == vlong_length ) {
  903       byte[] f = fields.get(id);
  904       byte[] f2 = new byte[f.length + 6];
  905       lenbuf = lenbuf.format("%06d", f.length);                                                     
  906       strncpy( f2, lenbuf, 6, 0 ); 
  907       bytecpy( f2, f, f.length, 6 ); 
../../src/main/java/com/dwanta/android/dap/client/dpsmsg.java:941: Implicitly using the default locale is a common source of bugs: Use String.format(Locale, ...) instead
  938 
  939     Log.d(TAG, "message start " + outbuf.array() );
  940 
  941     lenbuf = lenbuf.format("%04d", messageType);                                                    
  942     byte[] m2 = new byte[4];
  943     strncpy( m2, lenbuf, 4, 0 );
  944     outbuf.put(m2);
DefaultLocale Correctness Warning Priority 6/10

Target SDK attribute is not targeting latest version

../../build.gradle:17: Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details.
 14     defaultConfig {
 15         applicationId "com.dwanta.android.dap"
 16         minSdk 28
 17         targetSdk 33                                                                                
 18         versionCode 1
 19         versionName "1.0"
OldTargetApi Correctness Warning Priority 6/10

Missing registerReceiver() exported flag

../../src/main/java/com/dwanta/android/dap/client/ClientService.java:1221: mBroadcastReceiver is missing RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED flag for unprotected broadcasts registered for DAPWAKE
 1218     IntentFilter filter = new IntentFilter();
 1219     //filter.addAction(AccountManager.LOGIN_ACCOUNTS_CHANGED_ACTION);
 1220     filter.addAction("DAPWAKE");
 1221     registerReceiver(mBroadcastReceiver, filter, null, null);                                       
 1222     //registerReceiver(mBroadcastReceiver, null, null, null);
 1223   }
UnspecifiedRegisterReceiverFlag Correctness Warning Priority 5/10

Obsolete Gradle Dependency

../../build.gradle:34: A newer version of compileSdkVersion than 34 is available: 35
 31         sourceCompatibility JavaVersion.VERSION_11
 32         targetCompatibility JavaVersion.VERSION_11
 33     }
 34     compileSdkVersion 34                                                                            
 35 
 36     namespace 'com.dwanta.android.dap'
 37 }
../../build.gradle:41: A newer version of androidx.appcompat:appcompat than 1.7.0 is available: 1.7.1
 38 
 39 dependencies {
 40 
 41     implementation 'androidx.appcompat:appcompat:1.7.0'                                             
 42     implementation 'com.google.android.material:material:1.4.0'
 43     //noinspection GradleDynamicVersion
 44     testImplementation 'junit:junit:4.+'
../../build.gradle:42: A newer version of com.google.android.material:material than 1.4.0 is available: 1.12.0
 39 dependencies {
 40 
 41     implementation 'androidx.appcompat:appcompat:1.7.0'
 42     implementation 'com.google.android.material:material:1.4.0'                                     
 43     //noinspection GradleDynamicVersion
 44     testImplementation 'junit:junit:4.+'
 45     androidTestImplementation 'androidx.test.ext:junit:1.1.3'
../../build.gradle:45: A newer version of androidx.test.ext:junit than 1.1.3 is available: 1.2.1
 42     implementation 'com.google.android.material:material:1.4.0'
 43     //noinspection GradleDynamicVersion
 44     testImplementation 'junit:junit:4.+'
 45     androidTestImplementation 'androidx.test.ext:junit:1.1.3'                                       
 46     androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
 47 }
../../build.gradle:46: A newer version of androidx.test.espresso:espresso-core than 3.4.0 is available: 3.6.1
 43     //noinspection GradleDynamicVersion
 44     testImplementation 'junit:junit:4.+'
 45     androidTestImplementation 'androidx.test.ext:junit:1.1.3'
 46     androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'                          
 47 }
GradleDependency Correctness Warning Priority 4/10

Using deprecated resources

../../src/main/res/layout/login_activity.xml:57: android:capitalize is deprecated: Use inputType instead
  54                 android:layout_height="wrap_content"
  55                 android:minWidth="250dip"
  56                 android:scrollHorizontally="true"
  57                 android:capitalize="none"                                                           
  58                 android:autoText="false"
  59                 android:inputType="text"
  60                 />
../../src/main/res/layout/login_activity.xml:58: android:autoText is deprecated: Use inputType instead
  55                 android:minWidth="250dip"
  56                 android:scrollHorizontally="true"
  57                 android:capitalize="none"
  58                 android:autoText="false"                                                            
  59                 android:inputType="text"
  60                 />
  61             <TextView
../../src/main/res/layout/login_activity.xml:74: android:capitalize is deprecated: Use inputType instead
  71                 android:layout_height="wrap_content"
  72                 android:minWidth="250dip"
  73                 android:scrollHorizontally="true"
  74                 android:capitalize="none"                                                           
  75                 android:autoText="false"
  76                 android:inputType="textEmailAddress"
  77                  />
../../src/main/res/layout/login_activity.xml:75: android:autoText is deprecated: Use inputType instead
  72                 android:minWidth="250dip"
  73                 android:scrollHorizontally="true"
  74                 android:capitalize="none"
  75                 android:autoText="false"                                                            
  76                 android:inputType="textEmailAddress"
  77                  />
  78             <TextView
../../src/main/res/layout/login_activity.xml:100: android:capitalize is deprecated: Use inputType instead
  97                 android:layout_height="wrap_content"
  98                 android:minWidth="250dip"
  99                 android:scrollHorizontally="true"
 100                 android:capitalize="none"                                                           
 101                 android:autoText="false"
 102                 android:password="true"
 103                 android:inputType="textPassword"
Deprecated Correctness Warning Priority 2/10

Hardware Id Usage

../../src/main/java/com/dwanta/android/dap/client/dpsio.java:1043: Using SERIAL to get device identifiers is not recommended
 1040     String serial = null;
 1041 
 1042     if(Build.VERSION.SDK_INT > Build.VERSION_CODES.FROYO) 
 1043       serial = Build.SERIAL;                                                                        
 1044 
 1045     if( serial != null )
 1046       return "03" + serial;
../../src/main/java/com/dwanta/android/dap/client/dpsio.java:1048: Using getString to get device identifiers is not recommended
 1045     if( serial != null )
 1046       return "03" + serial;
 1047 
 1048     String androidId = Secure.getString(ctx.getContentResolver(), Secure.ANDROID_ID);               
 1049 
 1050     if(androidId != null) 
 1051       return "02" + androidId;
HardwareIds Security Warning Priority 6/10

Call to SSLCertificateSocketFactory.getInsecure()

../../src/main/java/com/dwanta/android/dap/client/ClientService.java:1767: Use of SSLCertificateSocketFactory.getInsecure() can cause insecure network traffic due to trusting arbitrary TLS/SSL certificates presented by peers
 1764         sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
 1765 
 1766       SSLCertificateSocketFactory sf = 
 1767         (SSLCertificateSocketFactory)SSLCertificateSocketFactory.getInsecure(10000, null);          
 1768 
 1769       Log.d(TAG, "after sf");
../../src/main/java/com/dwanta/android/dap/client/ClientService.java:1869: Use of SSLCertificateSocketFactory.getInsecure() can cause insecure network traffic due to trusting arbitrary TLS/SSL certificates presented by peers
 1866      sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
 1867 
 1868    SSLCertificateSocketFactory sf = 
 1869      (SSLCertificateSocketFactory)SSLCertificateSocketFactory.getInsecure(10000, null);          
 1870    Log.d(TAG, "after sf");
 1871 
 1872    //sf = (SSLCertificateSocketFactory)SSLCertificateSocketFactory.getInsecure(10000, null);
SSLCertificateSocketFactoryGetInsecure Security Warning Priority 6/10

Exported service does not require permission

../../src/main/AndroidManifest.xml:49: Exported service does not require permission
  46   <!-- The view notification service -->
  47   48 
  49   <service android:name=".client.ClientService" android:stopWithTask="true" android:exported="true" />
  50   51 
  52   <activity android:name=".activities.SiteActivity"
ExportedService Security Warning Priority 5/10

Incorrect WakeLock usage

../../src/main/java/com/dwanta/android/dap/client/ClientService.java:1652: Found a wakelock acquire() but no release() calls anywhere
 1649       PowerManager pm = (PowerManager) ctx.getSystemService(Context.POWER_SERVICE);
 1650       PowerManager.WakeLock wl = null;
 1651       wl = pm.newWakeLock( PowerManager.FULL_WAKE_LOCK, "ClientService:FullWakeTag");
 1652       wl.acquire();                                                                                 
 1653       Log.d(TAG, "doOpenSocket WAKE_LOCK");
 1654 
Wakelock Performance Warning Priority 9/10

Using wakeLock without timeout

../../src/main/java/com/dwanta/android/dap/client/ClientService.java:1652: 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.
 1649       PowerManager pm = (PowerManager) ctx.getSystemService(Context.POWER_SERVICE);
 1650       PowerManager.WakeLock wl = null;
 1651       wl = pm.newWakeLock( PowerManager.FULL_WAKE_LOCK, "ClientService:FullWakeTag");
 1652       wl.acquire();                                                                                 
 1653       Log.d(TAG, "doOpenSocket WAKE_LOCK");
 1654 
WakelockTimeout Performance Warning Priority 9/10

Obsolete layout params

../../src/main/res/layout/confirm_activity.xml:31: Invalid layout param in a ScrollView: layout_weight
 28         <LinearLayout
 29             android:layout_width="fill_parent"
 30             android:layout_height="wrap_content"
 31             android:layout_weight="1"                                                               
 32             android:orientation="vertical"
 33             android:paddingTop="5dip"
 34             android:paddingBottom="13dip"
../../src/main/res/layout/dapmain.xml:43: Invalid layout param in a ScrollView: layout_weight
 40             android:id="@+id/mainframe2"
 41             android:layout_width="fill_parent"
 42             android:layout_height="wrap_content"
 43             android:layout_weight="1"                                                               
 44             android:orientation="vertical"
 45             android:paddingTop="5dip"
 46             android:paddingBottom="13dip"
../../src/main/res/layout/dechomain.xml:47: Invalid layout param in a RelativeLayout: layout_weight
 44           <ScrollView
 45             android:layout_width="fill_parent"
 46             android:layout_height="0dip"
 47             android:layout_weight="1">                                                              
 48 
 49         <LinearLayout
 50             android:id="@+id/mainframe2"
../../src/main/res/layout/dechomain.xml:53: Invalid layout param in a ScrollView: layout_weight
 50             android:id="@+id/mainframe2"
 51             android:layout_width="fill_parent"
 52             android:layout_height="wrap_content"
 53             android:layout_weight="1"                                                               
 54             android:orientation="vertical"
 55             android:paddingTop="5dip"
 56             android:paddingBottom="13dip"
../../src/main/res/layout/login_activity.xml:32: Invalid layout param in a ScrollView: layout_weight
  29         <LinearLayout
  30             android:layout_width="fill_parent"
  31             android:layout_height="wrap_content"
  32             android:layout_weight="1"                                                               
  33             android:orientation="vertical"
  34             android:paddingTop="5dip"
  35             android:paddingBottom="13dip"
../../src/main/res/layout/pin_activity.xml:31: Invalid layout param in a ScrollView: layout_weight
 28         <LinearLayout
 29             android:layout_width="fill_parent"
 30             android:layout_height="wrap_content"
 31             android:layout_weight="1"                                                               
 32             android:orientation="vertical"
 33             android:paddingTop="5dip"
 34             android:paddingBottom="13dip"
../../src/main/res/layout/prompt_activity.xml:32: Invalid layout param in a ScrollView: layout_weight
 29             android:id="@+id/prompt_frame"
 30             android:layout_width="fill_parent"
 31             android:layout_height="wrap_content"
 32             android:layout_weight="1"                                                               
 33             android:orientation="vertical"
 34             android:paddingTop="5dip"
 35             android:paddingBottom="13dip"
../../src/main/res/layout/sitemain.xml:39: Invalid layout param in a ScrollView: layout_weight
 36             android:id="@+id/siteframe2"
 37             android:layout_width="fill_parent"
 38             android:layout_height="wrap_content"
 39             android:layout_weight="1"                                                               
 40             android:orientation="vertical"
 41             android:paddingTop="5dip"
 42             android:paddingBottom="13dip"
ObsoleteLayoutParam Performance Warning Priority 6/10

Obsolete SDK_INT Version Check

../../src/main/java/com/dwanta/android/dap/client/dpsio.java:1042: Unnecessary; SDK_INT is always >= 28
 1039   public String getDeviceID() {
 1040     String serial = null;
 1041 
 1042     if(Build.VERSION.SDK_INT > Build.VERSION_CODES.FROYO)                                           
 1043       serial = Build.SERIAL;
 1044 
 1045     if( serial != null )
../../src/main/res/values-v11: This folder configuration (v11) is unnecessary; minSdkVersion is 28. Merge all the resources in this folder into values.
../../src/main/res/values-v21: This folder configuration (v21) is unnecessary; minSdkVersion is 28. Merge all the resources in this folder into values.
../../src/main/res/xml-v11: This folder configuration (v11) is unnecessary; minSdkVersion is 28. Merge all the resources in this folder into xml.
../../src/main/res/xml-v14: This folder configuration (v14) is unnecessary; minSdkVersion is 28. Merge all the resources in this folder into xml.
ObsoleteSdkInt Performance Warning Priority 6/10

Static Field Leaks

../../src/main/java/com/dwanta/android/dap/authenticator/AuthenticatorActivity.java:557: This AsyncTask class should be static or leaks might occur (com.dwanta.android.dap.authenticator.AuthenticatorActivity.UserLoginTask)
 554      * Represents an asynchronous task used to authenticate a user against the
 555      * SampleSync Service
 556      */
 557     public class UserLoginTask extends AsyncTask<Void, Void, String> {                              
 558 
 559         private Context ctx;
 560         private TextView statusTxtView;
StaticFieldLeak Performance Warning Priority 6/10

Handler reference leaks

../../src/main/java/com/dwanta/android/dap/client/dpscamera.java:377: This Handler class should be static or leaks might occur (anonymous android.os.Handler)
 374     /**
 375      * A {@link Handler} for showing {@link Toast}s.
 376      */
 377     private Handler mMessageHandler = new Handler() {                                               
 378         @Override
 379         public void handleMessage(Message msg) {
 380             Log.d(TAG, "handleMessage");
HandlerLeak Performance Warning Priority 4/10

Should use valueOf instead of new

../../src/main/java/com/dwanta/android/dap/client/ClientService.java:1552: Use Float.valueOf(new String(msg.get(dpsmsg.amount))) instead
 1549     } else {
 1550       if( msg.test(dpsmsg.amount) ) {
 1551         try {
 1552           float m = new Float(new String(msg.get(dpsmsg.amount))).floatValue();                     
 1553           t += " amt $" + m;
 1554         } catch (Exception e) {
 1555           Log.d(TAG, "bad amount " + new String(msg.get(dpsmsg.amount)));
../../src/main/java/com/dwanta/android/dap/client/ClientServiceActivities.java:151: Use Integer.valueOf(msg.getPromptId(i)) instead
 148             ll2.setOrientation(LinearLayout.VERTICAL);
 149             TextView tv2 = new TextView(this);
 150             tv2.setText(msg.getPromptText(i));
 151             int p = new Integer(msg.getPromptId(i)).intValue();                                     
 152             int len = new Integer(msg.getPromptLen(i)).intValue();
 153             if( len == 0 ) len = 8;
../../src/main/java/com/dwanta/android/dap/client/ClientServiceActivities.java:152: Use Integer.valueOf(msg.getPromptLen(i)) instead
 149             TextView tv2 = new TextView(this);
 150             tv2.setText(msg.getPromptText(i));
 151             int p = new Integer(msg.getPromptId(i)).intValue();
 152             int len = new Integer(msg.getPromptLen(i)).intValue();                                  
 153             if( len == 0 ) len = 8;
 154 
 155             ll2.addView(tv2);
../../src/main/java/com/dwanta/android/dap/client/ClientServiceActivities.java:233: Use Integer.valueOf(msg.getPromptId(i)) instead
 230             if( ( numPrompts > 0 ) && ( promptKey != "0" ) ) {
 231               resp = promptKey + ",";
 232               for( int i = 0; i < numPrompts; i++ ) {
 233                 int p = new Integer(msg.getPromptId(i)).intValue();                                 
 234                 Log.d(TAG, "looking for prompt " + p);
 235                 EditText promptEdit = (EditText)findViewById(p);
 236                 String text = "";
../../src/main/java/com/dwanta/android/dap/activities/DechoActivity.java:267: Use Integer.valueOf(which) instead
 264         try {
 265           String which = obj.getString("which");
 266           String val = obj.getString("value");
 267           int i2 = new Integer(which).intValue();                                                   
 268           Log.d(TAG, "MESSAGE2 have which " + which);
 269           if( mTestInt == 4 ) {
 270             Log.d(TAG, "was in menu");
UseValueOf Performance Warning Priority 4/10

Inefficient layout weight

../../src/main/res/layout/channel.xml:49: Use a layout_height of 0dp instead of wrap_content for better performance
 46             android:text="New Value"
 47         />
 48 
 49         <EditText android:layout_height="wrap_content"                                              
 50                  android:layout_width="match_parent"
 51                  android:layout_weight="1"
 52                  android:id="@+id/channelStatus"/>
../../src/main/res/layout/siteprice.xml:43: Use a layout_height of 0dp instead of wrap_content for better performance
 40             android:text="Enter Price"
 41         />
 42 
 43         <EditText android:layout_height="wrap_content"                                              
 44                  android:layout_width="match_parent"
 45                  android:layout_weight="1"
 46                  android:id="@+id/productprice"/>
../../src/main/res/layout/siteprod.xml:35: Use a layout_height of 0dp instead of wrap_content for better performance
 32             android:text="Enter Product ID"
 33         />
 34 
 35         <Spinner android:layout_height="wrap_content"                                               
 36                  android:layout_width="match_parent"
 37                  android:layout_weight="1"
 38                  android:drawSelectorOnTop = "true"
../../src/main/res/layout/siteqty.xml:43: Use a layout_height of 0dp instead of wrap_content for better performance
 40             android:text="Enter Qty"
 41         />
 42 
 43         <EditText android:layout_height="wrap_content"                                              
 44                  android:layout_width="match_parent"
 45                  android:layout_weight="1"
 46                  android:id="@+id/productqty"/>
../../src/main/res/layout/sitesubprod.xml:35: Use a layout_height of 0dp instead of wrap_content for better performance
 32             android:text="Enter Product ID"
 33         />
 34 
 35         <Spinner android:layout_height="wrap_content"                                               
 36                  android:layout_width="match_parent"
 37                  android:layout_weight="1"
 38                  android:id="@+id/productSpinner"/>
InefficientWeight Performance Warning Priority 3/10

Overdraw: Painting regions more than once

../../src/main/res/layout/activity_camera.xml:21: Possible overdraw: Root element paints background #000 with a theme that also paints a background (inferred theme is @android:style/Theme.Holo)
 18     android:id="@+id/container"
 19     android:layout_width="match_parent"
 20     android:layout_height="match_parent"
 21     android:background="#000"                                                                       
 22     tools:context="com.dwanta.android.dap.activities.CameraActivity" />
Overdraw Performance Warning Priority 3/10

Unused resources

../../src/main/res/layout/activity_camera.xml:16: The resource R.layout.activity_camera appears to be unused
 13  See the License for the specific language governing permissions and
 14  limitations under the License.
 15 -->
 16 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"                             
 17     xmlns:tools="http://schemas.android.com/tools"
 18     android:id="@+id/container"
 19     android:layout_width="match_parent"
../../src/main/res/values/colors.xml:4: The resource R.color.my_spinner_text_color appears to be unused
 1 <?xml version="1.0" encoding="utf-8"?>
 2 <resources>
 3 
 4 <color name="my_spinner_text_color">#808080</color>                                                 
 5 
 6 </resources>
../../src/main/res/xml/contacts.xml:20: The resource R.xml.contacts appears to be unused
 17  */
 18 -->
 19 
 20 <ContactsSource                                                                                     
 21     xmlns:android="http://schemas.android.com/apk/res/android"
 22 >
../../src/main/res/values/dimens.xml:23: The resource R.dimen.contact_name_text_size appears to be unused
 20 <resources>
 21 
 22     <!-- Font size used for the contact name in the editor -->
 23     <dimen name="contact_name_text_size">18sp</dimen>                                               
 24 
 25 </resources>
../../src/main/res/layout/fragment_camera2_basic.xml:16: The resource R.layout.fragment_camera2_basic appears to be unused
 13  See the License for the specific language governing permissions and
 14  limitations under the License.
 15 -->
 16 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"                          
 17     android:layout_width="match_parent"
 18     android:layout_height="match_parent">
UnusedResources Performance Warning Priority 3/10

Redundant namespace

../../src/main/res/layout/main.xml:8: This namespace declaration is redundant
  5     android:orientation="vertical" >
  6 
  7     <LinearLayout
  8         xmlns:android="http://schemas.android.com/apk/res/android"                                  
  9         android:id="@+id/login_activity"
 10         android:layout_width="fill_parent"
 11         android:layout_height="fill_parent"
RedundantNamespace Performance Warning Priority 1/10

Unused namespace

../../src/main/res/layout/main.xml:8: Unused namespace declaration xmlns:android; already declared on the root element
  5     android:orientation="vertical" >
  6 
  7     <LinearLayout
  8         xmlns:android="http://schemas.android.com/apk/res/android"                                  
  9         android:id="@+id/login_activity"
 10         android:layout_width="fill_parent"
 11         android:layout_height="fill_parent"
UnusedNamespace Performance Warning Priority 1/10

Icon colors do not follow the recommended visual style

../../src/main/res/drawable-hdpi/icon.png: Notification icons must be entirely white
    ../../src/main/java/com/dwanta/android/dap/client/ClientService.java:1617: Icon used in notification here
     1614     Notification notification = new Notification.Builder(this).
     1615             setContentTitle(text).
     1616             setContentText("Touch to manage DAP service.").
     1617             setSmallIcon(R.drawable.icon).                                                          
     1618             setTicker("DAP started").
     1619             setOngoing(true).
     1620             setChannelId(channelid).
    
hdpi
../../src/main/res/drawable-ldpi/icon.png: Notification icons must be entirely white
    ../../src/main/java/com/dwanta/android/dap/client/ClientService.java:1617: Icon used in notification here
     1614     Notification notification = new Notification.Builder(this).
     1615             setContentTitle(text).
     1616             setContentText("Touch to manage DAP service.").
     1617             setSmallIcon(R.drawable.icon).                                                          
     1618             setTicker("DAP started").
     1619             setOngoing(true).
     1620             setChannelId(channelid).
    
ldpi
../../src/main/res/drawable-mdpi/icon.png: Notification icons must be entirely white
    ../../src/main/java/com/dwanta/android/dap/client/ClientService.java:1617: Icon used in notification here
     1614     Notification notification = new Notification.Builder(this).
     1615             setContentTitle(text).
     1616             setContentText("Touch to manage DAP service.").
     1617             setSmallIcon(R.drawable.icon).                                                          
     1618             setTicker("DAP started").
     1619             setOngoing(true).
     1620             setChannelId(channelid).
    
mdpi
IconColors Icons Usability Warning Priority 6/10

Icon densities validation

../../src/main/res/drawable-mdpi: Missing the following drawables in drawable-mdpi: tile.9.png (found in drawable-hdpi)
../../src/main/res/drawable-xhdpi: Missing the following drawables in drawable-xhdpi: icon.png, tile.9.png
../../src/main/res/drawable-xxhdpi: Missing the following drawables in drawable-xxhdpi: icon.png, tile.9.png
IconDensities Icons Usability Warning Priority 4/10

Button order

../../src/main/res/layout/login_activity.xml:130: Cancel button should be on the left (was ""Sign in" | Cancel", should be "Cancel | "Sign in"")
 127             android:minWidth="100dip"
 128             android:text="@string/login_activity_ok_button"
 129             android:onClick="handleLogin" />
 130         <Button                                                                                     
 131             android:id="@+id/cancel_button"
 132             android:layout_width="wrap_content"
 133             android:layout_height="wrap_content"
../../src/main/res/layout/pin_activity.xml:85: Cancel button should be on the left (was ""Send PIN" | Cancel", should be "Cancel | "Send PIN"")
 82             android:minWidth="50dip"
 83             android:text="@string/pin_activity_ok_button"
 84          />
 85         <Button                                                                                     
 86             android:id="@+id/cancel_button"
 87             android:layout_width="wrap_content"
 88             android:layout_height="wrap_content"
../../src/main/res/layout/prompt_activity.xml:56: Cancel button should be on the left (was ""Send Prompt" | Cancel", should be "Cancel | "Send Prompt"")
 53             android:minWidth="100dip"
 54             android:text="Send Prompt"
 55          />
 56         <Button                                                                                     
 57             android:id="@+id/cancel_button"
 58             android:layout_width="wrap_content"
 59             android:layout_height="wrap_content"
ButtonOrder Usability Warning Priority 8/10

Button should be borderless

../../src/main/res/layout/login_activity.xml:122: Buttons in button bars should be borderless; use style="?android:attr/buttonBarButtonStyle" (and ?android:attr/buttonBarStyle on the parent)
 119         android:paddingLeft="2dip"
 120         android:orientation="horizontal"
 121         android:paddingRight="2dip">
 122         <Button                                                                                     
 123             android:id="@+id/ok_button"
 124             android:layout_width="wrap_content"
 125             android:layout_height="wrap_content"
../../src/main/res/layout/login_activity.xml:130: Buttons in button bars should be borderless; use style="?android:attr/buttonBarButtonStyle" (and ?android:attr/buttonBarStyle on the parent)
 127             android:minWidth="100dip"
 128             android:text="@string/login_activity_ok_button"
 129             android:onClick="handleLogin" />
 130         <Button                                                                                     
 131             android:id="@+id/cancel_button"
 132             android:layout_width="wrap_content"
 133             android:layout_height="wrap_content"
../../src/main/res/layout/pin_activity.xml:78: Buttons in button bars should be borderless; use style="?android:attr/buttonBarButtonStyle" (and ?android:attr/buttonBarStyle on the parent)
 75         android:paddingLeft="2dip"
 76         android:orientation="horizontal"
 77         android:paddingRight="2dip">
 78         <Button                                                                                     
 79             android:id="@+id/ok_button"
 80             android:layout_width="wrap_content"
 81             android:layout_height="wrap_content"
../../src/main/res/layout/pin_activity.xml:85: Buttons in button bars should be borderless; use style="?android:attr/buttonBarButtonStyle" (and ?android:attr/buttonBarStyle on the parent)
 82             android:minWidth="50dip"
 83             android:text="@string/pin_activity_ok_button"
 84          />
 85         <Button                                                                                     
 86             android:id="@+id/cancel_button"
 87             android:layout_width="wrap_content"
 88             android:layout_height="wrap_content"
../../src/main/res/layout/prompt_activity.xml:48: Buttons in button bars should be borderless; use style="?android:attr/buttonBarButtonStyle" (and ?android:attr/buttonBarStyle on the parent)
 45         android:paddingTop="4dip"
 46         android:paddingLeft="2dip"
 47         android:paddingRight="2dip">
 48         <Button                                                                                     
 49             android:id="@+id/ok_button"
 50             android:layout_width="wrap_content"
 51             android:layout_height="wrap_content"
ButtonStyle Usability Warning Priority 5/10

Missing inputType

../../src/main/res/layout/channel.xml:49: This text field does not specify an inputType
 46             android:text="New Value"
 47         />
 48 
 49         <EditText android:layout_height="wrap_content"                                              
 50                  android:layout_width="match_parent"
 51                  android:layout_weight="1"
 52                  android:id="@+id/channelStatus"/>
../../src/main/res/layout/sitecard.xml:21: This text field does not specify an inputType
 18             android:text="Card #"
 19         />
 20 
 21        <EditText                                                                                    
 22             android:id="@+id/carddpsid_id"
 23             android:layout_width="match_parent"
 24             android:layout_height="wrap_content"
../../src/main/res/layout/siteprice.xml:43: This text field does not specify an inputType
 40             android:text="Enter Price"
 41         />
 42 
 43         <EditText android:layout_height="wrap_content"                                              
 44                  android:layout_width="match_parent"
 45                  android:layout_weight="1"
 46                  android:id="@+id/productprice"/>
../../src/main/res/layout/siteqty.xml:43: This text field does not specify an inputType
 40             android:text="Enter Qty"
 41         />
 42 
 43         <EditText android:layout_height="wrap_content"                                              
 44                  android:layout_width="match_parent"
 45                  android:layout_weight="1"
 46                  android:id="@+id/productqty"/>
TextFields Usability Warning Priority 5/10

Use Autofill

../../src/main/res/layout/channel.xml:49: Missing autofillHints attribute
 46             android:text="New Value"
 47         />
 48 
 49         <EditText android:layout_height="wrap_content"                                              
 50                  android:layout_width="match_parent"
 51                  android:layout_weight="1"
 52                  android:id="@+id/channelStatus"/>
../../src/main/res/layout/login_activity.xml:50: Missing autofillHints attribute
  47                 android:layout_width="wrap_content"
  48                 android:layout_height="wrap_content"
  49                 android:text="@string/login_activity_devname_label" />
  50             <EditText                                                                               
  51                 android:id="@+id/devname_edit"
  52                 android:singleLine="true"
  53                 android:layout_width="fill_parent"
../../src/main/res/layout/login_activity.xml:67: Missing autofillHints attribute
  64                 android:layout_width="wrap_content"
  65                 android:layout_height="wrap_content"
  66                 android:text="@string/login_activity_username_label" />
  67             <EditText                                                                               
  68                 android:id="@+id/username_edit"
  69                 android:singleLine="true"
  70                 android:layout_width="fill_parent"
../../src/main/res/layout/login_activity.xml:93: Missing autofillHints attribute
  90                 android:layout_width="wrap_content"
  91                 android:layout_height="wrap_content"
  92                 android:text="@string/login_activity_password_label" />
  93             <EditText                                                                               
  94                 android:id="@+id/password_edit"
  95                 android:singleLine="true"
  96                 android:layout_width="fill_parent"
../../src/main/res/layout/pin_activity.xml:49: Missing autofillHints attribute
 46                 android:layout_width="wrap_content"
 47                 android:layout_height="wrap_content"
 48                 android:text="@string/pin_activity_pinnum_label" />
 49             <EditText                                                                               
 50                 android:id="@+id/pin_edit"
 51                 android:singleLine="true"
 52                 android:layout_width="fill_parent"
../../src/main/res/layout/sitecard.xml:21: Missing autofillHints attribute
 18             android:text="Card #"
 19         />
 20 
 21        <EditText                                                                                    
 22             android:id="@+id/carddpsid_id"
 23             android:layout_width="match_parent"
 24             android:layout_height="wrap_content"
../../src/main/res/layout/siteprice.xml:43: Missing autofillHints attribute
 40             android:text="Enter Price"
 41         />
 42 
 43         <EditText android:layout_height="wrap_content"                                              
 44                  android:layout_width="match_parent"
 45                  android:layout_weight="1"
 46                  android:id="@+id/productprice"/>
../../src/main/res/layout/siteqty.xml:43: Missing autofillHints attribute
 40             android:text="Enter Qty"
 41         />
 42 
 43         <EditText android:layout_height="wrap_content"                                              
 44                  android:layout_width="match_parent"
 45                  android:layout_weight="1"
 46                  android:id="@+id/productqty"/>
Autofill Usability Warning Priority 3/10

Missing accessibility label

../../src/main/res/layout/channel.xml:49: Missing accessibility label: provide either a view with an android:labelFor that references this view or provide an android:hint
 46             android:text="New Value"
 47         />
 48 
 49         <EditText android:layout_height="wrap_content"                                              
 50                  android:layout_width="match_parent"
 51                  android:layout_weight="1"
 52                  android:id="@+id/channelStatus"/>
../../src/main/res/layout/login_activity.xml:50: Missing accessibility label: provide either a view with an android:labelFor that references this view or provide an android:hint
  47                 android:layout_width="wrap_content"
  48                 android:layout_height="wrap_content"
  49                 android:text="@string/login_activity_devname_label" />
  50             <EditText                                                                               
  51                 android:id="@+id/devname_edit"
  52                 android:singleLine="true"
  53                 android:layout_width="fill_parent"
../../src/main/res/layout/login_activity.xml:67: Missing accessibility label: provide either a view with an android:labelFor that references this view or provide an android:hint
  64                 android:layout_width="wrap_content"
  65                 android:layout_height="wrap_content"
  66                 android:text="@string/login_activity_username_label" />
  67             <EditText                                                                               
  68                 android:id="@+id/username_edit"
  69                 android:singleLine="true"
  70                 android:layout_width="fill_parent"
../../src/main/res/layout/login_activity.xml:93: Missing accessibility label: provide either a view with an android:labelFor that references this view or provide an android:hint
  90                 android:layout_width="wrap_content"
  91                 android:layout_height="wrap_content"
  92                 android:text="@string/login_activity_password_label" />
  93             <EditText                                                                               
  94                 android:id="@+id/password_edit"
  95                 android:singleLine="true"
  96                 android:layout_width="fill_parent"
../../src/main/res/layout/pin_activity.xml:49: Missing accessibility label: provide either a view with an android:labelFor that references this view or provide an android:hint
 46                 android:layout_width="wrap_content"
 47                 android:layout_height="wrap_content"
 48                 android:text="@string/pin_activity_pinnum_label" />
 49             <EditText                                                                               
 50                 android:id="@+id/pin_edit"
 51                 android:singleLine="true"
 52                 android:layout_width="fill_parent"
../../src/main/res/layout/sitecard.xml:21: Missing accessibility label: provide either a view with an android:labelFor that references this view or provide an android:hint
 18             android:text="Card #"
 19         />
 20 
 21        <EditText                                                                                    
 22             android:id="@+id/carddpsid_id"
 23             android:layout_width="match_parent"
 24             android:layout_height="wrap_content"
../../src/main/res/layout/siteprice.xml:43: Missing accessibility label: provide either a view with an android:labelFor that references this view or provide an android:hint
 40             android:text="Enter Price"
 41         />
 42 
 43         <EditText android:layout_height="wrap_content"                                              
 44                  android:layout_width="match_parent"
 45                  android:layout_weight="1"
 46                  android:id="@+id/productprice"/>
../../src/main/res/layout/siteqty.xml:43: Missing accessibility label: provide either a view with an android:labelFor that references this view or provide an android:hint
 40             android:text="Enter Qty"
 41         />
 42 
 43         <EditText android:layout_height="wrap_content"                                              
 44                  android:layout_width="match_parent"
 45                  android:layout_weight="1"
 46                  android:id="@+id/productqty"/>
LabelFor Accessibility Warning Priority 2/10

TextView Internationalization

../../src/main/java/com/dwanta/android/dap/authenticator/AuthenticatorActivity.java:300: String literal in setText can not be translated. Use Android resources instead.
 297   if (TextUtils.isEmpty(mUsername) || TextUtils.isEmpty(mPassword) || TextUtils.isEmpty(mDevname)) {
 298       setContentView(R.layout.login_activity);
 299       mMessage = (TextView) findViewById(R.id.message);
 300       mMessage.setText("please enter user/pass and device.");                                 
 301       Log.d(TAG, "message displayed");
 302 
 303       mUsernameEdit = (EditText) findViewById(R.id.username_edit);
../../src/main/java/com/dwanta/android/dap/activities/DapActivity.java:352: Do not concatenate text displayed with setText. Use resource string with placeholders.
 349           siteAdmin(mSiteDevice);
 350         }
 351       });
 352       sitebutton.setText("run store #" + mSiteDevice);                                              
 353       ll2.addView(sitebutton);
 354 
 355     }
../../src/main/java/com/dwanta/android/dap/activities/DapActivity.java:352: String literal in setText can not be translated. Use Android resources instead.
 349           siteAdmin(mSiteDevice);
 350         }
 351       });
 352       sitebutton.setText("run store #" + mSiteDevice);                                              
 353       ll2.addView(sitebutton);
 354 
 355     }
../../src/main/java/com/dwanta/android/dap/activities/DechoActivity.java:275: Do not concatenate text displayed with setText. Use resource string with placeholders.
 272               if( jsonbuttons[i].getId() == i2 ) {
 273                 Log.d(TAG, "found button");
 274                 String tag = jsonbuttons[i].getTag().toString();
 275                 jsonbuttons[i].setText(tag + " UPDATED VALUE " + val);                              
 276               }
 277             }
 278           }
../../src/main/java/com/dwanta/android/dap/activities/DechoActivity.java:275: String literal in setText can not be translated. Use Android resources instead.
 272               if( jsonbuttons[i].getId() == i2 ) {
 273                 Log.d(TAG, "found button");
 274                 String tag = jsonbuttons[i].getTag().toString();
 275                 jsonbuttons[i].setText(tag + " UPDATED VALUE " + val);                              
 276               }
 277             }
 278           }
SetTextI18n Internationalization Warning Priority 6/10

Hardcoded text

../../src/main/res/layout/channel.xml:46: Hardcoded string "New Value", should use @string resource
 43             android:layout_width="wrap_content"
 44             android:layout_height="wrap_content"
 45             android:layout_marginTop="5dip"
 46             android:text="New Value"                                                                
 47         />
 48 
 49         <EditText android:layout_height="wrap_content"
../../src/main/res/layout/dapmain.xml:17: Hardcoded string "Connected Status: ", should use @string resource
 14             android:layout_width="wrap_content"
 15             android:layout_height="wrap_content"
 16             android:layout_marginTop="5dip"
 17             android:text="Connected Status: "                                                       
 18         />
 19 
 20        <ToggleButton 
../../src/main/res/layout/dapmain.xml:24: Hardcoded string "On", should use @string resource
 21            android:id="@+id/svctogglebutton"
 22            android:layout_width="wrap_content"
 23            android:layout_height="wrap_content"
 24            android:textOn="On"                                                                      
 25            android:textOff="Off"
 26            android:onClick="onSvcToggleClicked"/>
../../src/main/res/layout/dapmain.xml:25: Hardcoded string "Off", should use @string resource
 22            android:layout_width="wrap_content"
 23            android:layout_height="wrap_content"
 24            android:textOn="On"
 25            android:textOff="Off"                                                                    
 26            android:onClick="onSvcToggleClicked"/>
 27 
 28        <Button android:id="@+id/delete_button"
../../src/main/res/layout/dechomain.xml:15: Hardcoded string "Volume", should use @string resource
 12             android:layout_height="wrap_content"
 13             android:layout_alignParentLeft="true"
 14             android:layout_alignParentTop="true"
 15             android:text="Volume"                                                                   
 16             android:textAppearance="?android:attr/textAppearanceLarge" >
 17         </TextView>
HardcodedText Internationalization Warning Priority 5/10

Using left/right instead of start/end attributes

../../src/main/res/layout/dechomain.xml:13: Consider replacing android:layout_alignParentLeft with android:layout_alignParentStart="true" to better support right-to-left layouts
 10             android:id="@+id/PRICEtextViewProgressID"
 11             android:layout_width="wrap_content"
 12             android:layout_height="wrap_content"
 13             android:layout_alignParentLeft="true"                                                   
 14             android:layout_alignParentTop="true"
 15             android:text="Volume"
 16             android:textAppearance="?android:attr/textAppearanceLarge" >
../../src/main/res/layout/dechomain.xml:23: Consider replacing android:layout_alignParentLeft with android:layout_alignParentStart="true" to better support right-to-left layouts
 20             android:id="@+id/PRICEseekBarID"
 21             android:layout_width="match_parent"
 22             android:layout_height="wrap_content"
 23             android:layout_alignParentLeft="true"                                                   
 24             android:layout_marginTop="26dp"
 25             android:max="150" >
 26         </SeekBar>
../../src/main/res/layout/dechomain.xml:40: Consider replacing android:layout_alignParentRight with android:layout_alignParentEnd="true" to better support right-to-left layouts
 37             android:id="@+id/PRICEinitialvaluetextID2"
 38             android:layout_width="wrap_content"
 39             android:layout_height="wrap_content"
 40             android:layout_alignParentRight="true"                                                  
 41             android:layout_below="@+id/PRICEseekBarID"
 42             android:text="max" />
../../src/main/res/layout-land/fragment_camera2_basic.xml:35: Consider replacing android:layout_toRightOf with android:layout_toEndOf="@id/texture" to better support right-to-left layouts
 32         android:layout_alignParentEnd="true"
 33         android:layout_alignParentTop="true"
 34         android:layout_below="@id/texture"
 35         android:layout_toRightOf="@id/texture"                                                      
 36         android:background="#4285f4"
 37         android:orientation="horizontal">
../../src/main/res/layout/fragment_camera2_basic.xml:48: Use "end" instead of "right" to ensure correct behavior in right-to-left locales
 45             style="@android:style/Widget.Material.Light.Button.Borderless"
 46             android:layout_width="wrap_content"
 47             android:layout_height="wrap_content"
 48             android:layout_gravity="center_vertical|right"                                          
 49             android:padding="20dp"
 50             android:src="@drawable/ic_action_info" />
RtlHardcoded Bidirectional Text Internationalization Warning Priority 5/10

Included Additional Checks

This card lists all the extra checks run by lint, provided from libraries, build configuration and extra flags. This is included to help you verify whether a particular check is included in analysis when configuring builds. (Note that the list does not include the hundreds of built-in checks into lint, only additional ones.)

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.

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