Skip to content

Android developers should collect the following utils(updating)

Notifications You must be signed in to change notification settings

bonebug/AndroidUtilCode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Android developers should collect the following utils

中文版README


Directory is shown below:

  • About App→AppUtils.java
  • isInstallApp
  • installApp
  • installAppSilent
  • uninstallApp
  • uninstallAppSilent
  • launchApp
  • getAppPackageName
  • getAppDetailsSettings
  • getAppName
  • getAppIcon
  • getAppPath
  • getAppVersionName
  • getAppVersionCode
  • getAppSignature
  • getAppSignatureSHA1
  • isSystemApp
  • isAppForeground
  • getAppInfo
  • getAppsInfo
  • cleanAppData
  • About Bar→BarUtils.java
  • setTransparentStatusBar
  • hideStatusBar
  • getStatusBarHeight
  • isStatusBarExists
  • getActionBarHeight
  • showNotificationBar
  • hideNotificationBar
  • About Clean→CleanUtils.java
  • cleanInternalCache
  • cleanInternalFiles
  • cleanInternalDbs
  • cleanInternalDbByName
  • cleanInternalSP
  • cleanExternalCache
  • cleanCustomCache
  • About Convert→ConvertUtils.javaTest
  • bytes2HexStringhexString2Bytes
  • chars2Bytesbytes2Chars
  • byte2Sizesize2Byte
  • byte2FitSize
  • bytes2Bitsbits2Bytes
  • input2OutputStreamoutput2InputStream
  • inputStream2Bytesbytes2InputStream
  • outputStream2Bytesbytes2OutputStream
  • inputStream2Stringstring2InputStream
  • outputStream2Stringstring2OutputStream
  • bitmap2Bytesbytes2Bitmap
  • drawable2Bitmapbitmap2Drawable
  • drawable2Bytesbytes2Drawable
  • view2Bitmap
  • dp2pxpx2dp
  • sp2pxpx2sp
  • About Device→DeviceUtils.java
  • isRoot
  • getSDKVersion
  • getAndroidID
  • getMacAddress
  • getManufacturer
  • getModel
  • About Encode→EncodeUtils.javaTest
  • urlEncode
  • urlDecode
  • base64Encodebase64Encode2String
  • base64Decode
  • base64UrlSafeEncode
  • htmlEncode
  • htmlDecode
  • About Encrypt→EncryptUtils.javaTest
  • encryptMD2encryptMD2ToString
  • encryptMD5encryptMD5ToString
  • encryptMD5FileencryptMD5File2String
  • encryptSHA1encryptSHA1ToString
  • encryptSHA224**encryptSHA224ToString
  • encryptSHA256encryptSHA256ToString
  • encryptSHA384encryptSHA384ToString
  • encryptSHA512encryptSHA512ToString
  • encryptHmacMD5encryptHmacMD5ToString
  • encryptHmacSHA1encryptHmacSHA1ToString
  • encryptHmacSHA224encryptHmacSHA224ToString
  • encryptHmacSHA256encryptHmacSHA256ToString
  • encryptHmacSHA384encryptHmacSHA384ToString
  • encryptHmacSHA512encryptHmacSHA512ToString
  • encryptDESencryptDES2HexStringencryptDES2Base64
  • decryptDESdecryptHexStringDESdecryptBase64DES
  • encrypt3DESencrypt3DES2HexStringencrypt3DES2Base64
  • decrypt3DESdecryptHexString3DESdecryptBase64_3DES
  • encryptAESencryptAES2HexStringencryptAES2Base64
  • decryptAESdecryptHexStringAESdecryptBase64AES
  • About File→FileUtils.javaTest
  • getFileByPath
  • isFileExists
  • isDir
  • isFile
  • createOrExistsDir
  • createOrExistsFile
  • createFileByDeleteOldFile
  • copyDir
  • copyFile
  • moveDir
  • moveFile
  • deleteDir
  • deleteFile
  • listFilesInDir
  • listFilesInDir
  • listFilesInDirWithFilter
  • listFilesInDirWithFilter
  • listFilesInDirWithFilter
  • listFilesInDirWithFilter
  • searchFileInDir
  • writeFileFromIS
  • writeFileFromString
  • getFileCharsetSimple
  • getFileLines
  • readFile2List
  • readFile2SB
  • getFileSize
  • getFileMD5
  • getDirName
  • getFileName
  • getFileNameNoExtension
  • getFileExtension
  • About Image→ImageUtils.java
  • bitmap2Bytesbytes2Bitmap
  • drawable2Bitmapbitmap2Drawable
  • drawable2Bytesbytes2Drawable
  • getBitmap
  • scale
  • clip
  • skew
  • rotate
  • getRotateDegree
  • toRound
  • toRoundCorner
  • fastBlur
  • renderScriptBlur
  • stackBlur
  • addFrame
  • addReflection
  • addTextWatermark
  • addImageWatermark
  • toAlpha
  • toGray
  • save
  • isImage
  • getImageType
  • compressByScale
  • compressByQuality
  • compressBySampleSize
  • About Intent→IntentUtils.java
  • getInstallAppIntent
  • getUninstallAppIntent
  • getLaunchAppIntent
  • getAppDetailsSettingsIntent
  • getShareTextIntent
  • getShareImageIntent
  • getComponentIntent
  • getShutdownIntnet
  • getCaptureIntent
  • About Keyboard→KeyboardUtils.java
  • hideSoftInput
  • clickBlankArea2HideSoftInput0
  • showSoftInput
  • toggleSoftInput
  • isShowSoftInput
  • About Network→NetworkUtils.java
  • openWirelessSettings
  • isAvailable
  • isConnected
  • is4G
  • isWifiConnected
  • getNetworkOperatorName
  • getPhoneType
  • getNetWorkTypegetNetWorkTypeName
  • About Phone→PhoneUtils.java
  • isPhone
  • getIMEI
  • getIMSI
  • getPhoneStatus
  • dial
  • call
  • sendSms
  • getAllContactInfo
  • getContantNum
  • getAllSMS
  • About Regex→RegexUtils.javaTest
  • isMobileSimple
  • isMobileExact
  • isTel
  • isIDCard15
  • isIDCard18
  • isEmail
  • isURL
  • isChz
  • isUsername
  • isDate
  • isIP
  • isMatch
  • About Screen→ScreenUtils.java
  • getDeviceWidthgetDeviceHeight
  • setTransparentStatusBar
  • hideStatusBar
  • getStatusBarHeight
  • isStatusBarExists
  • getActionBarHeight
  • showNotificationBar
  • hideNotificationBar
  • setLandscape
  • snapShotWithStatusBarsnapShotWithoutStatusBar
  • isScreenLock
  • About SDCard→SDCardUtils.java
  • isSDCardEnable
  • getDataPath
  • getSDCardPath
  • getFreeSpace
  • getSDCardInfo
  • About Size→SizeUtils.java
  • dp2pxpx2dp
  • sp2pxpx2sp
  • applyDimension
  • forceGetViewSize
  • measureView
  • About SP→SPUtils.javaTest
  • SPUtils
  • putString
  • getString
  • putInt
  • getInt
  • putLong
  • getLong
  • putFloat
  • getFloat
  • putBoolean
  • getBoolean
  • getAll
  • remove
  • contains
  • clear
  • About String→StringUtils.javaTest
  • isEmpty
  • isSpace
  • null2Length0
  • length
  • upperFirstLetter
  • lowerFirstLetter
  • reverse
  • toDBC
  • toSBC
  • getPYFirstLetter
  • cn2PY
  • About ThreadPool→ThreadPoolUtils.java
  • ThreadPoolUtils
  • execute
  • execute
  • shutDown
  • shutDownNow
  • isShutDown
  • isTerminated
  • awaitTermination
  • submit
  • submit
  • invokeAllinvokeAny
  • schedule
  • schedule
  • scheduleWithFixedRatescheduleWithFixedDelay
  • About Time→TimeUtils.javaTest
  • milliseconds2String
  • string2Milliseconds
  • string2Date
  • date2String
  • date2Milliseconds
  • milliseconds2Date
  • milliseconds2Unit
  • getIntervalTime
  • getCurTimeMillsgetCurTimeStringgetCurTimeDate
  • getIntervalByNow
  • isLeapYear
  • getWeekgetWeekIndex
  • getWeekgetWeekIndex
  • getWeekOfMonth
  • getWeekOfYear
  • About Toast→ToastUtils.java
  • init
  • showShortToastSafe
  • showLongToastSafe
  • showShortToast
  • showLongToast
  • cancelToast
  • About Zip→ZipUtils.javaTest
  • zipFiles
  • zipFile
  • unzipFiles
  • unzipFile
  • unzipFileByKeyword
  • getFilesPath
  • getComments
  • getEntries

I'm so sorry for that the code is annotated with Chinese.

Download


Gradle:

compile 'com.blankj:utilcode:1.3.0'

Proguard


-keep class com.blankj.utilcode.** { *; }
-keep classmembers class com.blankj.utilcode.** { *; }
-dontwarn com.blankj.utilcode.**

License


Copyright 2016 Blankj

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

	http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Android developers should collect the following utils(updating)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%