####Kotlin
fun CharSequence.isEmail() = this.matches("[a-zA-Z0-9._-]+@[a-z]+\\.+[a-z]+".toRegex())
val stringImpl : String = "[email protected]"
####Kotlin
fun CharSequence.isEmail() = this.matches("[a-zA-Z0-9._-]+@[a-z]+\\.+[a-z]+".toRegex())
val stringImpl : String = "[email protected]"
testCompile 'org.powermock:powermock-api-mockito:1.6.5'
testCompile 'org.powermock:powermock-module-junit4-rule-agent:1.6.5'
testCompile 'org.powermock:powermock-module-junit4-rule:1.6.5'
testCompile 'org.powermock:powermock-module-junit4:1.6.5'
#I copy this from various places | |
#Debug when crashing by looking at: | |
#/app/build/outputs/mapping/normal/release | |
#mapping.txt use the class to search in here. | |
# | |
#export path for android | |
export ANDROID_HOME=/Users/username/Documents/Android/sdk | |
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tool | |
#to capture screen from android phone | |
function cap() { | |
LOCATIONPHONE=sdcard/screen_$(date "+%Y%m%d%H%M%S").png |
https://github.com/XVimProject/XVim/blob/master/INSTALL_Xcode8.md
cd ~/Library
git clone https://github.com/XVimProject/XVim.git
/** | |
*init service to check whether the phone use any security | |
*/ | |
KeyguardManager keyguardManager = getSystemService(KeyguardManager.class); | |
/** | |
* if no keyguard then you cannot use fingerprint scanner. | |
*/ | |
if (!keyguardManager.isKeyguardSecure()) { | |
// Show a message that the user hasn't set up a fingerprint or lock screen. |
###There is no official maven-based way to install OpenCV on Android. You have to download and set it up to your project.
File>New>Import Module
and select sdk/java
└── sdk
├── etc
├── java
└── native
You need to initialize TextureView
before opening a camera.
TextureView
is for displaying the image from camera on the device.
However, you cannot use it unless the texture is ready, either because the screen is currently off or it is initializing.
You should check mTextureView.isAvailable()
before opening your camera. Else you will mTextureView.setSurfaceTextureListener()
.
And open your camera in the callback method onSurfaceTextureListener
.
Before opening your camera you should check for a camera permission first.