droidchef / android-lockpattern

Automatically exported from code.google.com/p/android-lockpattern
Apache License 2.0
0 stars 0 forks source link

How ot i add a forgot pattern button? #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Add a forgot pattern button when the user forgets his pattern
2.
3.

What is the expected output? What do you see instead?
a button which launches a recovery intent

What version of the product are you using? On what operating system?

Please provide any additional information below.
how do i add a forgot pattern button on the screen when the user forgets his 
pattern. in your integration notes theres this section 

case LockPatternActivity.RESULT_FORGOT_PATTERN:

when i add my intent under this section it doesn't launch..nor does a button 
show on the screen..how can achieve this feature

Original issue reported on code.google.com by clinto...@gmail.com on 17 Dec 2014 at 5:34

GoogleCodeExporter commented 9 years ago
intent.putExtra(LockPatternActivity.EXTRA_INTENT_ACTIVITY_FORGOT_PATTERN, );
i have added this line and am now getting the forgot button displayed. but i do 
not know what to pass as the second parameter. is it my class which is used to 
retrive the pattern back? i just put my class name as a string but i keep 
getting this in the logcat

12-17 23:54:30.046: W/Bundle(32162): Key 
com.haibison.android.lockpattern.LockPatternActivity.intent_activity_forgot_patt
ern expected Parcelable but value was a java.lang.String.  The default value 
<null> was returned.

Original comment by clinto...@gmail.com on 17 Dec 2014 at 6:27

GoogleCodeExporter commented 9 years ago
Hello @clinto...,

The value of EXTRA_INTENT_ACTIVITY_FORGOT_PATTERN is an Intent. For example:

    Intent intentActivityForgotPattern = new Intent(...);
    intentLockPatternActivity.putExtra(
        LockPatternActivity.EXTRA_INTENT_ACTIVITY_FORGOT_PATTERN,
        intentActivityForgotPattern);

And it will work.

(From within your Eclipse, if you point the mouse at the name 
EXTRA_INTENT_ACTIVITY_FORGOT_PATTERN, a popup window with Javadocs with appear. 
It might help...)

Original comment by haibison...@gmail.com on 17 Dec 2014 at 8:04

GoogleCodeExporter commented 9 years ago
Thank you so much..it worked 

Original comment by clinto...@gmail.com on 17 Dec 2014 at 9:48

GoogleCodeExporter commented 9 years ago
You're welcome.

Have a nice day  :-) 

Original comment by haibison...@gmail.com on 17 Dec 2014 at 9:52