@@ -95,7 +95,7 @@ sharedPreferenceData.setValue("keyname", "value for that keyname");
9595// with key as 'token' to get the token
9696//
9797// return - this method will return result from server in string format
98- //
98+
9999ApiServices apiServices = new ApiServices (context);
100100apiServices. makeApiCall(apiName, requestMethod, parameters, jsonObject, hasToken);
101101```
@@ -166,7 +166,7 @@ dbHelper.executeDatabaseOperation(tableName, operation, values, hasConditions, c
166166// it is similar as in executeDatabaseOperation method's conditionalValues parameter.
167167//
168168// return - this method wull return Cursor with values or will return null
169- //
169+
170170dbHelper. executeSelectQuery(tableName, values, hasConditions, conditionalValues);
171171```
172172```
@@ -190,7 +190,7 @@ dbHelper.executeSelectQuery(tableName, values, hasConditions, conditionalValues)
190190//
191191// return - this method wull return count of records in the table
192192// either for entire table or for a single column
193- //
193+
194194dbHelper.getRecordCount(tableName, values, hasConditions, conditionalValues);
195195```
196196
@@ -301,7 +301,7 @@ dbHelper.getRecordCount(tableName, values, hasConditions, conditionalValues);
301301 app : typeface =" QuattrocentoSans-Regular.ttf" />
302302```
303303
304- ### Location
304+ ### MyLocation class
305305
306306> ** This class will get the current location of the user.**
307307``` java
@@ -336,7 +336,7 @@ private MyLocation.LocationResult locationResult = new Mylocation.LocationResult
336336myLocation. getLocation(this , locationResult);
337337```
338338
339- ### Location Address
339+ ### LocationAddress class
340340
341341> ** This class helps your to get the address of the current location or by using latitude and longitude.**
342342``` java
@@ -348,7 +348,6 @@ LocationAddress.getAddressFromLocation(
348348 mLatitude, mLongitude, this ,
349349 new GeocoderHandler ());
350350
351-
352351// this is the GeocoderHandler class where you'll get the address
353352private class GeocoderHandler extends Handler
354353 {
@@ -360,8 +359,9 @@ private class GeocoderHandler extends Handler
360359 case 1 :
361360
362361 Bundle bundle = msg. getData();
363-
362+
364363 // note that subThoroughFare may return null sometimes.
364+ // so you should manage it accordling.
365365 String address = bundle. getString(" subThoroughFare" ) + " , " +
366366 bundle. getString(" thoroughFare" );
367367
@@ -385,3 +385,79 @@ private class GeocoderHandler extends Handler
385385 }
386386```
387387
388+ ### FontHelper Class
389+ > ** This class helps you to apply the font to the entire layout file. This file will apply the required font to every view of the layout file.**
390+
391+ ``` java
392+ // Example usage
393+ FontHelper . applyFont(context, idOfYourParentLayout, " fonts/QuattrocentoSans-Regular.ttf" );
394+ ```
395+
396+ ### InternetConection class
397+ > ** This class will help you check if internet connection is available or not.**
398+
399+ ``` java
400+ InternetConnection ic = InternetConnection . getInstanceInternet(context);
401+ if (ic. isNetworkAvailable())
402+ {
403+ // internet is available
404+ }
405+ else
406+ {
407+ // internet is not available
408+ }
409+ ```
410+
411+ ### TextUtitlities class
412+
413+ > ** This class helps you replaces values, like replacing 'null' with empty string, replacing true or false with 1 or 0, etc.**
414+
415+ ``` java
416+ // example: for replacing null value from a string.
417+ TextUtilities . replaceNull(string); // this will return string value.
418+
419+ // example: for replacing True or False from a string.
420+ TextUtilities . replaceTrueOrFalse(string); // this will return int value.
421+ ```
422+
423+ ### Validator class
424+ > ** This class helps you to validate some common fields like email, mobile number, numbers only, etc.**
425+
426+ ``` java
427+ // validating an email id, returns true or false.
428+ Validator . validateEmail(" example@gmail.com" );
429+
430+ // validating mobile no, returns true or false.
431+ Validator . validateMobile(" 9999955555" );
432+
433+ // validating Pan Card (For Indian Format), returns true or false.
434+ Validator . validatePanCard(" AAAAA0000A" );
435+
436+ // only numbers validation, returns true or false.
437+ Validator . onlyNumbers(" 123456" );
438+
439+ // only characters validation, returns true or false.
440+ Validator . onlyCharacters(" abcd" );
441+
442+ // atLeastOneLowerCase validation, returns true or false.
443+ Validator . atLeastOneLowerCase(" ABcD" );
444+
445+ // atLeastOneUpperCase validation, returns true or false.
446+ Validator . atLeastOneUpperCase(" abCd" );
447+
448+ // atLeastOneNumber validation, returns true or false.
449+ Validator . atLeastOneNumber(" abcd1" );
450+
451+ // nonEmpty validation, returns true or false.
452+ Validator . nonEmpty(" d" );
453+
454+ // startsWithNonNumber validation, returns true or false.
455+ Validator . startsWithNonNumber(" a12" );
456+
457+ // noSpecialCharacters validation, returns true or false.
458+ Validator . noSpecialCharacters(" abcd123" );
459+
460+ // atLeastOneSpecialCharacters validation, returns true or false.
461+ Validator . atLeastOneSpecialCharacters(" abcd@123" );
462+
463+ ```
0 commit comments