This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
<compatible-screens> | |
<!-- small size screens --> | |
<screen | |
android:screenDensity="mdpi" | |
android:screenSize="small"/> | |
<screen | |
android:screenDensity="hdpi" | |
android:screenSize="small"/> | |
<screen | |
android:screenDensity="xhdpi" |
This file contains 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
import com.tempos21.android.commons.utils.T21Log; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.pm.ApplicationInfo; | |
import android.content.pm.PackageManager; | |
import android.net.Uri; | |
public class OpenAppUtils { |
This file contains 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
###Android### | |
# built application files | |
*.apk | |
*.ap_ | |
# files for the dex VM | |
*.dex | |
# Java class files |
This file contains 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
/** | |
* This method is used to search a string in a list of strings with case insensitive | |
* | |
* @param search text to search | |
* @param list list of string where to search | |
* | |
* @return true if it is contained in the list | |
*/ | |
public static boolean stringListContainsCaseInsensitive(String search, List<String> list) { | |
boolean contains = false; |
This file contains 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
/** | |
* Class with util methods about screen size and density | |
*/ | |
public class DensityUtils { | |
/** | |
* Converts the given device independent pixels (DIP) value into the corresponding pixels | |
* value for the current screen. | |
* | |
* @param context Context instance |
This file contains 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
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.InputStreamReader; | |
/** | |
* Class to detect when the device is rooted | |
*/ | |
public class RootDetectionUtils { |