패키지, 저장소 및 앱 카테고리 검색

sms_user_consent 표지
패키지 상세v0.1.0

sms_user_consent

사용자의 전화번호(듀얼 시م 지원)와/또는 SMS 읽기 동의를 요청하지만, 추가 권한을 추가하지 않음

Android
30일 다운로드
93
좋아요
85
Pub 점수
160

패키지 설치

flutter pub add sms_user_consent

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

sms_user_consent 패키지는 명시적인 권한 없이도 Flutter 앱이 안드로이드에서 사용자의 전화번호와/또는 SMS 메시지 읽기 동의를 요청할 수 있도록 합니다. 이 패키지는 안드로이드 내장 SMS 권한 시스템을 활용하여 사용자가 표준 시스템 대화상자를 통해 접근을 허용할 수 있게 합니다. 이 패키지는 듀얼-SIM 기기를 지원하여 다양한 안드로이드 하드웨어와 호환됩니다. OTP 인증 또는 SMS 기반 인증이 필요한 애플리케이션에 적합하며, 프로세스를 간소화하면서도 개인정보 보호와 보안을 유지합니다.

사용 사례

  • OTP 인증
  • SMS 기반 인증
  • 더블 SIM 장치 지원
  • 개인정보 보호를 위한 SMS 접근
  • 사용자 동의 수집

주요 기능

  • 추가 권한이 필요하지 않습니다
  • 더블 SIM 호환성
  • 안드로이드 전용 지원
  • 시스템 수준 동의 대화상자
  • 전화번호 검색

적합한 대상

  • OTP 입력이 필요한 앱
  • 인증 흐름
  • 매니페스트 권한 없이 SMS 읽기
  • Android 중심 앱
  • 최소 권한 앱

고려 사항

  • 안드로이드 전용
  • 사용자 상호작용 필요
  • SMS 읽기만 가능
  • iOS 지원 없음
  • 시스템 수준의 동의에 따라 다릅니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

sms_user_consent

Request user's phone number (supports dual sim) and/or consent to read SMS without adding any permissions, using Android's SMS User Consent API

Screenshots

Steps to use

1] Create an instance, optionally supply phone number listener and sms listener

SmsUserConsent smsUserConsent = SmsUserConsent(
        // optionally, do something when user selects a number.
        // You can even add/update this listener later on by simply 
        // calling smsUserConsent.updatePhoneNumberListener(updatedListener)
        phoneNumberListener: () {},
        
        // optionally, do something when user receives sms.
        // You can even add/update this listener later on by simply 
        // calling smsUserConsent.updateSmsListener(updatedListener)
        smsListener: () {}
);

2a] OPTIONAL : Request user's phone number

smsUserConsent.requestPhoneNumber();

Once the user selects a phone number, it can be accessed as

smsUserConsent.selectedPhoneNumber;

2b] OPTIONAL : Request to receive SMS

smsUserConsent.requestSms(); 

or you can specify the phone number you wish to capture the SMS from

smsUserConsent.requestSms(senderPhoneNumber: sender_number);

Once the user receives a SMS and the user taps Allow, it can be accessed as

smsUserConsent.receivedSms;

3] Finally, dispose the instance

smsUserConsent.dispose();
Note

As per the SMS User Consent API, message will be received by the plugin only if it meets these criteria:

  • The message contains a 4-10 character alphanumeric string with at least one number.
  • The message was sent by a phone number that's not in the user's contacts.
  • If you specified the sender's phone number, the message was sent by that number.

Contributing

  • Found a bug or idea to improve the plugin? Send a PR.
  • Found this plugin helpful and want to thank me? I love :coffee:
  • Want to hire me for a gig? Let's talk on LinkedIn

License

MIT © 2020 Harsh P

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.