All Projects → mukeshsolanki → Android Otpview Pinview

mukeshsolanki / Android Otpview Pinview

Licence: mit
A custom view to enter otp of different sizes used usually in cases of authentication.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Android Otpview Pinview

Privacyidea
🔐 multi factor authentication system (2FA, MFA, OTP Server)
Stars: ✭ 1,027 (+143.36%)
Mutual labels:  otp, authentication
Freeradius Server
FreeRADIUS - A multi-protocol policy server.
Stars: ✭ 1,379 (+226.78%)
Mutual labels:  otp, authentication
Gortas
Gortas is an API based authentication service, allows adding authentication to your site or service with minimum efforts.
Stars: ✭ 48 (-88.63%)
Mutual labels:  otp, authentication
Multiotp
multiOTP open source strong two factor authentication PHP library, OATH certified, with TOTP, HOTP, Mobile-OTP, YubiKey, SMS, QRcode provisioning, etc.
Stars: ✭ 173 (-59%)
Mutual labels:  otp, authentication
Totp Cli
A cli-based pass-backed TOTP app
Stars: ✭ 76 (-81.99%)
Mutual labels:  otp, authentication
PassCodeText
A customised EditText view serving the purpose of taking numeric One Time Password from a user. With stunning animation, and high customizability.
Stars: ✭ 105 (-75.12%)
Mutual labels:  otp, custom-view
Jwtproxy
An HTTP-Proxy that adds AuthN through JWTs
Stars: ✭ 379 (-10.19%)
Mutual labels:  authentication
Text Decorator
Decorate your TextView easily
Stars: ✭ 402 (-4.74%)
Mutual labels:  custom-view
Ergo
a Framework for creating mesh networks using technologies and design patterns of Erlang/OTP in Golang
Stars: ✭ 376 (-10.9%)
Mutual labels:  otp
Toughradius
Beautiful open source RadiusServer
Stars: ✭ 376 (-10.9%)
Mutual labels:  authentication
Django Rest Framework Passwordless
Passwordless Auth for Django REST Framework
Stars: ✭ 412 (-2.37%)
Mutual labels:  authentication
Retroauth
A library build on top of retrofit, for simple handling of authenticated requests
Stars: ✭ 405 (-4.03%)
Mutual labels:  authentication
Ockam
End-to-end encrypted messaging and mutual authentication between cloud and edge-device applications
Stars: ✭ 395 (-6.4%)
Mutual labels:  authentication
Neural
高并发、高可用的微服务架构中的分布式治理利刃,提供了分布式限流、服务降级、熔断器、重试器等容错特性,并提供了SPI、过滤器和JWT等功能。此外还提供了很多小的黑科技(如:IP黑白名单、UUID加强版、Snowflake和大并发时间戳获取等)。
Stars: ✭ 373 (-11.61%)
Mutual labels:  authentication
Slim Basic Auth
PSR-7 and PSR-15 HTTP Basic Authentication Middleware
Stars: ✭ 402 (-4.74%)
Mutual labels:  authentication
Voiceripple
Voice Record Button that has ripple effect with users voice
Stars: ✭ 379 (-10.19%)
Mutual labels:  custom-view
Django Saml2 Auth
Django SAML2 Authentication Made Easy. Easily integrate with SAML2 SSO identity providers like Okta
Stars: ✭ 405 (-4.03%)
Mutual labels:  authentication
Play Pac4j
Security library for Play framework 2 in Java and Scala: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 375 (-11.14%)
Mutual labels:  authentication
Two Factor Bundle
[OUTDATED] Two-factor authentication for Symfony applications 🔐 (bunde version ≤ 4). Please use version 5 from https://github.com/scheb/2fa.
Stars: ✭ 388 (-8.06%)
Mutual labels:  authentication
Laravel Acl
This package helps you to associate users with permissions and permission groups with laravel framework
Stars: ✭ 404 (-4.27%)
Mutual labels:  authentication

Android PinView/OtpView



A custom control to enter a four digit code usually in cases of authentication.

        

Supporting Android PinView/OtpView

Android PinView/OtpView is an independent project with ongoing development and support made possible thanks to donations made by these awesome backers. If you'd like to join them, please consider:

How to integrate into your app?

Integrating the project is simple a refined all you need to do is follow the below steps

Step 1. Add the JitPack repository to your build file. Add it in your root build.gradle at the end of repositories:

allprojects {
  repositories {
    ...
    maven { url "https://jitpack.io" }
  }
}

Step 2. Add the dependency

dependencies {
        implementation 'com.github.mukeshsolanki:android-otpview-pinview:<latest-version>'
}

How to use the library?

Okay seems like you integrated the library in your project but how do you use it? Well its really easy just add the following to your xml design to show the otpview

.....
 <com.mukesh.OtpView
      android:id="@+id/otp_view"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_marginTop="72dp"
      android:inputType="number"
      android:itemBackground="@color/colorPrimary"
      android:textColor="@android:color/white"
      app:OtpItemCount="6"
      app:OtpLineColor="@color/colorPrimary"
      app:OtpViewType="line"
      />
.....

Add otpview style in the AppTheme

  <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <!-- Customize your theme here. -->
    <item name="otpViewStyle">@style/OtpWidget.OtpView</item>
  </style>

To get a callback when the user enters the otp make use of OnOtpCompletionListener like wise

 private OtpView otpView;
 otpView = findViewById(R.id.otp_view);
 otpView.setListener(new OnOtpCompletionListener() {
   @Override public void onOtpCompleted(String otp) {

     // do Stuff
     Log.d("onOtpCompleted=>", otp);
   }
 });

That's pretty much it and your all wrapped up.

OtpView Attributes

Attribute Use
app:OtpItemCount sets the length of the otp view
app:OtpItemWidth sets the with of each item inside the otp view
app:OtpItemHeight sets the height of each item inside the otp view
app:OtpItemSpacing sets the space between each item in otp view
app:OtpLineWidth sets the line border width
app:OtpLineColor sets the color to the line border
app:OtpViewType sets the view type of the otp view it can be either rectangle line or none
app:OtpCursorVisible sets the visibility of the cursor
app:OtpCursorColor sets the color of the cursor
app:OtpCursorWidth sets width of the cursor
app:OtpItemBackground sets the background color of each item in the otp view
app:OtpHideLineWhenFilled toggles the line border
app:OtpRtlTextDirection toggles RTL text direction
app:OtpState_filled toggles the option fill the field after data has been entered (Style of file can we set with a drawable assigned using itemBackground

Apart from these you can use any property that applies to an EditText.

Author

Maintained by Mukesh Solanki

Contribution

GitHub contributors

License

MIT License

Copyright (c) 2018 Mukesh Solanki

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].