title: Use system PIN dialog in Android application
body: <h2>Background</h2>
  <p>I am trying to write an application which works like described below.</p>
  <ul>
  <li>When user start application it check if user have registered PIN on his device.</li>
  <li>If user have registered PIN, application must show button &quot;Continue with PIN&quot;.</li>
  <li>When user press on button &quot;Continue with PIN&quot; system standard PIN dialog must appears.
  <img src="https://i.stack.imgur.com/miyXI.png" alt="enter image description here" /></li>
  <li>User enter his PIN and press &quot;Continue&quot; button.</li>
  <li>After System must check if entered PIN is correct or no and continue working.</li>
  </ul>
  <hr />
  <h2>Searches</h2>
  <p>I have made some searches and found some articles on <a href="https://stackoverflow.com/">stackoverflow</a> and other internet sources which say &quot;<em><strong><a href="https://stackoverflow.com/questions/7983143/where-can-i-find-examples-or-tutorials-about-creating-a-custom-android-lockscree">There is no way to develop a new custom unlock mechanism on a non-rooted phone.</a></strong></em>&quot; or &quot;<a href="https://stackoverflow.com/questions/10086659/use-system-pin-in-android"><em><strong>I would be surprised if you could, because then you would be probably able to steal the pin code, and I don't think anyone would want that.</strong></em></a>&quot;.</p>
  <p>Also I have watched some video tutorials like <a href="http://www.youtube.com/watch?v=1_H4AlQaNa0" rel="noreferrer"><em><strong>Tutorial: Android Internals - Building a Custom ROM, Pt. 1 of 2</strong></em></a> and <a href="http://www.youtube.com/watch?v=rFqELLB1Kk8" rel="noreferrer"><em><strong>Tutorial: Android Internals - Building a Custom ROM, Pt. 2 of 2</strong></em></a>.</p>
  <p><em><strong>EDITED</strong></em></p>
  <p>I have made some searches today and found a very interesting thing, I think I am on a right way to the solution, and I want to share my ideas with you. So looking in android sources I found an interesting files <em><strong>ChooseLockPassword.java</strong></em> (<em>packages\apps\Settings\src\com\android\settings</em>) and <em><strong>LockPatternUtils.java</strong></em> (*frameworks\base\core\java\com\android\internal\widget*) now I am interest in:</p>
  <h3>Question</h3>
  <p><strong>How can I call <code>LockPatternUtils</code> class function from my code</strong> ? Or Why I cant see that function in Eclipse ?</p>
  <hr />
  <h2>Decision</h2>
  <p>So I think that the only way to get access to the Android <em><strong>system PIN dialog</strong></em> is to root the phone make some changes in the system files and use <em><strong>system PIN dialod</strong></em></p>
  <hr />
  <h2>Question</h2>
  <ol>
  <li>Can somebody provide me useful links about getting access to the system PIN dialog in the rooted phone.</li>
  <li>Am I on a right way and can I solve my problem in this way?</li>
  <li>If anybody encountered such problem please help me to solve.</li>
  </ol>
  <p>Any Solutions?</p>