{"id":27772743,"url":"https://github.com/OrangeGangsters/LolliPin","last_synced_at":"2025-04-30T00:01:48.443Z","repository":{"id":25724459,"uuid":"29161493","full_name":"omadahealth/LolliPin","owner":"omadahealth","description":"A Material design Android pincode library. Supports Fingerprint.","archived":true,"fork":false,"pushed_at":"2022-04-04T19:24:45.000Z","size":1446,"stargazers_count":1601,"open_issues_count":57,"forks_count":426,"subscribers_count":63,"default_branch":"master","last_synced_at":"2025-04-25T13:04:07.013Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/omadahealth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-12T22:58:28.000Z","updated_at":"2025-03-14T17:29:53.000Z","dependencies_parsed_at":"2022-09-05T16:30:29.702Z","dependency_job_id":null,"html_url":"https://github.com/omadahealth/LolliPin","commit_stats":null,"previous_names":["orangegangsters/lollipin"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omadahealth%2FLolliPin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omadahealth%2FLolliPin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omadahealth%2FLolliPin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omadahealth%2FLolliPin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omadahealth","download_url":"https://codeload.github.com/omadahealth/LolliPin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251602810,"owners_count":21615963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-30T00:01:22.392Z","updated_at":"2025-04-30T00:01:48.409Z","avatar_url":"https://github.com/omadahealth.png","language":"Java","funding_links":[],"categories":["Index `(light-weight pages)`","PinCode","Java"],"sub_categories":[],"readme":"LolliPin [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-LolliPin-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1425)\n================\n\nA Lollipop material design styled android pincode library (API 14+)\n\n\nTo include in your project, add this to your build.gradle file:\n\n```\n   //Lollipin\n   compile ('com.github.orangegangsters:lollipin:2.0.0@aar') {\n      transitive = true\n   }\n```\nStarting from version 2.1.0 we will have a different package name:\n\n```\n   //Lollipin\n   compile ('com.github.omadahealth:lollipin:2.1.0@aar') {\n      transitive = true\n   }\n```\n\n![Demo](app/src/main/res/raw/github_gif.gif) ![Demo](app/src/main/res/raw/github_gif2.gif)\n\n========\n### By\nDevelopers:\n        [Olivier Goutay](https://github.com/olivierg13) and [Stoyan Dimitrov](https://github.com/StoyanD) and [Dae Park](https://github.com/daespark)\n        \nContributors:\n        [Art Beatte IV](https://github.com/abeatte), [Alex Morgan](https://github.com/axemorgan)\n\nDesigners:\n        [Yassine Bentaieb](http://yassinebentaieb.com/)\n\n========\n### Security\n\n##### Password protection\nThe password itself is not saved, only its hash using the SHA-1 algorithm.\nThis hash is then saved on the SharedPreferences, allowing to verify that the user entered the right PinCode,\nwithout giving the possibility to retrieve it.\n\n##### Introducing Fingerprint\nOnce the user has enabled the password, he can also use his fingerprint scanner (using Google Api, not Samsung)\nto unlock his device.\n\n========\n### Usage\n\nIf you want an example on how to use it, you can find an example app in this repo.\n\n========\n#### Preparing dependencies\n\nWe are using a custom version of RippleView that contains a RippleAnimationListener.\nIn order to be able to fetch this dependency, you need to add these lines into your main build.gradle file:\n```\nallprojects {\n    repositories {\n        maven{\n            url \"https://github.com/omadahealth/omada-nexus/raw/master/release\"\n        }\n        jcenter()\n\n    }\n}\n```\n\n========\n#### Overriding the AppLockActivity\n\nIn order to use the \"Forgot\" system, we let you extend the AppLockActivity class to provide your own way of handling the user behaviour in this case (logout, delete datas etc...)\n\n```\npublic class CustomPinActivity extends AppLockActivity {\n    @Override\n    public void showForgotDialog() {\n        //Launch your popup or anything you want here\n    }\n}\n```\n\n========\n#### Init\n\nAdvised to be done by extending the Application, but can be done elsewhere. The method below provides a way to enable or disable the PinCode system:\n\n========\n##### Enabling\n\n```\nLockManager\u003cCustomPinActivity\u003e lockManager = LockManager.getInstance();\nlockManager.enableAppLock(this, CustomPinActivity.class);\n```\nOnce enabled, you must extend \"PinActivity\" for every Activity you wish to protect.\n\n========\n##### Disabling\n\n```\nLockManager\u003cCustomPinActivity\u003e lockManager = LockManager.getInstance();\nlockManager.disableAppLock();\n```\n\n========\n#### Set up the PinCode\n\nWhenever you want the user to set up his pin code, you need to request:\n\n```\nIntent intent = new Intent(MainActivity.this, CustomPinActivity.class);\nintent.putExtra(AppLock.EXTRA_TYPE, AppLock.ENABLE_PINLOCK);\nstartActivityForResult(intent, REQUEST_CODE_ENABLE);\n```\n\n========\n#### Unlock system\n\nAs soon as you enable the PinCode system, the Unlock screen will appear by itself when the user resume the app after a defined timeout.\nPlease refer to the next section to know how to customize these values.\n\n========\n### Customization\n\nSome features are customizable:\n\nThe unlock timeout:\n-------------------\n\n```\nLockManager\u003cCustomPinActivity\u003e lockManager = LockManager.getInstance();\nlockManager.getAppLock().setTimeout(10000);\n```\n\nThe pin length required:\n-------------------\n\n```\npublic class CustomPinActivity extends AppLockActivity {\n\n    ...\n    ...\n\n    @Override\n    public int getPinLength() {\n        return 5;\n    }\n\n    ...\n    ...\n}\n```\n\nThe logo displayed at the top of the page:\n-------------------\n\n```\nLockManager\u003cCustomPinActivity\u003e lockManager = LockManager.getInstance();\nlockManager.getAppLock().setLogoId(R.drawable.security_lock);\n```\n\nThe ignored activities:\n-------------------\nFor instance you got a login activity that you want to avoid getting the lock screen, you can ignore this activity by doing:\n\n```\nLockManager\u003cCustomPinActivity\u003e lockManager = LockManager.getInstance();\nlockManager.getAppLock().addIgnoredActivity(NotLockedActivity.class);\n```\n\nThe AppLockActivity Layout:\n-------------------\nBy providing a custom layout to getContentView() you can alter how your AppLockActivity looks.\nHowever, you must include 4 required elements:\n- TextView with an id of pin_code_step_textview\n- TextView with an id of pin_code_forgot_textview\n- PinCodeRoundView with an id of pin_code_round_view\n- KeyboardView with an id of pin_code_keyboard_view\n\n```\n@Override\n    public int getContentView() {\n        return R.layout.activity_pin;\n    }\n```\n\nThe Pin Dots:\n-------------------\nBy supplying alternate drawable resources for app:lp_empty_pin_dot and app:lp_full_pin_dot you can custimize how it looks.\n\n```\n\u003ccom.github.orangegangsters.lollipin.lib.views.PinCodeRoundView\n                android:id=\"@+id/pin_code_round_view\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginTop=\"@dimen/pin_code_round_top_margin\"\n                android:layout_marginBottom=\"@dimen/pin_code_elements_margin\"\n                app:lp_empty_pin_dot=\"@drawable/pin_empty_dot\"\n                app:lp_full_pin_dot=\"@drawable/pin_full_dot\"/\u003e\n```\n\n========\n\n### Credits\n\n* We used the RippleEffect library from Traex (https://github.com/traex/RippleEffect) to implement the Ripple effect from material design on API 10+\n* We used the L-dialogs library from lewisjdeane (https://github.com/lewisjdeane/L-Dialogs) to demonstrate how to use a popup for the \"forgot\" button\n* We used the Robotium library from RobotiumTech (https://github.com/RobotiumTech/robotium) to run powerful unit and functional testing\n\n========\n\n### License\n\n```\nThe MIT License (MIT)\n\nCopyright (c) 2015 OrangeGangsters\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOrangeGangsters%2FLolliPin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOrangeGangsters%2FLolliPin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOrangeGangsters%2FLolliPin/lists"}