프로젝트
GitHub에서 보기
stfalcon-studio/SmsVerifyCatcher
소개
앱에서 전화번호를 인증할 수 있는 Android 라이브러리입니다. SMS의 인증 코드를 앱으로 자동 복사합니다. Stfalcon 제작
웹 및 앱 개발측정된 스타 증가
- in 24h
- -1
- in 7 days
- -1
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalSmsVerifyCatcher

A library for implementing interception of SMS with a verification code using a few lines of code.
Who we are
Need iOS and Android apps, MVP development or prototyping? Contact us via [email protected]. We develop software since 2009, and we're known experts in this field. Check out our portfolio and see more libraries from stfalcon-studio.
Download
- Add jitpack to the root build.gradle file of your project at the end of repositories.
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
- Add the dependency
dependencies {
...
implementation 'com.github.stfalcon-studio:SmsVerifyCatcher:[last_version]'
}
Usage
Add permissions to AndroidManifest.xml:
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.READ_SMS" />
Init SmsVerifyCatcher in method like onCreate activity:
smsVerifyCatcher = new SmsVerifyCatcher(this, new OnSmsCatchListener<String>() {
@Override
public void onSmsCatch(String message) {
String code = parseCode(message);//Parse verification code
etCode.setText(code);//set code in edit text
//then you can send verification code to server
}
});
Override activity lifecicle methods:
@Override
protected void onStart() {
super.onStart();
smsVerifyCatcher.onStart();
}
@Override
protected void onStop() {
super.onStop();
smsVerifyCatcher.onStop();
}
/**
* need for Android 6 real time permissions
*/
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
smsVerifyCatcher.onRequestPermissionsResult(requestCode, permissions, grantResults);
}
You can set phone number filter:
smsVerifyCatcher.setPhoneNumberFilter("777");
or set message filter via regexp:
smsVerifyCatcher.setFilter("<regexp>");
That's all! Take a look at the sample project for more information
License
Copyright 2017 stfalcon.com
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.
관련 프로젝트 살펴보기
불러오는 중…