This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git ignore file | |
| # Built application files | |
| *.apk | |
| *.aar | |
| *.ap_ | |
| *.aab | |
| # Files for the ART/Dalvik VM | |
| *.dex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.examp.three.common.fileupload; | |
| import android.content.ContentUris; | |
| import android.content.Context; | |
| import android.database.Cursor; | |
| import android.database.DatabaseUtils; | |
| import android.net.Uri; | |
| import android.os.Environment; | |
| import android.provider.DocumentsContract; | |
| import android.provider.MediaStore; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.examp.three.common.fileupload; | |
| import android.content.ContentUris; | |
| import android.content.Context; | |
| import android.database.Cursor; | |
| import android.database.DatabaseUtils; | |
| import android.net.Uri; | |
| import android.os.Environment; | |
| import android.provider.DocumentsContract; | |
| import android.provider.MediaStore; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Add project specific ProGuard rules here. | |
| # You can control the set of applied configuration files using the | |
| # proguardFiles setting in build.gradle. | |
| # | |
| # For more details, see | |
| # http://developer.android.com/guide/developing/tools/proguard.html | |
| # If your project uses WebView with JS, uncomment the following | |
| # and specify the fully qualified class name to the JavaScript interface | |
| # class: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Commands Usages | |
| git tag 1.1.2 | |
| git commit -a -m "msg" | |
| git reset .travis.yml | |
| git push origin tag 1.1.4" | |
| // Git Tag Create | |
| commit tag Push |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Commands Usages | |
| git rm -r --cached . - remove local commits | |
| git tag 1.1.2 | |
| git commit -a -m "msg" | |
| git reset .travis.yml | |
| git push origin tag 1.1.4" | |
| // Git Tag Create | |
| commit tag Push |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static String parseContact(String contact, String countrycode) { | |
| PhoneNumber phoneNumber = null; | |
| PhoneNumberUtil phoneNumberUtil = PhoneNumberUtil.getInstance(); | |
| String finalNumber = null; | |
| String isoCode = phoneNumberUtil.getRegionCodeForCountryCode(Integer.parseInt(countrycode)); | |
| boolean isValid = false; | |
| PhoneNumberType isMobile = null; | |
| try { | |
| phoneNumber = phoneNumberUtil.parse(contact, isoCode); | |
| isValid = phoneNumberUtil.isValidNumber(phoneNumber); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Question 1 : | |
| Fatal Exception: java.lang.OutOfMemoryError: | |
| Failed to allocate a 115252268 byte allocation with 16777216 free bytes and 90MB until OOM | |
| OOM - OutOfMemoryError in java | |
| solutions : | |
| You also can set a larger memory heap witting android:largeHeap="true" | |
| (OOM) in Java is one problem which is more due to system's limitation (memory) | |
| rather than due to programming mistakes in most cases though in certain cases you could have memory leak | |
| which causing OutOfMemoryError. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static boolean isIFSCCODEValid(String ifsccode) | |
| { | |
| ///^[A-Za-z]{4}[0-9]{6,7}$/ | |
| String regExp = "^[A-Z]{4}[0][A-Z0-9]{6}$"; | |
| boolean isvalid = false; | |
| if (ifsccode.length() > 0) { | |
| isvalid = ifsccode.matches(regExp); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Lazy Loading Design Pattern | |
| Lazy loading is a concept where we delay the loading of object until the point where we need it. | |
| Lazy loading is just a fancy name given to the process of initializing a class when it’s actually needed. | |
| In simple words, Lazy loading is a software design pattern where the initialization of an object occurs only | |
| when it is actually needed and not before to preserve simplicity of usage and improve performance. | |
| Lazy loading is essential when the cost of object creation is very high and the use of the object is very rare. | |
| So this is the scenario where it’s worth implementing lazy loading. | |
| The fundamental idea of lazy loading is to load object/data when needed. | |