Session Password Authentication Using Images Pattern
Session Password Authentication Using Images Pattern
Session Password Authentication Using Images Pattern
S E S S I O N P AS S W O R D AU T H E N T I C AT I O N
S C H E M E U S I NG S L I D E P U Z Z L E AN D
C O L O R / I M AG E S P AT T E R N
TITLE
A Thesis
P r e se n t e d t o t h e Fa c u lt y
C o m p u t e r S c ie n ce a n d I n f o rm a t i o n T e c h n o lo g y
I C C T C o l le g e s Fo u n d a t i o n I n c .
C a i n t a , R i za l
I n P a rt i a l Fu lf i l lm e n t o f t h e d e g r e e
B a ch e lo r o f S c i e n c e in I n f o rm a t io n T e c h n o lo g y.
B y:
Alforque, Chadrich
Aparice, Joenelyn
Aranilla, Jessica A.
Bautista, Br yle
Malarde, Roselle
Ranido, Alicia
Page | i
ICCT COLLEGES FOUNDATION INCORPORATED
PREFACE
T h i s p a p e r i s o u r f i n a l p r o je c t f o r R e s e a r ch P ro j e ct i n
C o l l e g e o f C o m p u t e r S c ie n c e a n d I n f o r m a t io n T e ch n o lo g y a t t h e
I C C T C o l le g e s . I n t h e p ro j e ct , W e co n d u c t e d a s u r ve y t o t h o s e
a n d r o id u s e r s a n d we i n t r o d u ce d o u r m o b i l e a p p s t o re p r e s e n t
t h e i d e a o f g r a p h ic a l p a s s wo r d a u t h e n t ic a t i o n f o r A p p lo c k a n d
L o c ks c r e e n a s a h i g h l y s e c u r i t y f o r t h e i r m o b i le d e vi c e s . T h e
R e s e a r c h wa s d o n e d u r i n g t r i m e s t e r wi t h s u r ve y c o n d u c t e d in
A u g u st .
W e i n sp i r e d t o c o n d u c t t h i s r e se a r c h t o im p l e m e n t a h i g h l y
s e c u r it y i n t e rm s o f c o m p u t e r t e c h n o lo g y. S i n c e , I n t h e t e c h n o lo g y
e r a , T h e e vo l vi n g o f d e vi c e s/ g a d g e t s o r so f t wa r e a p p l ic a t io n a r e
c o n t i n u o u s l y i m p ro ve a n d i n n o va t e b u t t h e r i s k o f vu l n e r a b i l i t ie s
a n d m e t h o d s o f t h o s e c yb e r c r im i n a l s a r e c o n t in u o u s l y i m p ro vi n g
too.
T h i s re se a r ch wo u l d se r ve a s a f o l l o w u p d i ss e r t a t io n f r o m
m y l a s t t h e s is a b o u t I P S p o o f i n g : S e c u r i t y P r o b l e m i n T r a n sf e r
C o n t ro l P r o t o co l / I n t e r n e t P r o t o c o l su i t e .
Page | ii
ICCT COLLEGES FOUNDATION INCORPORATED
DEDICATION
I d e d ic a t e t h i s r e se a r ch t o G o d A l m ig h t y m y c r e a t o r, m y s t r o n g
p i l l a r , m y so u r ce o f i n sp i r a t i o n , wi s d o m , kn o wl e d g e a n d
u n d e r st a n d in g . He h a s b e e n t h e s o u rc e o f m y s t re n g t h
t h r o u g h o u t t h i s p ro g r a m a n d o n h i s wi n g s o n l y h a ve I s o a re d .
I d e d ic a t e t h i s r e se a r ch t o yo u a n d t o a l l g e n e r a l u se r s o f m o b i l e
d e vi c e s b e c a u se t h e go a l o f t h i s re se a r ch t o h a ve a n in s i g h t a n d
p r o t e c t t h o se m o b il e u s e r s a b o u t vu ln e r a b i l i t ie s o f t h e ir m o b i le
d e vi c e s a n d t o b e c o m e a wa r e a g a i n s t t o t h e h a c ke r s . I s t i l l a l so
d e d i c a t e d t o m y p ro f e s s o r s i n d a t a co m m u n i ca t io n a n d
n e t wo r k i n g wh o h a s e n c o u r a g e d m e a l l t h e wa y b e ca u se t h i s i s a
f o l l o w u p a n d t h e n e xt p a r t o f m y r e s e a r ch la s t t r im e .
T h a n k yo u a n d G o d B le s s.
Page | iii
ICCT COLLEGES FOUNDATION INCORPORATED
T h i s t h e s i s e n t i t le d “ S e s s i o n P a s s w o r d Au t h e n t i c a t i on
S c he m e U s i n g S l i d e P u z z l e a n d C ol o r / I m a ge s P a t t e rn ”
p r e p a r e d a n d s u b m i t t e d b y C h a d r i c h Al f o r q u e , J oe ne l yn
Ap a r i c e , J e s s i c a Ar a n i l l a , B r yl e B a u t i s t a , R os e l l e Ma l a r d e ,
J o h n Le s te r Ra mo s a n d Al i c i a R a ni d o , in p a r t ia l f u lf il l m e n t
o f t h e re q u i r e m e n t s f o r t h e d e g r e e o f B a c h e l o r o f S c ie n c e in
I n f o rm a t io n T e c h n o l o g y i s h e r e b y r e c o m m e n d e d f o r a p p r o va l
and acceptance.
M r . M a r c K e vi n I m p e r i a l
T h e s i s A d vi s e r
A c ce p t e d i n p a r t ia l f u lf i l lm e n t o f t h e re q u i r e m e n t s f o r
t h e co u r se Re s e a rc h P r o j e c t (I T P R O J ) .
Page | iv
ICCT COLLEGES FOUNDATION INCORPORATED
ACKNOWLEDGEMENT
I wi s h t o e xp r e ss m y s in c e re g r a t it u d e t o Jo e R o c k f o r s h a r i n g
h i s t u t o r i a l s t u f f o f b u i ld i n g m o b i le a p p s. A ls o t h a n k t o m y f r ie n d s
o n s o c ia l m e d ia wh o k n o wl e d g a b le a n d e xp e rt i n P ro g r a m m in g
apps.
I s i n c e re l y t h a n k M r . M a r c K e vi n I m p e r i a l f o r h i s gu i d a n c e a n d
e n co u ra g e m e n t i n c a r r yi n g o u t t h i s re s e a r c h wo r k .
Page | v
ICCT COLLEGES FOUNDATION INCORPORATED
TABLE OF CONTENTS
TITLE ............................................................................................................................... i
PREFACE ....................................................................................................................... ii
DEDICATION ................................................................................................................. iii
APPROVAL SHEET ....................................................................................................... iv
ACKNOWLEDGEMENT .................................................................................................. v
Page | vi
ICCT COLLEGES FOUNDATION INCORPORATED
APPENDIX ....................................................................................................................78
Page | vii
ICCT COLLEGES FOUNDATION INCORPORATED
CHAPTER 1
PROBLEM AND ITS BACKGROUND
1.1 INTRODUCTION
The researchers decided to create an innovated password authentication for
crime too. And since it has not yet been shown to all and not already to introduce
slide puzzle game and candy crush games where the user are able to create
their own pattern of images and arrange their own images and colors when the
user are setting up a password before it can would activated. The password
Especially with mobile contacts and other personal information of the user. This
authentication that the user can choose to protect his/her information for his
mobile device and may also choose the user how many attempts to open the
application security, It has a features that automatically opens the GPS and
intruder selfie after the user activates his mobile app with his password. The
Page | 1
ICCT COLLEGES FOUNDATION INCORPORATED
i n t r u d e r s e lf i e s e n t t h e p h o t o t o h is G m a i l A c c o u n t a n d h e c o u l d
u se i t a s e vi d e n ce if h i s p h o n e wa s s t o le n . I t h a s o t h e r f e a t u re s
t o a c t i va t e a n d d e a c t i va t e i t s n o t if i ca t i o n p a s s wo r d a n d i t s
p a s s wo r d f o r s c re e n lo c k a n d a p p l o ck .
gain access to a resource, which is to be kept secret from those who are not
CTSS was a computer designed for multiple users (like computers in a modern
important issue, but with the high level of digitalization today it is not seen as
only important, but instead as an absolute necessity. All the different systems
that are used by a person are often protected with some sort of authentication,
hindering unauthorized personnel from using the systems. A person living in the
modern society today needs to keep track of many different methods to confirm
their identity.
However, many users find it difficult to remember complex passwords over time.
Page | 2
ICCT COLLEGES FOUNDATION INCORPORATED
Thus, users normally cope with password memory problems by decreasing the
security. Nevertheless, psychological studies show that images are much more
effective on memory recall rather than with words. Since technology continues to
images pattern.
h t t p s : / / e n . wi k i p e d ia . o r g / wi k i / P a s s wo r d
h t t p s : / / ww w. s l i d e sh a r e . n e t / C A in c / h i st o r y - o f - t h e - p a s s wo r d / 5 -
T h e _ f i r s t _ co m p u t e r _ p a s s wo r d _ wa s
h t t p : / / ww w. d i va -
p o r t a l . o r g / sm a sh / ge t / d i va 2 : 1 0 3 0 8 2 8 / F U L L T E X T 0 2
h t t p s : / / ww w. u k e s sa ys . c o m / e s sa ys / p s yc h o l o g y/ t h e - e f f e c t i ve n e ss -
o f - p i ct u re s - a n d - wo r d s - o n - m e m o r y - r e c a l l - p s yc h o l o g y - e s s a y. p h p
Page | 3
ICCT COLLEGES FOUNDATION INCORPORATED
T h i s s t u d y f o c u s e s o n i n n o va t i ve p a s s wo r d a u t h e n t ic a t io n f o r
m o b i l e d e vi c e s .
1 . 3 . 1 G E N E R AL P R O B L E M
M o b i l e d e vi c e s o f t e n la c k p a s s wo rd s t o a u t h e n t i c a t e
u s e r s a n d c o n t ro l a c ce s s t o d a t a s t o r e d o n t h e
d e vi c e s . L a c k o f s e c u r it y wi t h t h e f a c t t h a t m o b i le
d e vi c e s are being targeted by c yb e r c r i m i n a l s
U s e r s d o u se a p a s s wo r d o r P I N t h e y o f t e n ch o o se
p a s s wo r d s o r P I Ns t h a t ca n b e e a s i l y d e t e rm i n e d o r
b yp a s se d , s u c h a s 1 2 3 4 o r 0 0 0 0 . W it h o u t p a ss wo r d s
o r P I N s t o l o ck t h e d e vi c e , t h e r e i s i n c r e a s e d r i s k t h a t
s t o le n o r l o st p h o n e s ' in f o rm a t io n co u ld b e a c c e ss e d
b y u n a u t h o r i ze d u se r s wh o c o u l d vi e w s e n s i t ive
i n f o rm a t io n a n d m is u s e m o b i l e d e vi c e s .
T wo -f a c t o r a u t h e n t i ca t i o n i s n o t a l wa ys u s e d wh e n
conducting s e n s it i ve t ra n sa c t io n s o n m o b i l e d e vi c e s .
C o n su m e r s g e n e ra l l y u s e s t a t ic p a s s wo r d s i n s t e a d o f t wo -
f a c t o r a u t h e n t i c a t i o n wh e n co n d u c t i n g o n l in e s e n s i t i ve
t r a n sa ct i o n s wh i l e u s i n g m o b i l e d e vi c e s. U s in g s t a t ic
p a s s wo r d s f o r a u t h e n t i ca t i o n h a s s e cu r i t y d r a wb a c k s :
p a s s wo r d s ca n b e g u e s s e d , f o r g o t t e n , wr i t t e n d o wn a n d
s t o le n , o r e a ve s d ro p p e d .
Page | 4
ICCT COLLEGES FOUNDATION INCORPORATED
1 . 4 . 1 G E N E R AL O B J E C TI V E S
T h e Re s e a r ch e r s wi l l d e ve l o p co lo r / im a g e s p a t t e r n t h a t
a r e d if f e r e n t t o t h e t r a d i t io n a l p a s swo r d a u t h e n t ic a t i o n a n d
wi l l p r o vi d e a h i g h e r s e c u r i t y f o r m o b i l e d e vi c e s.
S l i d e p u zzl e s a n d C o lo r / I m a g e s wi l l r e p l a ce t o t h e P I N
p a s sc o d e b e ca u se P I N N u m b e r s a r e e a s i l y t o d e t e rm i n e d
e s p e c i a l l y t o t h e h a c ke r s wh o u s e s a m e t h o d t o a cc e s s
i l l e g a l l y.
1 . 4 . 2 S P E C I F I C O B J E C TI V E S
T h e m o b i le a p p wi l l d e ve lo p a s a s t a t i c p a s s wo r d b u t
the uniqueness is good for security of their mobile
d e vi c e . S i n ce , T h e u s e r s p re f e r s t a t i c p a s s wo r d f o r
t h e i r m o b i l e d e vi c e s a n d t h e y d o n o t n e e d t o u se t wo -
f a c t o r a u t h e n t i c a t io n b e c a u se i t i s h u s s l e f o r t h e m .
Page | 5
ICCT COLLEGES FOUNDATION INCORPORATED
h t t p s : / / ww w. p c wo r l d . co m / a rt i c l e / 2 0 1 0 2 7 8 / 1 0 - c o m m o n -m o b i l e -
s e c u r it y - p r o b le m s -t o - a t t a c k . h t m l
h t t p s : / / ww w. s e c u re n vo y. c o m / t wo - f a ct o r - a u t h e n t i ca t io n / wh a t - i s -
2 f a . sh t m
h t t p s : / / ww w. we l i ve s e c u r i t y. co m / 2 0 1 5 / 1 1 / 0 6 / m o b i le - se c u r i t y -
i m p o rt a n t -e ve r /
Page | 6
ICCT COLLEGES FOUNDATION INCORPORATED
This study will help the user to have an insight on having a secured
privacy and vulnerability of exposing personal information. It will provide
them information on what are the risks of having an unsecured mobile.
The results of the study will help make the user become aware of their
involvement in hacking and become more careful on their personal
information.
To the users, it will serve as basis to help share with other users the
information about the risk of having an unsecured mobile. Also it will help
them to be more cautious on choosing their security app.
To the readers, this study will help the readers to have the understanding
about having a unique way to secure user’s mobile.
To the future researchers, the results of this study can serve as a baseline
data for developing topics as well as creating ideas about their topics and
this may serve as a basis for future research that they will conduct.
h t t p s : / / ww w. we l i ve s e c u r it y. c o m / 2 0 1 5 / 1 1 / 0 6 / m o b i le - s e cu r i t y -
i m p o r t a n t - e ve r /
h t t p s : / / b l o g . a p p k n o x. c o m / im p o r t a n ce - o f -m o b i le - a p p - se c u r i t y/
Page | 7
ICCT COLLEGES FOUNDATION INCORPORATED
1.6.1 Scope
Login form
- W he n t h e u se r a cc e s s o n a m o b i le a p p s , t h e r e ’ s
a l o g i n f o r m wh e r e t h e u se r s n e e d t o s i g n i n .
The p u rp o se of this login f o rm to co n n e ct
automatically on h i s/ h e r gm a i l account for
i n t r u d e r n o t if ic a t io n .
S e t t i n g u p a pa s s w or d
- T h e u s e r n e e d s t o a r r a n g e h i s / h e r o wn p a t t e r n i n
s l i d e p u zzl e o r swi t c h p u zzl e a n d t h e re a r e st e p s
t h a t t h e u s e r c a n g o wi t h t h e o p t i o n s h e n e e d s t o
s e l e ct b e f o re se t u p t h e p a s s wo r d .
C h o o s e yo u r P a s s w o r d S e t - u p
- T h i s i s a f i r st s t e p f o r se t t i n g u p a p a s s wo r d . T h e
u s e r n e e d t o ch o o s e wh a t k in d o f p a s s wo r d s e t - u p
h e wa n t s . D e f a u l t o r F i l l im a g e s ? T h e De f a u lt wi l l
p r o vi d e of its o wn images for yo u r p a s s wo rd
a u t h e n t ic a t i o n a n d f i l l im a ge s if yo u wa n t to
p r o vi d e yo u r o wn im a g e s from yo u r g a l l e r y. .
Page | 8
ICCT COLLEGES FOUNDATION INCORPORATED
C h o o s e yo u r G r i ds
- T h e se c o n d st e p f o r s e t t i n g u p a p a s s wo r d . T h e
u s e r s h a s a n o p t io n t o c h o o s e h o w m a n y g r i d s t h e
users wa n t s for their p a ss wo r d .
C h o o s e t yp e o f p a s s w o r d
- T h e re a re t wo o p t io n s for choosing t yp e of
p a s s wo r d . Slide P u zzl e s and swi t c h p a t t e rn . .
S l i d e P u zzl e s t h i s i s n o t a t yp i c a l o f s l i d e p u zzl e
f ro m t h e o r d i n a r y. T h e u s e r s a re a b l e t o a r ra n g e
t h e i r o wn p a t t e rn f ro m o r i g i n a l f o rm t o s c r a m b l e
f o rm a n d s wi t c h p a t t e r n wa s in sp i r e d t o c a n d y
c r u s h , T h i s t yp e o f p a s s wo r d a r e a b le t o s wi t c h t he
i m a g e s t o co l o rs . .
Ar r a n g e yo u r ow n p a t t e r n
- T h i s i s a m a in s t e p wh e r e t h e u se r s wi l l a r r a n g e
t h e i r p a t t e rn s f o r t h e i r p a s s wo r d s a n d n o l im i t a t io n
f o r a r r a n g i n g t h e i r p a s s wo r d s .
At t e m p t s
- T h e m o b i le a p p s a r e n o t o n l y t o p r o t e c t t h e i r
m o b i l e d e vi c e b u t a l so t o p r o t e ct a g a i n st r o b b e r s .
T h e p u r p o s e o f t h is s t a g e wh e n so m e o n e a t t e m p t s
t o o p e n a n a n d r o id d e vi c e u n t i l i t r e a c h t o t h e
m a xi m u m a t t e m p t s t h e m o b i le d e vi c e wi l l
Page | 9
ICCT COLLEGES FOUNDATION INCORPORATED
a u t o m a t i c a l l y a c t i v a t e t h e G P S a n d wi l l s e n t a n
i m a g e o f in t r u d e r t o gm a i l.
1 . 6 . 1 Li m i ta t i on
Login form
- Only Phone number is only needed to login to the mobile app
and no password needed in case the user is in the public place
S e t t i n g u p a pa s s w or d
- T h e re a r e 6 s t e p s f o r s e t t in g u p a p a s s wo r d a n d
e a ch st e p s h a s a o p t io n s b e f o r e s e t t i n g u p a
p a s s wo r d i s co m p le t e . .
C h o o s i n g G ri d s
- T h e re are only t h re e o p t io n s for g r i d s i ze .
3 x3 , 4 x4 a n d 5 x4 .
C h o o s e i ma g e s
- I t d e p e n d s t o t h e u s e r in t e rf e r e n c e s. F o r C h o o s in g
a n im a g e s , e a ch gr i d s h a s a l im it a t io n h o w m a n y
i m a g e s t o u p lo a d .
- F o r 3 x3 o n l y 5 im a g e s t o u p lo a d ,
- 4 x4 o n l y 7 im a ge s
- 5 x4 o n l y 9 i m a g e s t o u p lo a d f o r t h e ir s l i d e p u zzl e s
a n d s wi t c h p a t t e r n p a s s wo r d .
Page | 10
ICCT COLLEGES FOUNDATION INCORPORATED
At t e m p t s
- There are only 3 options to choose how many times to try open
Page | 11
ICCT COLLEGES FOUNDATION INCORPORATED
CHAPTER 2
REVIEW OF RELATED LITERATURE
R e f e re n c e : I n t e r n a t i o n a l Re s e a r ch Jo u r n a l o f E n g i n e e r in g
a n d T e c h n o lo g y ( I R J E T ) , “A u t h e n t i ca t i o n S ch e m e s f o r
S e s s io n P a s s wo r d s u s in g C o lo r a n d I m a g e s “ V o l u m e : 0 4
I s s u e : 0 5 , Ma y , 2 0 1 7
B l o n d e r s t a t e o n g r a p h ic a l p a s s wo r d t e ch n i q u e , i n wh i c h
t h e p a s s wo r d i s ge n e r a t e d b y a l l o wi n g t h e u se r t o c l i ck o n
d if f e r e n t p o s i t io n s o n a n im a g e . D u r in g a u t h e n t i ca t i o n , t h e
u s e r h a s t o c l i c k o n t h e e st im a t e d a r e a s o f t h o s e lo ca t io n s.
L a t e r , t h i s id e a wa s p r o lo n g e d b y ‘ p a s s - p o in t s ys t e m ‘ wh e r e
t h e p re d e f in e d b o u n d a r ie s a r e e xc l u d e d a n d a r b i t ra r y
i m a g e s a r e su p p o rt e d . E ve r yt i m e , f o r c o n s t ru c t in g
p a s s wo r d , t h e u s e r c a n c l i c k o ve r a n y r e g i o n o n t h e im a g e .
A t o l e ra n ce a r o u n d e a ch ch o s e n p i xe l i s e va l u a t e d . T o b e
a u t h e n t ic a t e d , t h e u se r h a s t o c l i c k wi t h i n t h e t o le r a n ce
l e ve l o f t h e p i xe l s c h o se n .
Page | 12
ICCT COLLEGES FOUNDATION INCORPORATED
R e f e re n c e : G . E . B l o n d e r . G r a p h i ca l p a s s wo r d s . U n i t e d
States Patent 5559961, 2014.
S yu k r i g e n e r a t e a s c h e m e in wh i c h a u t h e n t i ca t i o n is ca r r i e d
o u t b y s ke t ch i n g o u t t h e u s e r s i g n a t u r e . T h i s s ch e m e
i n vo l ve s t wo l e ve ls , r e g i s t ra t io n a n d ve r i f i ca t io n . W h i le
r e g i s t e r i n g , t h e u se r d ra ws h i s s i g n a t u r e u s in g m o u s e , t h e n
s ys t e m e xt r a ct s t h e s i g n a t u r e a r e a . D u r i n g t h e ve r if i c a t i o n
l e ve l , i t a c q u i re s t h e u s e r s i g n a t u r e a s in p u t , p e rf o r m s
n o rm a l i za t io n a n d f in a l l y e xt r a c t s t h e p a ra m e t e r s o f t h e
s i g n a t u r e . B u t t h i s s c h e m e i s a s s o c ia t e d wi t h s e ve r a l
d i s a d va n t a g e s s u ch a s f o r g e r y o f s i g n a t u r e s , in co n ve n ie n ce
wh i l e d r a wi n g wi t h m o u se , d if f i cu l t y in s ke t ch i n g t h e
s i g n a t u r e in t h e sa m e p e r im e t e r s a t t h e t im e o f r e g i s t ra t i o n .
T h e re i s a n o t h e r , a n e w g r a p h i ca l a u t h e n t i ca t i o n m e t h o d
h a s b e e n d e s i g n e d b y Dh a m i j a a n d P e r r i g . T h i s m e t h o d ,
wh i l e c r e a t i n g t h e p a s s wo r d a l lo ws t h e u se r t o se l e c t
c e r t a in n u m b e r o f p i c t u r e s f r o m a s e t o f r a n d o m im a g e s .
T h e n , d u r i n g l o g i n , t h e u se r h a s t o re c o g n i ze t h e
p r e se l e ct e d p o rt r a i t s f ro m t h e s e t o f i m a g e s . B u t t h i s
m e t h o d i s l ia b le t o s h o u ld e r - su rf i n g .
R e f e re n c e : A . F . S yu k r i , E . O k a m o t o , a n d M. M a m b o , " A
U s e r I d e n t if i c a t i o n S ys t e m U s in g S i gn a t u r e W r it t e n wi t h
M o u se , " in T h i r d A u s t r a la s ia n C o n f e r e n ce o n I n f o r m a t io n
S e cu r i t y a n d P r i va c y ( A C I S P ): S p r i n g e r - V e r la g L e c t u re
N o t e s i n C o m p u t e r S c i e n ce (1 4 3 8 ) , 2 0 1 5 , p p . 4 0 3 - 4 4 1 .
Page | 13
ICCT COLLEGES FOUNDATION INCORPORATED
P a s sf a ce i s a n a p p r o a c h p ro p o s e d b y t h e Re a l U s e r
C o r p o ra t io n i n wh i c h t h e u s e r is a l lo we d t o c h o o s e f o u r
i m a g e s o f h u m a n f a c e s f ro m t h e f a c e d a t a b a s e a s t h e i r
p a s s wo r d . W h i le in ve r if i c a t i o n p h a se , t h e u s e r i s p r o vi d e d
wi t h a g r i d o f n in e f a ce s, o n e a l re a d y c h o se n d u r i n g t h e
r e g i s t r a t io n a n d e ig h t d e co y f a ce s . T h e u se r i d e n t if ie s t h e
s e l e ct e d f a ce a n d c l i c k s a n ywh e r e o ve r i t . Fo u r t im e s t h i s
c o u r se o f a ct i o n wi l l r e p e a t , a n d t h e u s e r is a s c e rt a in e d a s
g e n u in e if h e r e co g n i ze s a l l f a ce s a cc u r a t e l y.
R e f e re n c e : Re a l U s e r C o rp o ra t io n : P a s sf a ce s.
w w w. p a s sf a c e s. co m
A n e w i n n o va t i ve a u t h e n t ic a t i o n s ch e m e i s p ro p o se d b y
J a n se n f o r m o b i l e d e vi c e s . W h i le c re a t i n g t h e p a ss wo r d ,
t h e u s e r c h o o se s a t h e m e o f s n a p sh o t s in t h u m b n a i l s ize
a n d t h e se q u e n c e o f t h o s e sn a p s h o t s i s f i xe d a s p a s swo r d .
A s e a ch t h u m b n a i l i s a s s o c ia t e d wi t h n u m e r i c a l va l u e , t h e
s e q u e n ce o f im a g e s f o rm n u m e r i c a l p a s s wo r d . T h e o n ly
d r a wb a c k wi t h t h i s m e t h o d i s t h a t t h e p a s s wo r d s p a ce i s n o t
l a r g e , a s n o o f im a g e s i s l i m it e d t o 3 0 .
R e f e re n c e : W . Ja n s e n , " A u t h e n t i c a t i n g U s e r s o n H a n d h e ld
D e vi c e s “ i n P r o c e e d in g s o f C a n a d ia n I n f o r m a t io n
T e c h n o lo g y S e cu r it y S ym p o s i u m , 2 0 0 3 .
Page | 14
ICCT COLLEGES FOUNDATION INCORPORATED
T o o ve r c o m e s h o u l d e r - s u rf i n g ch a l le n g e , m a n y m e t h o d s
h a ve b e e n p ro p o se d . O n e o f su c h t e c h n i q u e i s d e s i g n e d b y
M a n , e t a l I n t h i s s ys t e m , t h e u s e r se l e ct s m a n y p o r t r a i t s a s
t h e p a s s o b j e ct s . E a ch p a ss o b j e c t is a l lo t t e d a n in im i t a b le
c o d e . D u r i n g t h e ve r if i c a t i o n p r o ce s s, t h e u se r h a s t o in p u t
t h o s e u n i q u e c o d e s o f t h e p a s s o b j e c t s in t h e l o g i n
i n t e rf a ce s p r e s e n t e d b y t h e s ys t e m . T h r o u g h t h e s ch e m e
r e s i s t s t h e u n vi s i b l e ca m e r a , t h e u s e r h a s t o m e m o r i ze a l l
p a s s o b j e c t co d e s. I n t h i s wa y, m a n y o t h e r g r a p h i c a l
a u t h e n t ic a t i o n s ch e m e s a n d t h e i r d ra wb a c k s a r e p re se n t e d
i n a l a t e st su r ve y p a p e r .
R e f e re n c e : S . Ma n , D . H o n g , a n d M . M a t h e ws , " A
s h o u l d e r su rf in g r e s i s t a n t g r a p h i ca l p a s s wo r d s ch e m e , " in
P r o ce e d i n g s o f I n t e r n a t i o n a l c o n f e r e n c e o n se cu r i t y a n d
m a n a ge m e n t . L a s V e g a s, N V , 2 0 0 3
Page | 15
ICCT COLLEGES FOUNDATION INCORPORATED
h t t p s : / / p d f s . se m a n t i c s c h o l a r. o r g / 0 9 d 0 / 3 a e 6 f 8 e d c5 f 0 c 1 2 3 f 5 0
7 7 0 0 9 3 f 2 2 c d 2 8 1 cb 1 . p d f
I n t h e se co n d p a r t o f t h e d i s se r t a t io n we i n ve st i g a t e o n l i n e
a u t h e n t ic a t i o n s ch e m e s f r e q u e n t l y u t i l i ze d b y m o b i l e u se r s ,
s u c h a s t h e m o st c o m m o n we b a u t h e n t ic a t i o n b a se d u p o n
t h e u s e r ’ s p a s s wo r d s a n d t h e r e ce n t l y wi d e s p re a d m o b i l e 2 -
f a c t o r a u t h e n t i c a t io n (2 F A ) wh i c h e xt e n d s t h e p a s s wo r d -
b a se d a p p ro a ch wi t h a se co n d a r y a u t h e n t ic a t o r se n t t o a
Page | 16
ICCT COLLEGES FOUNDATION INCORPORATED
u se r ’ s m o b i l e d e vi c e o r g e n e r a t e d o n i t ( e . g , a O n e - t im e
P a s s wo r d ( O T P ) o r T ra n sa ct i o n A u t h e n t ic a t i o n N u m b e r
( T A N ) ) . I n t h i s c o n t e xt we d e m o n s t ra t e va r i o u s we a k n e s s e s
o f m o b i le 2 F A s c h e m e s d e p lo ye d f o r l o g i n ve r if i ca t io n b y
g l o b a l I n t e rn e t se rvi c e p r o vi d e r s ( s u c h a s G o o g l e , D ro p b o x,
T wi t t e r, a n d Fa c e b o o k ) a n d b y a p o p u l a r G o o g l e
A u t h e n t ic a t o r a p p . T h e s e we a k n e s se s a l lo w a n a t t a c ke r t o
i m p e r s o n a t e l e g i t im a t e u se r s e ve n if t h e i r m o b i l e d e vi c e
wi t h t h e se c o n d a ry a u t h e n t i ca t o r i s n o t co m p r o m i se d . W e
t h e n g o o n e s t e p f u r t h e r a n d d e ve l o p a g e n e r a l a t t a c k
m e t h o d f o r b yp a s si n g m o b i le 2 F A s ch e m e s . O u r m e t h o d
r e l i e s o n a c r o s s - p l a t f o rm i n f e ct i o n (m o b i l e -t o -P C o r P C - t o -
m o b i l e ) a s a f i r s t s t e p in o rd e r t o co m p ro m i s e t h e P e r so n a l
C o m p u t e r ( P C ) a n d a m o b i l e d e vi c e o f t h e sa m e u se r . W e
d e ve l o p p r o o f -o f - co n ce p t p r o t o t yp e s f o r a c ro s s - p la t f o rm
i n f e c t i o n a n d s h o w h o w a n a t t a c ke r ca n b yp a ss va r i o u s
i n s t a n t i a t io n s o f m o b i le 2 F A s c h e m e s o n c e b o t h d e vi c e s ,
P C a n d t h e m o b i l e p l a t f o r m , a r e i n f e c t e d . W e t h e n d e l i ve r
p r o o f - o f - c o n c e p t a t t a ck im p le m e n t a t io n s t h a t b yp a s s o n l i n e
b a n k i n g so l u t i o n s b a se d o n S M S - b a s e d T A N s a n d vi s u a l
c r yp t o g r a m s , a s we l l a s l o g i n ve r if i ca t i o n s c h e m e s d e p l o ye d
b y va r i o u s I n t e r n e t s e r vi c e p r o vi d e r s. F i n a l l y, we p ro p o s e a
wa l l e t - b a se d se c u r e s o lu t io n f o r p a ss wo r d - b a se d
a u t h e n t ic a t i o n wh i c h r e qu i r e s n o se co n d a r y a u t h e n t i ca t o r ,
a n d ye t p r o vi d e s b e t t e r se cu r i t y g u a ra n t ie s t h a n , e . g . ,
m o b i l e 2 FA sc h e m e s .
h t t p : / / t u p r i n t s . u lb . t u - d a rm s t a d t . d e / 4 6 1 1 / 3
Page | 17
ICCT COLLEGES FOUNDATION INCORPORATED
There have been related works done before, like doing survey and finding
the users habit of password management. Survey seems to be the best
way to find the way users manage their passwords.
Survey was done by Morris and Thompson over 3289 passwords, in which
they found 89% of the passwords where weak. Weak passwords are
created due to the lack of knowledge about the policy.
h t t p s : / / ww w. d u o . u io . n o / b i t st r e a m / h a n d l e / 1 0 8 5 2 / 3 4 7 3 5 / sh a zi
a r a h m a n -m a s t e r s . p d f ? se q u e n ce = 2
Page | 18
ICCT COLLEGES FOUNDATION INCORPORATED
R e s e a r c h in d i ca t e s t h a t t h e re a r e p r o b l e m s e n c o u n t e r e d i n
p a s s wo r d m a n a ge m e n t . O n e s u r ve y ( M o r r i s a n d T h o m p so n )
f o u n d t h a t m o s t p a s s wo r d s a re we a k . A n id e a s o o n f o l l o we d ,
r e s u l t in g in a study report of p ro p o s i n g a g r a p h i ca l
a u t h e n t ic a t i o n m e t h o d s i n wh i ch t h e p a s s wo r d i s ge n e ra t e d b y
a l l o wi n g t h e u s e r t o c l i c k o n d if f e re n t p o s it i o n s o n a n im a g e
( B l o n d e r ). A l l o f t h e st u d y yi e l d e d va l i d r e s u l t s , t h u s d u e t o
t h e ra p id g r o wt h o f in f o r m a t io n a g e , i t i s i m p o rt a n t t o in n o va t e
p a s s wo r d a u t h e n t ic a t io n s.
Page | 19
ICCT COLLEGES FOUNDATION INCORPORATED
CHAPTER 3
CONCEPTUAL FRAM EWORK AND THEORETICAL
FRAM EWORK
Enter
phone
number
Page | 20
ICCT COLLEGES FOUNDATION INCORPORATED
S e cu r i n g mobile d e vi c e s h a s become i n c re a s in g l y
i m p o r t a n t i n re c e n t ye a r s a s t h e n u m b e r s o f t h e d e vi c e s in
o p e r a t io n a n d t h e u s e s t o wh i c h t h e y a r e p u t h a ve e xp a n d e d
d r a m a t i c a l l y. T h e p r o b le m i s co m p o u n d e d wi t h i n t h e e n t e rp r i s e
a s t h e o n go i n g t r e n d t o wa r d I T co n su m e r i za t i o n i s r e su l t i n g in
m o re a n d m o r e e m p l o ye e - o wn e d d e vi c e s co n n e ct i n g t o t h e
c o r p o r a t e n e t wo r k .
T o e n su r e o n e ’ s m o b i l e ’ s se cu r i t y we d e ve l o p a a p p t h a t
c a n h e lp s e cu r e u s e r ’ s p h o n e . I n o r d e r f o r t h e a p p t o wo r k
f i r st , e n t e r yo u r p h o n e n u m b e r , t h e n vi e w t h e s e t u p p a s s w o r d ,
f e e d b a c k, and update. N e xt the user co u ld set up their
p a s s wo r d in a f i r st o p t i o n . L a s t l y t h e u se r c o u l d u p d a t e t h e i r
m o b i l e a p p s a n d a l s o t h e y c a n ch a n g e t h e i r p a s s wo r d , se t t h e
p a s s wo r d a n d a c t iva t e t h e l o c k sc r e e n a n d a p p l o c k . T h e u se r
f in a l l y a c t i va t e s t h e i r l o ck .
Page | 21
ICCT COLLEGES FOUNDATION INCORPORATED
3 . 4 P RO J E C T W O R K B R E AK D O W N AN AL Y S I S
Duration May 30 -31 JUNE 1-17 JUNE 18-22 June 25 - 29
Task Name
W TH M T W TH F SAT M T W TH F SAT M T W TH F SAT
1 Planning for the title
2 Planing for the System
Prepare the first
3 progress report
4 Analyzing the system
Page | 22
ICCT COLLEGES FOUNDATION INCORPORATED
3 . 4 O RG AN I Z AT I O N AL F L O W C H AR T
S u r ve y Programmer S u r ve y
J o h n L e st e r C h a d r i ch
B r yl e B a u t i st a
Ramos A lf o r q u e
Researcher Re s e a r ch e r Researcher
J o e n e l yn A p a r i c e A l i c ia R a n i d o R o se l l e M a la r d e
Researcher
J e s s i c a A ra n i l la
Page | 23
ICCT COLLEGES FOUNDATION INCORPORATED
CHAPTER 4
RESE ARCH METHODOLOGY
Page | 24
ICCT COLLEGES FOUNDATION INCORPORATED
Source of Data
Books
Survey
Published
Questionaire
Articles and
Internet
Page | 25
ICCT COLLEGES FOUNDATION INCORPORATED
T h e st u d y wi l l h a ve 1 0 0 m o b i l e p h o n e u se r s t o b e u s e d
a s s u b j e c t s. A l l o f t h e se p a r t i c i p a n t s we r e r a n d o m l y c h o se n
t h r o u g h r a n d o m sa m p l i n g . T h e p a r t ic i p a n t s wi l l b e s p li t a n d b e
c a t e g o r i ze d a s 5 0 t e e n a g e r s a n d 5 0 a d u l t s , in wh i c h it wi l l b e
d e t e rm i n e d b y a ge . W h e re t e e n a g e r s a r e r a n g i n g f ro m 1 6 - 2 0
a g e s a n d a d u l t s a r e e q u i va l e n t t o 2 1 - 4 0 a g e s. S i n c e t h e a ge
o f t h e r e sp o n d e n t s a re vi e we d b y t h e re s e a r c h e r s t o b e a n
i m p o r t a n t c h a r a ct e r i s t i c i n u n d e r st a n d i n g t h e i r vi e ws a b o u t
m o b i l e s e cu r i t y. C o n s id e r in g t h e a g e i n d i c a t e s t h e l e ve l o f
m a t u r it y o f t h e su b j e ct s .
An d r o i d u s e r s N u m b e r o f R e s p on d e n t s
Total: 1 0 0 Re s p o n d e n t s
Page | 26
ICCT COLLEGES FOUNDATION INCORPORATED
D a t a G a t he r i n g I ns t r u me n t s
T h e r e se a r ch e r u se d t h e f o l lo wi n g i n s t r u m e n t s i n t h e s t u d y:
F o r t h i s s t u d y, su r ve y - q u e s t i o n n a i r e wa s u se d t o g a t h e r
r a w a n d r e l i a b l e r e s p o n se s d i r e ct ly f r o m t h e su b je c t s . T h e
r e s e a r c h e r s d e ve lo p e d t h e i n st r u m e n t t h a t wa s s t ru c t u r e d o n a
4 - p o i n t s ca l e r a n g i n g f ro m “ S t ro n g l y A g r e e ” ( S A ) , “ A g r e e ”
( A ) , “ D i sa g r e e ” ( D) t o “ S t r o n g l y D i s a g r e e ” ( S D ) , t o ga t h e r t h e
r e q u i r e d i n f o rm a t io n . T h e q u e st i o n n a i r e i s p e r t a in i n g t o t h e
e f f e c t i ve n e s s o f g ra p h i c a l i m a g e s p a s s wo r d f o r m o b i l e d e vi c e s
a n d i t i s d i vi d e d a s 3 q u e st i o n s c a t e g o r i za t i o n k n o wn t o b e a s
l a yo u t s a t i sf a c t io n , f u n ct i o n sa t i sf a c t i o n , a n d u s e r s a t i sf a c t io n .
This in vo l ve s d is t r i b u t i n g paper q u e st i o n n a i r e s for the
s u b j e c t s t o a n s we r j u s t a s t h e re s e a r c h e r s l e t s t h e m t r y o u t
t h e u se o f g r a p h ic a l p a s s wo r d a u t h e n t i ca t io n . T h e g a t h e r ed
i n f o rm a t io n wi l l b e u s e d t o t a l l y t h e r e su l t s a n d t h i s i s k n o wn
t o b e va l u a b le , a s t h e r e su l t s yi e l d a p r o p e r in s i g h t .
Q u e s t i o n na i re – T h e q u e s t io n n a ir e wa s d e s i g n e d t o
o b t a in in f o r m a t io n a b o u t t h e re s p o n d e n t s a s t o t h e co u r se o f
I n f o rm a t io n T e c h n o l o g y a s we l l a s t o g a t h e r t h e o p in i o n s o f
r e s p o n d e n t s r e ga r d i n g st u d e n t ’ s f o r wh a t i s h e r / sh e o p in i o n
a b o u t o u r s ys t e m . Q u e s t i o n n a i r e is a s e t o f q u e s t io n s h a s
b e e n p r e p a r e d t o a s k a n u m b e r o f q u e s t io n s a n d c o l l e c t
Page | 27
ICCT COLLEGES FOUNDATION INCORPORATED
a n s we r s f ro m re sp o n d e n t s re l a t i n g t o t h e r e se a r ch t o p ic . A
number of questions u su a l l y in printed form are to be
a n s we r e d b y t h e i n d i vi d u a l s. T h e f o r m s o f t e n h a ve b l a n k
s p a ce s in wh i c h t h e a n s we r s c a n b e wr i t t e n . S e t s o f su c h
f o rm s a re d i st r i b u t e d t o g r o u p s a n d t h e a n s we r s a r e co l l e ct e d
r e l a t in g t o re s e a rc h t o p i c . A q u e s t i o n n a i r e i s a se r i e s o f
q u e s t io n s a s k e d t o i n d i vi d u a l s t o o b t a in st a t i s t i ca l ly u s e f u l
i n f o rm a t io n a b o u t a g i ve n t o p i c .
Page | 28
ICCT COLLEGES FOUNDATION INCORPORATED
T o f in d p e r c e n t a g e a n d f r e q u e n c y w h o a g r e e d a n d d isa g r e e
o n a c e r t a i n q u e s t io n . W e u se d t h i s e q u a t io n :
Formula:
No. of respondents
X 100% = To t a l
T o t a l n u m b e r o f re s p o n d e n t s
F r e q ue n c y/
P e rc e n ta g e
F o r we i g h t e d m e a n , W e u se d t h i s e q u a t io n t o c o m p u t e t h e
we i g h t e d m e a n o f e a c h q u e st i o n s . .
Formula:
N o . o f r e s p o n d e n t s x we i g h t e d ca t e go r y = Total weighted
mean
Page | 29
ICCT COLLEGES FOUNDATION INCORPORATED
those random people to conduct a survey. They are not ashamed to entertain us
since we told them we would like introduce our mobile application and then,
introduce our mobile apps, They are having difficulty on a fourth part of session
apps. The fourth part of mobile apps is really difficult one for the users desire.
for them some taking photo from them for integrated systems training part in a
research paper but the respondents told to the researchers, they felt so
uncomfortable when the researchers taking a photo of them. So, the researchers
Page | 30
ICCT COLLEGES FOUNDATION INCORPORATED
CHAPTER 5
PRESENTATION, AN ALYSIS AND INTERPRETATION
OF DAT A
I n t h i s c h a p t e r wi l l s h o w yo u t h e c o m p o n e n t s , d a t a f lo w ,
s ys t e m f lo w c h a r t t o b u i ld o u r m o b i l e a p p a n d a l so t h e s u r ve y
result.
5 . 1 . 2 S O F TW AR E C O M P O N E NT S
Laptop
- T o s h ib a S a t e l l i t e C 6 5 5 / W in d o ws 7 / 6 4 b i t s / 4 g b
R A M / I n t e l C o re – i3 - 2 3 1 0 @ 2 . 1 0 G H z 2 . 1 0 G H z
Compiler
- X a ma r i n V i s ua l S t u d i o 2 0 1 7
H a r dw a re
GHz or faster processor. Dual-core or better recommended
2 GB of RAM; 4 GB of RAM recommended (2.5 GB minimum if
running on a virtual machine)
Hard disk space: up to 130 GB of available space, depending on
features installed; typical installations require 20-50 GB of free
space.
Hard disk speed: to improve performance, install Windows and
Visual Studio on a solid state drive (SSD).
Video card that supports a minimum display resolution of 720p
(1280 by 720); Visual Studio will work best at a resolution of
WXGA (1366 by 768) or higher.
Page | 31
ICCT COLLEGES FOUNDATION INCORPORATED
P r o g ra m mi n g La ng u a g e
- C#
N u g e t P a c k a g e s / An d r o i d L i b ra r y S u p p o r t
- X a m a r in A n d r o id S u p p o r t v4
- X a m a r in A n d r o id S u p p o r t v7 A p p C o m p a t
- X a m a r in A n d r o id S u p p o r t v7 Ca r d V ie w
- X a m a r in A n d r o id S u p p o r t v7 Re c yc l e r V i e w
- X a m a r in A n d r o id S u p p o r t V e ct o r D r a wa b l e
- X a m a r in A n d r o id S u p p o r t De s i g n
- X a m a r in A n d r o id S u p p o r t A n im a t e d V e ct o r D ra wa b l e
- R e f r a ct o re d C o n t ro l s C i r c l e I m a g e V ie w
Page | 32
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 33
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 34
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 35
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 36
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 37
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 38
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 39
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 40
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 41
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 42
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 43
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 44
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 45
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 46
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 47
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 48
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 49
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 50
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 51
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 52
ICCT COLLEGES FOUNDATION INCORPORATED
Q u e s t io n n o . 1
G r a p h i ca l p a s s wo rd a re e a s y t o re m e m b e r
T e e n a g e r:
Disagree 1 1.96% 2
Strongly Disagree 0 0% 0
Adult:
Agree 33 67.35 % 99
Disagree 2 4.08 % 4
Page | 53
ICCT COLLEGES FOUNDATION INCORPORATED
80 74.51
70 67.35
60
50
40
30 26.53
23.53
20
10
4.08
2.04 1.96
0
0
ADULT TEENAGER
T h i s t a b l e t h a t 2 3 . 5 3 % o f t e e n a g e r a n d 2 6 . 5 3 o f a d u lt S t r o n g l y
A g r e e a b o u t re m e m b e r i n g im a g e s p a s s wo r d t h a n t o t e xt u a l
p a s s wo r d . 7 4 . 5 1 % o f t e e n a g e r a n d 6 7 . 3 5 o f a d u lt A g r e e a b o u t
r e m e m b e r i n g im a ge s p a ss wo r d t h a n t o t e xt u a l p a ss wo r d .
1.96% of teenager and 4.08 of adult Disagree about
r e m e m b e r i n g im a ge s p a ss wo r d t h a n t o t e xt u a l p a ss wo r d . 0 %
o f t e e n a g e r a n d 2 . 0 4 o f a d u lt D i s a g re e a b o u t re m e m b e r i n g
i m a g e s p a s s wo r d r t h a n t o t e xt u a l p a s s wo r d .
T h e i n t e r p re t a t io n o f d a t a o f q u e s t io n n u m b e r 1 sh o ws t h a t
m o s t o f t h e t e e n a ge r a re a g r e e o n r e m e m b e r in g g r a p h ic a l
p a s s wo r d s.
Page | 54
ICCT COLLEGES FOUNDATION INCORPORATED
Q u e s t io n n o . 2
I m a g e s u se d in t h e p a ss wo r d a re sa t i sf yi n g
T e e n a g e r:
Agree 23 45.10% 69
Disagree 0 0 % 0
Adult:
Agree 17 34.69 % 51
Disagree 11 22.45 % 22
Page | 55
ICCT COLLEGES FOUNDATION INCORPORATED
60
52.94
50
45.1
40.82
40
34.69
30
22.45
20
10
2.04 1.96
0
0
ADULT TEENAGER
T h i s t a b l e s h o ws t h a t 5 2 . 9 4 % o f t e e n a g e r a n d 4 0 . 8 2 % o f
A d u l t s a r e S t r o n g l y a g r e e a b o u t t o t h e im a g e s u se d p ro vi d e d i n
m o b i l e a p p s a s a p a s s wo r d . 4 5 . 1 0 % o f t e e n a ge r a n d 3 4 . 6 9 % o f
A d u l t s a r e A g r e e a b o u t t o t h e i m a g e s u se d p ro vi d e d i n m o b i l e
a p p s a s a p a ss wo r d . 0 % o f t e e n a g e r a n d 2 2 . 4 5 % o f A d u l t s a r e
D i s a g r e e a b o u t t o t h e im a g e s u s e d p r o vi d e d i n m o b i le a p p s a s a
p a s s wo r d . 1 . 9 6 % o f t e e n a g e r a n d 2 . 0 4 % o f A d u l t s a r e S t r o n g l y
D i s a g r e e a b o u t t o t h e im a g e s u s e d p r o vi d e d i n m o b i le a p p s a s a
p a s s wo r d .
T h e I n t e r p r e t a t io n o f t h e d a t a m o st o f t h e t e e n a ge r S t r o n g l y
A g r e e a b o u t t o t h e i m a g e s u se d p r o vi d e d i n m o b i l e a p p s a s a
p a s s wo r d .
Page | 56
ICCT COLLEGES FOUNDATION INCORPORATED
Question n o . 3
Teenager:
Agree 9 17.65 % 27
Disagree 4 7.84 % 8
Adult:
Variable Frequency Percentage W eighted Mean
Agree 23 46.94 % 69
Disagree 3 6.12 % 6
Page | 57
ICCT COLLEGES FOUNDATION INCORPORATED
80
72.53
70
60
50 46.94
42.86
40
30
20 17.65
10 6.12 7.84
4.08
1.96
0
ADULT TEENAGER
T h i s t a b l e s h o ws t h a t 7 2 . 5 3 % o f t e e n a g e r a n d 4 2 . 8 6 % o f a d u l t
a r e S t ro n g l y A g r e e t o t h e la n g u a g e t h a t u s e d t o m o b i le
apps.17.65% of teenager and 46.94% of adult are Agree to the
l a n g u a g e t h a t u se d t o m o b i le a p p s . 7 . 8 4 % o f t e e n a g e r a n d 6 . 1 2 %
o f a d u l t a re D i sa g r e e t o t h e l a n g u a ge t h a t u s e d t o m o b i l e a p p s .
1 . 9 6 % o f t e e n a g e r a n d 4 . 0 8 % o f a d u l t a re S t r o n g l y D i s a g r e e t o
t h e l a n g u a g e t h a t u s e d t o m o b i le a p p s .
T h e i n t e rp r e t a t io n o f t h e d a t a m o s t o f t h e t e e n a g e r a r e
S t r o n g l y A g r e e t o t h e l a n g u a g e t h a t u s e d t o m o b i le a p p s .
Page | 58
ICCT COLLEGES FOUNDATION INCORPORATED
Question n o . 4
Teenager:
Agree 24 47.06 % 72
Disagree 2 3.92 % 6
Strongly Disagree 0 0 % 0
Adult:
Variable Frequency Percentage W eighted Mean
Agree 21 42.86 % 63
Disagree 1 2.04 % 2
Page | 59
ICCT COLLEGES FOUNDATION INCORPORATED
80
72.53
70
60
50 46.94
42.86
40
30
20 17.65
10 6.12 7.84
4.08
1.96
0
ADULT TEENAGER
T h i s t a b l e s h o ws t h a t 7 2 . 5 3 % o f t e e n a g e r a n d 4 2 . 8 6 % o f a d u lt
a r e S t ro n g l y A g r e e wi t h re a d a b i l i t y o f t h e t e xt f o n t . 1 7 . 6 5 % o f
t e e n a g e r a n d 4 6 . 9 4 % o f a d u l t a re A g r e e wi t h r e a d a b i l i t y o f t h e
t e xt f o n t . 7 . 8 4 % o f t e e n a g e r a n d 6 . 1 2 % o f a d u l t a re D is a g r e e
wi t h r e a d a b i l i t y o f t h e t e xt f o n t . 1 . 9 6 % o f t e e n a ge r a n d 4 . 0 8 % o f
a d u l t a r e S t r o n g l y D i s a g r e e wi t h r e a d a b i l i t y o f t h e t e xt f o n t .
T h e i n t e rp r e t a t io n o f t h e d a t a m o s t o f t h e t e e n a g e r a r e
S t r o n g l y A g r e e wi t h r e a d a b i l i t y o f t h e t e xt .
Page | 60
ICCT COLLEGES FOUNDATION INCORPORATED
Question n o . 5
Teenager:
Agree 32 62.75 % 96
Disagree 2 3.92 % 4
Adult:
Variable Frequency Percentage W eighted Mean
Agree 21 42.86 % 63
Disagree 10 20.41 % 20
Page | 61
ICCT COLLEGES FOUNDATION INCORPORATED
70
62.75
60
50
42.86
40
34.69
31.37
30
20.41
20
10
3.92
2.04 1.96
0
ADULT TEENAGER
T h i s t a b le sh o ws t h a t 3 1 . 3 7 % o f t e e n a g e r a n d 3 4 . 6 9 % a r e
S t r o n g l y A g r e e a b o u t u s a b i l i t y o f m o b i l e a p p s. 6 2 . 7 5 % o f
teenager and 42.86% of adult Agree about the usability of mobile
a p p s . 3 . 9 2 % o f t e e n a g e r a n d 2 0 . 4 1 % o f a d u l t D i sa g r e e a b o u t t h e
u s a b i l i t y o f m o b i l e a p p s. 1 . 9 6 % o f t e e n a g e r a n d 2 . 0 4 % o f a d u lt
S t r o n g l y D i s a g r e e a b o u t t h e u s a b i l i t y o f m o b i l e a p p s.
T h e i n t e r p re t a t io n o f d a t a m o st o f t h e t e e n a ge r A g r e e a b o u t t h e
u s a b i l i t y o f m o b i l e a p p s.
Page | 62
ICCT COLLEGES FOUNDATION INCORPORATED
Question n o . 6
Teenager:
Agree 21 41.18 % 63
Disagree 2 3.92 % 6
Strongly Disagree 0 0 % 0
Adult:
Variable Frequency Percentage W eighted Mean
Agree 18 36.73 % 54
Disagree 6 12.24 % 12
Strongly Disagree 0 0 % 0
Page | 63
ICCT COLLEGES FOUNDATION INCORPORATED
60
54.9
51.02
50
41.18
40 36.73
30
20
12.24
10
3.92
2.04
0
0
ADULT TEENAGER
T h i s t a b le sh o ws t h a t 5 4 . 9 0 % o f t e e n a g e r a n d 5 1 . 0 2 % o f a d u l t
a r e S t ro n g l y A g r e e a b o u t t h e C o lo r t h e m e o f t h e la yo u t .
4 1 . 1 8 % o f t e e n a ge r a n d 3 6 . 7 3 % o f a d u l t a r e A g r e e a b o u t t h e
C o l o r t h e m e o f t h e l a yo u t . 3 . 9 2 % o f t e e n a g e r a n d 1 2 . 2 4 % o f
a d u l t a r e D i s a g r e e a b o u t t h e Co l o r t h e m e o f t h e la yo u t . 0 % o f
t e e n a g e r a n d 0 % o f a d u l t a re S t r o n g l y D i s g r e e a b o u t t h e C o lo r
t h e m e o f t h e la yo u t .
T h i s in t e r p r e t a t i o n o f d a t a m o s t o f t h e t e e n a ge r a re S t ro n g l y
A g r e e a b o u t t h e Co l o r t h e m e o f t h e la yo u t .
Page | 64
ICCT COLLEGES FOUNDATION INCORPORATED
Question n o . 7
Teenager:
Agree 15 29.41 % 45
Disagree 1 1.96 % 2
Strongly Disagree 0 0 % 0
Adult:
Variable Frequency Percentage W eighted Mean
Agree 17 34.69 % 51
Disagree 8 16.33 % 16
Page | 65
ICCT COLLEGES FOUNDATION INCORPORATED
80
68.63
70
60
50 46.94
40 34.69
29.41
30
20 16.33
10
2.04 1.96
0
0
ADULT TEENAGER
T h i s t a b l e s h o ws t h a t 6 8 . 6 3 % o f t e e n a g e r a n d 4 6 . 9 9 % o f a d u lt
a r e S t ro n g l y A g r e e a b o u t t h e s e c u r it y o f t h e i r m o b i l e d e vi c e s .
2 9 . 4 1 % o f t e e n a ge r a n d 3 4 . 6 9 % o f a d u l t a r e A g r e e a b o u t t h e
s e c u r it y o f t h e i r m o b i le d e vi c e s . 1 . 9 6 % o f t e e n a g e r a n d 1 6 . 3 3 %
o f a d u l t a re d i s a g re e a b o u t t h e se cu ri t y o f t h e i r m o b i l e d e vi c e s .
0 % o f t e e n a g e r a n d 2 . 0 4 % o f a d u l t a r e s t ro n g l y d i s a g r e e a b o u t
t h e se c u r i t y o f t h e i r m o b i le d e vi c e s .
T h e i n t e r p r e t a t io n o f d a t a m o st t e e n a g e r a r e S t r o n g l y A g r e e
a b o u t t h e se c u r i t y o f t h e i r m o b i l e d e vi c e s .
Page | 66
ICCT COLLEGES FOUNDATION INCORPORATED
Question n o . 8
Teenager:
Agree 28 54.90 % 84
Disagree 2 3.92 % 4
Strongly Disagree 0 0 % 0
Adult:
Variable Frequency Percentage W eighted Mean
Agree 24 48.98 % 72
Disagree 4 8.16 % 8
Strongly Disagree 0 0 % 0
Total: 49 100 % 16
Page | 67
ICCT COLLEGES FOUNDATION INCORPORATED
60
54.9
48.86
50
42.86
41.18
40
30
20
10 8.16
3.92
0 0
0
ADULT TEENAGER
T h i s t a b le sh o w t h a t 4 1 . 1 8 % o f t e e n a g e r a n d 4 2 . 8 6 % a re
S t r o n g l y A g r e e a b o u t r u n n in g o f a p p s o n m o b i l e d e vi c e s . 5 4 . 9 0 %
o f t e e n a g e r a n d 4 8 . 9 8 % a re A g r e e a b o u t ru n n i n g o f a p p s o n
m o b i l e d e vi c e s . 3 . 9 2 % o f t e e n a g e r a n d 8 . 1 6 % a r e D i sa g r e e a b o u t
r u n n in g o f a p p s o n m o b i l e d e vi c e s . 0 % o f t e e n a g e r a n d 0 % a r e
S t r o n g l y D i s a g r e e a b o u t r u n n in g o f a p p s o n m o b i l e d e vi c e s .
T h e i n t e rp r e t a t io n o f d a t a m o s t o f t h e t e e n a g e r a r e A g r e e
A g r e e a b o u t ru n n in g o f a p p s o n m o b i l e d e vi c e s .
Page | 68
ICCT COLLEGES FOUNDATION INCORPORATED
Question n o . 9
Teenager:
Agree 31 68.78 % 84
Disagree 1 1.96 % 4
Strongly Disagree 0 0 % 0
Adult:
Variable Frequency Percentage W eighted Mean
Agree 28 57.14 % 84
Disagree 3 6.12 % 6
Strongly Disagree 0 0 % 0
Page | 69
ICCT COLLEGES FOUNDATION INCORPORATED
80
68.78
70
60 57.14
50
40 37.25 37.25
30
20
10 6.12 6.12
0 0
0
ADULT TEENAGER
T h i s t a b l e s h o w t h a t 3 7 . 2 5 % o f t e e n a g e r a n d 3 6 . 7 3 % o f a d u l t a re
S t r o n g l y A g r e e a b o u t t h e f u n ct i o n a l it y o f m o b i le a p p s . 6 8 . 7 8 % o f
t e e n a g e r a n d 5 7 . 1 4 % o f a d u l t a re A g r e e a b o u t t h e f u n ct i o n a l i t y o f
m o b i l e a p p s . 1 . 9 6 % o f t e e n a ge r a n d 6 . 1 2 % o f a d u l t a re D i sa g r e e
a b o u t t h e f u n ct i o n a l i t y o f m o b i l e a p p s . 0 % o f t e e n a g e r a n d 0 % o f
adult are Strongly Disagree about the functionality of mobile
apps.
T h e in t e r p re t a t i o n o f d a t a m o s t t e e n a g e r a re A g r e e a b o u t t h e
f u n c t io n a l i t y o f m o b i l e a p p s.
Page | 70
ICCT COLLEGES FOUNDATION INCORPORATED
Question n o . 10
Teenager:
Agree 17 33.33 % 51
Disagree 2 3.92 % 4
Strongly Disagree 0 0 % 0
Adult:
Variable Frequency Percentage W eighted Mean
Agree 20 40.82 % 60
Disagree 10 20.41 % 20
Page | 71
ICCT COLLEGES FOUNDATION INCORPORATED
70
62.75
60
50
40.82
40 36.73
33.33
30
20.41
20
10
3.92
2.04
0
0
ADULT TEENAGER
T h e i n t e r p re t a t io n o f d a t a m o st t e e n a g e r a r e S t r o n g l y A g r e e
a b o u t sa t i sf a ct i o n o f u s in g t h i s m o b i le a p p .
Page | 72
ICCT COLLEGES FOUNDATION INCORPORATED
Question n o . 11
Teenager:
Agree 21 41.18 % 63
Disagree 2 3.92 % 4
Adult:
Variable Frequency Percentage W eighted Mean
Agree 22 44.90 % 66
Disagree 8 16.33 % 16
Strongly Disagree 0 0 % 0
Page | 73
ICCT COLLEGES FOUNDATION INCORPORATED
60
52.94
50
44.9
41.18
38.78
40
30
20 16.33
10
3.92
2.04 1.96
0
0
ADULT TEENAGER
T h i s t a b l e s h o w t h a t 5 2 . 9 4 % o f t e e n a g e r a n d 3 8 . 7 8 % o f a d u l t a re
S t r o n g l y A g r e e a b o u t sa t i sf a ct i o n o f r e c o m m e n d in g t h e m o b i le
a p p s t o t h e o t h e r u s e r s. 4 1 . 1 8 % o f t e e n a g e r a n d 4 4 . 9 0 % o f a d u l t
a r e A g r e e a b o u t sa t i sf a ct i o n o f re c o m m e n d in g t h e m o b i l e a p p s t o
t h e o t h e r u s e r s. 3 . 9 2 % o f t e e n a g e r a n d 1 6 . 3 3 % o f a d u lt a re
d i s a g r e e a b o u t sa t i s f a ct i o n o f re c o m m e n d in g t h e m o b i le a p p s t o
t h e o t h e r u s e r s. 1 , 9 6 % o f t e e n a g e r a n d 0 % o f a d u l t a r e d i sa g r e e
a b o u t sa t i sf a ct i o n o f re c o m m e n d i n g t h e m o b i le a p p s t o t h e o t h e r
u s e r s.
T h e i n t e r p re t a t io n o f d a t a m o st t e e n a g e r a r e S t r o n g l y a g r e e
a b o u t sa t i sf a ct i o n o f re c o m m e n d i n g t h e m o b i le a p p s t o t h e o t h e r
u s e r s.
Page | 74
ICCT COLLEGES FOUNDATION INCORPORATED
CHAPTER 6
SUMM ARY , CONCLUSION AND RECOMMENDATION
T h e G P S a n d i n t r u d e r se lf ie wi l l a c t i va t e a u t o m a t i ca l l y a n d it
wo u l d se n d t h e l o ca t i o n a n d p i c t u r e t o t h e u se r ’ s gm a i l a c c o u n t .
T h e y c o u l d o p e n t h e i r gm a i l a c co u n t o n co m p u t e r e ve n t h e i r
s m a r t p h o n e wa s st o l e n . T h e in f o r m a t i o n t h a t se n d t o t h e u se r
wo u l d se r ve a s a e vi d e n ce t o t r a c k a n d a r r e s t t h e c r im i n a l s . I n
t e rm s o f m o b i le se c u r i t y, T h e h a c k e rs c o u l d n o t e a s i l y a c c e s s t o
t h e u s e r ’ s m o b i le d e vi c e s . S i n c e , T h e r e se a r c h e s im p le m e n t e d
t h e g r a p h i ca l p a s swo r d a s a n i n n o va t e d p a s s wo r d ,
C yb e r c r i m i n a l s c o u l d n ’ t d o t h e i r n e f a r i o u s a c t i vi t y f o r t h e i r
vi c t i m s .
Page | 75
ICCT COLLEGES FOUNDATION INCORPORATED
6.2 CONCLUSION
A password is a string of characters used to verify the identity of a user
during the authentication process. User’s passwords are typically used in
conjuncture with a username; they are designed to be known only to the user
and allow that user to gain access to a device, application or website. User’s
passwords are hacked in a variety of ways and for a variety of reasons.
Sometimes the hacker is someone you know. It could be a “frenemy” who wants
to access your information. If a hacker is unknown to you, a brute force attack is
the most common strategy for cracking your password. In this method, a program
systematically tries every password combination until it gains access. That is why
the simpler the user’s password is, the easier it is for someone to gain access.
Since it has not yet been shown to all and not already to introduce widely.
After the studies and survey interpretation, we conclude that our new
developed app is the new best way to secure user’s mobile. Phone users are
new to this kind of password. The color / images password authentication will be
made on mobile devices. The color/images pattern password authentication were
inspired to the slide puzzle game and candy crush games where the user are
able to create their own pattern of images and arrange their own images and
colors when the user are setting up a password before it can would activated.
The password authentication color /images pattern can be used on screen lock
and app lock.
Page | 76
ICCT COLLEGES FOUNDATION INCORPORATED
6.3 RECOMMENDATION
T o t he m ob i l e de ve l o p e rs
The main function of mobile application is already functionable and there are
some of features we did not implement and we highly recommended this mobile
application to the Mobile developers to continue what we start and add more
amazing features to make our Mobile Users are highly secured against to the
hackers.
Here are the following features that we have not finished completing but this type
of mobile apps need to build and implement for the security of mobile users
around the world.
- Change Password
- Forgot Password
- Intruder Notification
- Help
- Feedback
- LockScreen and Applock Activation
- Attempts activation
- Automated GPS to activate when someone tried to open their
mobile device.
- Slide Puzzle and Color/Images pattern that would serve as a
recommended password authentication. (but we have already
session password authentication for the user’s choice)
- Phone number that would serve as a login and connected to the
user’s gmail account.
- SMS for forgot password verification .
Page | 77
ICCT COLLEGES FOUNDATION INCORPORATED
APPENDIX
An d r o i d M a n i f e s t . x m l
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="15" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="de.uulm.graphicalpasswords.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Page | 78
ICCT COLLEGES FOUNDATION INCORPORATED
android:name="de.uulm.graphicalpasswords.openmiba.MIBAActivity"
android:label="@string/title_activity_miba" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.uulm.graphicalpasswords.MainActivity" />
</activity>
<activity
android:name="de.uulm.graphicalpasswords.openmiba.MIBACreatePasswordActivity"
android:label="@string/title_activity_miba_create_password" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.uulm.graphicalpasswords.openmiba.MIBAActivity"
/>
</activity>
<activity
android:name="de.uulm.graphicalpasswords.openmiba.MIBASettingsActivity"
android:label="@string/title_activity_miba_settings" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.uulm.graphicalpasswords.openmiba.MIBAActivity"
/>
</activity>
<activity
android:name="de.uulm.graphicalpasswords.openmiba.MIBALoginActivity"
android:label="@string/title_activity_miba_login" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.uulm.graphicalpasswords.openmiba.MIBAActivity"
/>
</activity>
<activity
android:name="de.uulm.graphicalpasswords.openpassgo.PassGoActivity"
android:label="@string/title_activity_pass_go" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.uulm.graphicalpasswords.MainActivity" />
</activity>
<activity
android:name="de.uulm.graphicalpasswords.openpassgo.PassGoCreatePasswordActivity"
android:label="@string/title_activity_pass_go_create_password" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.uulm.graphicalpasswords.openpassgo.PassGoActivity" />
</activity>
<activity
android:name="de.uulm.graphicalpasswords.openpassgo.PassGoSettingsActivity"
android:label="@string/title_activity_pass_go_settings" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
Page | 79
ICCT COLLEGES FOUNDATION INCORPORATED
android:value="de.uulm.graphicalpasswords.openpassgo.PassGoActivity" />
</activity>
<activity
android:name="de.uulm.graphicalpasswords.openpassgo.PassGoLoginActivity"
android:label="@string/title_activity_pass_go_login" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.uulm.graphicalpasswords.openpassgo.PassGoActivity" />
</activity>
<activity
android:name="de.uulm.graphicalpasswords.opentapi.TAPIActivity"
android:label="@string/title_activity_tapi" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.uulm.graphicalpasswords.MainActivity" />
</activity>
<activity
android:name="de.uulm.graphicalpasswords.opentapi.TAPICreatePasswordActivity"
android:label="@string/title_activity_tapi_create_password" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.uulm.graphicalpasswords.opentapi.TAPIActivity"
/>
</activity>
<activity
android:name="de.uulm.graphicalpasswords.opentapi.TAPILoginActivity"
android:label="@string/title_activity_tapi_login" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.uulm.graphicalpasswords.opentapi.TAPIActivity"
/>
</activity>
<activity
android:name="de.uulm.graphicalpasswords.opentapi.TAPISettingsActivity" >
android:label="@string/title_activity_tapi_settings" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.uulm.graphicalpasswords.opentapi.TAPIActivity"
/>
</activity>
<activity
android:name="de.uulm.graphicalpasswords.openuyi.UYIActivity"
android:label="@string/title_activity_uyi" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.uulm.graphicalpasswords.MainActivity" />
</activity>
<activity
android:name="de.uulm.graphicalpasswords.openuyi.UYICreatePasswordActivity"
android:label="@string/title_activity_uyicreate_password" >
Page | 80
ICCT COLLEGES FOUNDATION INCORPORATED
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.uulm.graphicalpasswords.openuyi.UYIActivity" />
</activity>
<activity
android:name="de.uulm.graphicalpasswords.openuyi.UYILoginActivity"
android:label="@string/title_activity_uyilogin" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.uulm.graphicalpasswords.openuyi.UYIActivity" />
</activity>
<activity
android:name="de.uulm.graphicalpasswords.openuyi.UYISettingsActivity"
android:label="@string/title_activity_uyi_settings" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="de.uulm.graphicalpasswords.openuyi.UYIActivity" />
</activity>
</application>
</manifest>
T h e s e a re pa s s w o r d a u t he n t i c a ti on f e a t ur e s . O p e n t h e f i r s t
one.
Page | 81
ICCT COLLEGES FOUNDATION INCORPORATED
G e s t ur e . c s
package de.uulm.graphicalpasswords.openmiba;
import android.os.Parcel;
import android.os.Parcelable;
/*
* This field is needed for Android to be able to create new objects,
* individually or as arrays.
*/
@SuppressWarnings("rawtypes")
public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
public Gesture createFromParcel(Parcel in) {
return new Gesture(in);
}
@Override
public void writeToParcel(Parcel parcel, int arg1) {
parcel.writeInt(picID);
parcel.writeBooleanArray(gesture);
}
@Override
Page | 82
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
public String toString() {
String res = "(" + picID + ":";
for (int i = 0; i < gesture.length; i++) {
if (gesture[i]) {
res += 1;
} else {
res += 0;
}
}
res += ")";
return res;
}
}
ImageIndexTable.cs
package de.uulm.graphicalpasswords.openmiba;
import java.util.ArrayList;
import java.util.List;
public static int m = 521; // mit 9 bit sind 512 bilder notwendig
boolean[] isused;
Page | 83
ICCT COLLEGES FOUNDATION INCORPORATED
public ImageIndexTable() {
this.isused = new boolean[m];
}
/**
* Returns an index of a image that wasn't used already. If we have more
* rounds than pictures than increase the offset, which means that all
* pictures are unused again
*
* @param pos
* @return
*/
public int getIndex(int pos) {
if (pos > m - 1) {
return 0;
}
if (isused[pos] == false) {
isused[pos] = true;
indexedpos.add(pos);
return pos % PICTURELIMIT;
} else
return getIndex(pos, 1);
}
Page | 84
ICCT COLLEGES FOUNDATION INCORPORATED
if (isused[temp] == false) {
isused[temp] = true;
indexedpos.add(temp);
return temp % PICTURELIMIT;
} else {
i++;
return getIndex(pos, i);
}
MIBAActivity.cs
package de.uulm.graphicalpasswords.openmiba;
import de.uulm.graphicalpasswords.R;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.support.v4.app.NavUtils;
import android.annotation.TargetApi;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.preference.PreferenceManager;
Page | 85
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_miba);
// Show the Up button in the action bar.
setupActionBar();
}
@Override
protected void onResume() {
super.onResume();
Button login = (Button) findViewById(R.id.btn_login);
SharedPreferences sharedPref = PreferenceManager
.getDefaultSharedPreferences(this);
if (sharedPref.getString("miba_pw", "").equals(""))
login.setEnabled(false);
else
login.setEnabled(true);
}
/**
* Set up the {@link android.app.ActionBar}, if the API is available.
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void setupActionBar() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
getActionBar().setDisplayHomeAsUpEnabled(true);
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is
present.
getMenuInflater().inflate(R.menu.miba, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of
this
// activity, the Up button is shown. Use NavUtils to allow
users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
//
http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
Page | 86
ICCT COLLEGES FOUNDATION INCORPORATED
NavUtils.navigateUpFromSameTask(this);
return true;
case R.id.action_settings:
Intent intent = new Intent(
this,
de.uulm.graphicalpasswords.openmiba.MIBASettingsActivity.class);
startActivity(intent);
}
return super.onOptionsItemSelected(item);
}
de.uulm.graphicalpasswords.openmiba.MIBACreatePasswordActivity.class);
startActivity(intent);
}
de.uulm.graphicalpasswords.openmiba.MIBALoginActivity.class);
startActivity(intent);
}
}
MIBACreatePasswordActivity.cs
package de.uulm.graphicalpasswords.openmiba;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
import de.uulm.graphicalpasswords.R;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.Vibrator;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
Page | 87
ICCT COLLEGES FOUNDATION INCORPORATED
import android.util.Log;
import android.view.Display;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Surface;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.Gallery;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TableLayout;
import android.widget.TextView;
import android.support.v4.app.NavUtils;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.content.res.TypedArray;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.preference.PreferenceManager;
Page | 88
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
// requestWindowFeature(Window.FEATURE_NO_TITLE);
// getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
// WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_miba_create_password);
Page | 89
ICCT COLLEGES FOUNDATION INCORPORATED
intro.setArguments(bundle);
intro.show(getFragmentManager(), "intro");
setViews();
seenPictureIds.add(R.drawable.ccp000);
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new
AlertDialog.Builder(getActivity());
String message = getString(R.string.msg_dialog_miba_createpw,
getArguments().getInt("length"));
builder.setTitle(R.string.title_dialog_miba_createpw)
.setMessage(message)
.setNeutralButton(R.string.btn_ok, new
OnClickListener() {
@Override
public void onClick(DialogInterface
dialog, int which) {
dialog.dismiss();
}
});
return builder.create();
}
}
.findViewById(R.id.miba_rememberpw_gallery));
activity.unbindDrawables(activity.findViewById(R.id.tableLayout));
System.gc();
Gallery g = (Gallery) layout
.findViewById(R.id.miba_rememberpw_gallery);
g.setAdapter(new ImageAdapter(activity.getBaseContext(),
activity
Page | 90
ICCT COLLEGES FOUNDATION INCORPORATED
.getSeenPictureIDs(), activity.getInput()));
R.string.title_dialog_miba_rememberpw))
.setPositiveButton(
getResources().getString(R.string.btn_done),
new
DialogInterface.OnClickListener() {
public void
onClick(DialogInterface dialog,
int which) {
SharedPreferences
sharedPref = PreferenceManager
.getDefaultSharedPreferences(getActivity());
.edit();
edit.putString(
"miba_pw",
((MIBACreatePasswordActivity) getActivity())
.buildPasswordString());
edit.commit();
dialog.dismiss();
getActivity().finish();
}
});
return builder.create();
}
Page | 91
ICCT COLLEGES FOUNDATION INCORPORATED
.obtainStyledAttributes(R.styleable.UYIGallery);
galleryItemBackground = attr
.getResourceId(
R.styleable.UYIGallery_android_galleryItemBackground,
0);
attr.recycle();
}
@Override
public int getCount() {
return pictureIDs.size() - 1;
}
@Override
public Object getItem(int position) {
return position;
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup
parent) {
ImageView i = new ImageView(mContext);
i.setScaleType(ImageView.ScaleType.FIT_XY);
i.setBackgroundResource(galleryItemBackground);
Bitmap b = BitmapFactory.decodeResource(getResources(),
pictureIDs.get(position));
Bitmap mutableBitmap = b.copy(Bitmap.Config.ARGB_8888,
true);
Canvas c = new Canvas(mutableBitmap);
Paint p = new Paint();
p.setColor(Color.RED);
p.setStyle(Style.FILL);
p.setAlpha(75);
p.setAntiAlias(true);
Paint p2 = new Paint();
p2.setColor(Color.WHITE);
p2.setStyle(Style.STROKE);
p2.setStrokeWidth(5);
p2.setAntiAlias(true);
Page | 92
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 93
ICCT COLLEGES FOUNDATION INCORPORATED
2 * imageWidth - 5, 3 *
imageHeight - 5, p2);
break;
case 6:
if (tmp.get(j))
c.drawRect(5, 3 * imageHeight + 5,
imageWidth - 5,
4 * imageHeight - 5,
p);
c.drawRect(5, 3 * imageHeight + 5,
imageWidth - 5,
4 * imageHeight - 5, p2);
break;
case 7:
if (tmp.get(j))
c.drawRect(imageWidth + 5, 3 *
imageHeight + 5,
2 * imageWidth - 5, 4
* imageHeight - 5, p);
c.drawRect(imageWidth + 5, 3 * imageHeight
+ 5,
2 * imageWidth - 5, 4 *
imageHeight - 5, p2);
break;
}
}
i.setImageBitmap(mutableBitmap);
return i;
}
}
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
/**
* Set up the {@link android.app.ActionBar}, if the API is available.
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void setupActionBar() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
getActionBar().setDisplayHomeAsUpEnabled(true);
}
}
Page | 94
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.miba_create_password, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of this
// activity, the Up button is shown. Use NavUtils to allow users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
// http://developer.android.com/design/patterns/navigation.html#up-
vs-back
//
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
}
/**
* Transforms the user input to a passwordstring. This string may contain
* unprintable ASCII Codes.
*
* @return
*/
public String buildPasswordString() {
String res = "";
}
return res;
}
Page | 95
ICCT COLLEGES FOUNDATION INCORPORATED
/**
* Returns the index of the next background image depending on the previous
* user input
*
* @return
*/
public int getImageIndex() {
if (input.size() < INPUTLENGTH)
return -1;
int res = 0;
// significant
// bit
// zuerst
res = res << 1;
res = res + boolToInt(a);
}
res = imgidxtable.getIndex(res);
Log.i(LOG_TAG, "this entry lead to imageindex " + res);
return res;
}
@Override
public void onClick(View v) {
back();
}
});
btnDone = (Button) findViewById(R.id.miba_btnCreateMasterKey);
Page | 96
ICCT COLLEGES FOUNDATION INCORPORATED
if (display.getRotation() == Surface.ROTATION_0) {
width = tblLayout.getWidth();
height = tblLayout.getHeight();
} else {
height = tblLayout.getWidth();
width = tblLayout.getHeight();
}
Page | 97
ICCT COLLEGES FOUNDATION INCORPORATED
tblLayout.getViewTreeObserver().removeGlobalOnLayoutListener(
this);
}
});
btnDone.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
DialogFragment dialog = new
RememberPasswordDialogFragment();
dialog.show(getFragmentManager(), "remember");
}
});
btnDone.setVisibility(View.VISIBLE);
}
setFinishable(false);
// last state
boolean isshift = touchlistener.getLastState();
Page | 98
ICCT COLLEGES FOUNDATION INCORPORATED
seenPictureIds.add(img);
Page | 99
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
protected void onDestroy() {
super.onDestroy();
unbindDrawables(findViewById(R.id.tableLayout));
System.gc();
}
Page | 100
ICCT COLLEGES FOUNDATION INCORPORATED
private
MIBACreatePasswordHandler(WeakReference<MIBACreatePasswordActivity> instance) {
activity = instance.get();
}
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case TouchListener.MSG_ROUND_FINISHED: {
activity.longpress = false;
activity.current_round++;
activity.tvRound.setText(activity
.getString(R.string.label_round)
+""
+ activity.current_round);
Page | 101
ICCT COLLEGES FOUNDATION INCORPORATED
.getSystemService(Context.VIBRATOR_SERVICE);
activity.tvRound.setText(activity
.getString(R.string.label_round)
+""
+ activity.current_round + " -Shift-");
activity.longpress = true;
}
activity.input.add(shifted[x1][y1]);
}
}
activity.input.add(true); // shifted true
break;
}
}
activity.checkIfFinished();
}
}
}
M I B AS e t t i n g s Ac t i vi t y. c s
package de.uulm.graphicalpasswords.openmiba;
import android.annotation.TargetApi;
Page | 102
ICCT COLLEGES FOUNDATION INCORPORATED
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
import android.view.MenuItem;
import android.support.v4.app.NavUtils;
import java.util.List;
import de.uulm.graphicalpasswords.R;
import de.uulm.graphicalpasswords.opentapi.TAPIActivity;
/**
* A {@link PreferenceActivity} that presents a set of application settings. On
* handset devices, settings are presented as a single list. On tablets,
* settings are split by category, with category headers shown to the left of
* the list of settings.
* <p>
* See <a href="http://developer.android.com/design/patterns/settings.html">
* Android Design: Settings</a> for design guidelines and the <a
* href="http://developer.android.com/guide/topics/ui/settings.html">Settings
* API Guide</a> for more information on developing a Settings UI.
*/
public class MIBASettingsActivity extends PreferenceActivity implements
OnSharedPreferenceChangeListener {
/**
* Determines whether to always show the simplified settings UI, where
* settings are presented in a single list. When false, settings are shown
* as a master/detail two-pane view on tablets. When true, a single pane is
* shown on tablets.
*/
private static final boolean ALWAYS_SIMPLE_PREFS = true;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setupActionBar();
}
/**
* Set up the {@link android.app.ActionBar}, if the API is available.
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void setupActionBar() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
// Show the Up button in the action bar.
getActionBar().setDisplayHomeAsUpEnabled(true);
}
Page | 103
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of
this
// activity, the Up button is shown. Use NavUtils to allow
users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
//
http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
// TODO: If Settings has multiple levels, Up should navigate
up
// that hierarchy.
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
setupSimplePreferencesScreen();
}
/**
* Shows the simplified settings UI if the device configuration if the
* device configuration dictates that a simplified, single-pane UI should
be
* shown.
*/
private void setupSimplePreferencesScreen() {
if (!isSimplePreferences(this)) {
return;
}
// Add preferences.
addPreferencesFromResource(R.xml.pref_miba);
Page | 104
ICCT COLLEGES FOUNDATION INCORPORATED
bindPreferenceSummaryToValue(findPreference("miba_length"));
}
/** {@inheritDoc} */
@Override
public boolean onIsMultiPane() {
return isXLargeTablet(this) && !isSimplePreferences(this);
}
/**
* Helper method to determine if the device has an extra-large screen. For
* example, 10" tablets are extra-large.
*/
private static boolean isXLargeTablet(Context context) {
return (context.getResources().getConfiguration().screenLayout &
Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;
}
/**
* Determines whether the simplified settings UI should be shown. This is
* true if this is forced via {@link #ALWAYS_SIMPLE_PREFS}, or the device
* doesn't have newer APIs like {@link PreferenceFragment}, or the device
* doesn't have an extra-large screen. In these cases, a single-pane
* "simplified" settings UI should be shown.
*/
private static boolean isSimplePreferences(Context context) {
return ALWAYS_SIMPLE_PREFS
|| Build.VERSION.SDK_INT <
Build.VERSION_CODES.HONEYCOMB
|| !isXLargeTablet(context);
}
/** {@inheritDoc} */
@Override
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public void onBuildHeaders(List<Header> target) {
if (!isSimplePreferences(this)) {
loadHeadersFromResource(R.xml.pref_headers, target);
}
}
/**
* A preference value change listener that updates the preference's summary
* to reflect its new value.
*/
private static Preference.OnPreferenceChangeListener
sBindPreferenceSummaryToValueListener = new
Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object
value) {
String stringValue = value.toString();
Page | 105
ICCT COLLEGES FOUNDATION INCORPORATED
/**
* Binds a preference's summary to its value. More specifically, when the
* preference's value is changed, its summary (line of text below the
* preference title) is updated to reflect the value. The summary is also
* immediately updated upon calling this method. The exact display format
is
* dependent on the type of preference.
*
* @see #sBindPreferenceSummaryToValueListener
*/
private static void bindPreferenceSummaryToValue(Preference preference) {
// Set the listener to watch for value changes.
preference
.setOnPreferenceChangeListener(sBindPreferenceSummaryToValueListener);
preference.getContext()).getString(preference.getKey(),
""));
}
@Override
protected void onResume() {
super.onResume();
PreferenceManager.getDefaultSharedPreferences(this)
.registerOnSharedPreferenceChangeListener(this);
}
Page | 106
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
protected void onPause() {
super.onPause();
PreferenceManager.getDefaultSharedPreferences(this)
.unregisterOnSharedPreferenceChangeListener(this);
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
String key) {
if (key.equals("miba_length")) {
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.remove("miba_pw");
editor.commit();
}
}
}
TouchListener.cs
package de.uulm.graphicalpasswords.openmiba;
import java.util.ArrayList;
import java.util.List;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.LinearLayout;
Page | 107
ICCT COLLEGES FOUNDATION INCORPORATED
boolean[][] copyArray(boolean[][] a) {
@Override
public void run() {
while (!cancel_shift) {
Log.i(LOG_TAG, "i m thread checker " + getName());
if (isArrayEqual(laststate, active_recs) &&
!cancel_shift) {
Log.i(LOG_TAG, "thread: arrays are equal " +
getName());
Message msg = Message.obtain();
msg.what = MSG_SHIFT_ROUND_FINISHED;
msg.obj = copyArray(active_recs);
handler.sendMessage(msg);
longpress = true;
return;
Page | 108
ICCT COLLEGES FOUNDATION INCORPORATED
} else {
if (cancel_shift)
return;
laststate = copyArray(active_recs);
try {
Thread.sleep(750);
} catch (InterruptedException e) {
Log.i(LOG_TAG, "i got interupted from
sleep "
+ getName());
}
}
Log.i(LOG_TAG, "thread stopped " + getName());
// active rectangles
boolean[][] active_recs = { { false, false, false, false },
{ false, false, false, false } };
Page | 109
ICCT COLLEGES FOUNDATION INCORPORATED
/**
* If user hits the back button in LoginActivity, make sure longpress is
* available again or not. It's not allowed that two shifts are coming
* directly in a row long long short is not allowed
*
* @return true if second last was shifted
*/
public boolean reset() {
// erst ein element in der liste
if (isshifted.size() <= 1) {
secclick = false;
isshifted.clear();
return false;
}
// letzten l�schen
isshifted.remove(isshifted.size() - 1);
Page | 110
ICCT COLLEGES FOUNDATION INCORPORATED
return vorletzter;
}
@Override
public boolean onTouch(View v, MotionEvent event) {
// if (event.getAction() == MotionEvent.ACTION_MOVE) return true;
int action = event.getAction() & MotionEvent.ACTION_MASK;
// down
// Log.i(LOG_TAG, "First Down: PtrId: "+ ptrId + " PtrIdx: " +
// ptrIdx);
longpress = false;
cancel_shift = false;
Log.i(LOG_TAG, "frist pointer down: shift enabled");
} else {
// thus always is created a new checker thread
shiftchecker = new ShiftCheckerThread();
shiftchecker.start();
}
Page | 111
ICCT COLLEGES FOUNDATION INCORPORATED
} else {
// doubleClick(event, 0);
// gone up
// normal click
if (!longpress || secclick) {
Log.i(LOG_TAG, "last pointer up: shift canceled");
cancel_shift = true;
initArray(active_recs, false);
// goes down
/*
* ptrIdx = (event.getAction() &
* MotionEvent.ACTION_POINTER_INDEX_MASK) >>
* MotionEvent.ACTION_POINTER_INDEX_SHIFT;
*/
// ptrId = event.getPointerId(ptrIdx);
Page | 112
ICCT COLLEGES FOUNDATION INCORPORATED
setRectangleStateMoving(event.getX(ptrIdx),
event.getY(ptrIdx),
true, ptrId, true);
}
} else if (action == MotionEvent.ACTION_POINTER_DOWN) { // none
primary
// pointer goes
// down
// doubleClick(event, ptrIdx);
} else if (action == MotionEvent.ACTION_POINTER_UP) { // none
primary
// pointer goes
// down
// Log.i(LOG_TAG, "Further UP PtrId: "+ ptrId + " PtrIdx: " +
// ptrIdx);// describeEvent(event));
// switchOffOldActivation(ptrId);
setRectangleStateMoving(event.getX(ptrIdx),
event.getY(ptrIdx),
false, ptrId, false);
}
return true;
}
Page | 113
ICCT COLLEGES FOUNDATION INCORPORATED
linlGrid[x1][y1].setVisibility(View.VISIBLE);
if (moving) {
activatedbypointerid[x1][y1] = -1;
active_recs[x1][y1] = false;
}
}
}
}
}
if (active) {
/*
* //make it darker float[] hsv = new float[3];
* Color.colorToHSV(color, hsv); hsv[2] *= 0.8f; color =
* Color.WHITE; //Color.HSVToColor(hsv);
*/
// Log.v(LOG_TAG, "Rectangle x" + coords[0] + " y" +
coords[1]);
active_recs[coords[0]][coords[1]] = true;
activatedbypointerid[coords[0]][coords[1]] = ptrID;
linlGrid[coords[0]][coords[1]].setVisibility(View.INVISIBLE);
}
}
Page | 114
ICCT COLLEGES FOUNDATION INCORPORATED
MIBALoginActivity.cs
package de.uulm.graphicalpasswords.openmiba;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import de.uulm.graphicalpasswords.R;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.Vibrator;
import android.preference.PreferenceManager;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.content.DialogInterface.OnClickListener;
import android.content.pm.ActivityInfo;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.util.Log;
import android.view.Display;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Surface;
import android.view.View;
import android.view.ViewTreeObserver;
Page | 115
ICCT COLLEGES FOUNDATION INCORPORATED
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TableLayout;
import android.widget.TextView;
import android.support.v4.app.NavUtils;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
// requestWindowFeature(Window.FEATURE_NO_TITLE);
// getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
// WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_miba_login);
Page | 116
ICCT COLLEGES FOUNDATION INCORPORATED
setViews();
}
/**
* Set up the {@link android.app.ActionBar}.
*/
private void setupActionBar() {
getActionBar().setDisplayHomeAsUpEnabled(true);
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is
present.
getMenuInflater().inflate(R.menu.miba_login, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of
this
// activity, the Up button is shown. Use NavUtils to allow
users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
//
http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
}
Page | 117
ICCT COLLEGES FOUNDATION INCORPORATED
});
Display display =
getWindowManager().getDefaultDisplay();
if (display.getRotation() == Surface.ROTATION_0) {
width = tableLayout.getWidth();
height = tableLayout.getHeight();
} else {
height = tableLayout.getWidth();
width = tableLayout.getHeight();
}
Bitmap bmp =
BitmapFactory.decodeResource(getResources(),
R.drawable.ccp000);
bmp = Bitmap.createScaledBitmap(bmp, width, height,
true);
Drawable d = new BitmapDrawable(getResources(), bmp);
bmp = null; // prevent outofmemor
tableLayout.setBackgroundDrawable(d);
Page | 118
ICCT COLLEGES FOUNDATION INCORPORATED
tableLayout.getViewTreeObserver().removeGlobalOnLayoutListener(
this);
}
});
}
/**
* Returns the index of the next background image depending on the previous
* user input
*
* @return
*/
public int getImageIndex() {
Page | 119
ICCT COLLEGES FOUNDATION INCORPORATED
int res = 0;
// significant
// bit
// first
res = res << 1;
res = res + boolToInt(a);
}
res = imgidxtable.getIndex(res);
Log.i(LOG_TAG, "this entry lead to imageindex " + res);
return res;
}
DialogFragment dialog;
if (buildPasswordString().equals(password)) {
dialog = new ResultOKDialog();
} else {
dialog = new WrongResultDialog();
}
dialog.show(getFragmentManager(), "result");
Page | 120
ICCT COLLEGES FOUNDATION INCORPORATED
}
}
/**
* Transforms the user input to a passwordstring. This string may contain
* unprintable ASCII Codes.
*
* @return
*/
public String buildPasswordString() {
String res = "";
}
return res;
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new
AlertDialog.Builder(getActivity());
builder.setMessage(R.string.msg_pw_correct).setNeutralButton(
R.string.btn_ok, new OnClickListener() {
@Override
public void onClick(DialogInterface
dialog, int id) {
dialog.dismiss();
getActivity().finish();
}
});
return builder.create();
}
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new
AlertDialog.Builder(getActivity());
builder.setMessage(R.string.msg_pw_wrong).setNeutralButton(
R.string.btn_ok, new OnClickListener() {
@Override
public void onClick(DialogInterface
dialog, int id) {
Page | 121
ICCT COLLEGES FOUNDATION INCORPORATED
dialog.dismiss();
getActivity().finish();
}
});
return builder.create();
}
}
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case TouchListener.MSG_ROUND_FINISHED: {
activity.longpress = false;
activity.current_round++;
activity.tvRound.setText(activity
.getString(R.string.label_round)
+ " "
+ activity.current_round);
activity.checkIfFinished();
break;
}
case TouchListener.MSG_SHIFT_ROUND_FINISHED: {
Vibrator v = (Vibrator) activity
.getSystemService(Context.VIBRATOR_SERVICE);
Page | 122
ICCT COLLEGES FOUNDATION INCORPORATED
activity.tvRound.setText(activity
.getString(R.string.label_round)
+ " "
+ activity.current_round + " -Shift-");
activity.longpress = true;
}
activity.input.add(shifted[x1][y1]);
}
}
activity.input.add(true); // shifted true
}
}
}
Coordinates.cs
Page | 123
ICCT COLLEGES FOUNDATION INCORPORATED
package de.uulm.graphicalpasswords.openpassgo;
import android.os.Parcel;
import android.os.Parcelable;
/*
* This field is needed for Android to be able to create new objects,
* individually or as arrays.
*/
@SuppressWarnings("rawtypes")
public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
public Coordinates createFromParcel(Parcel in) {
return new Coordinates(in);
}
@Override
public void writeToParcel(Parcel parcel, int arg1) {
parcel.writeInt(x);
parcel.writeInt(y);
}
@Override
public int describeContents() {
return 0;
}
@Override
public String toString() {
Page | 124
ICCT COLLEGES FOUNDATION INCORPORATED
return "("+x+"|"+y+")";
}
@Override
public boolean equals(Object o) {
if(o.getClass().equals(Coordinates.class)){
return ((Coordinates) o).getX() == x && ((Coordinates)
o).getY() == y;
}
return false;
}
}
DialogPatternView.cs
package de.uulm.graphicalpasswords.openpassgo;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Paint.Cap;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.View;
private float d;
private int offset;
Page | 125
ICCT COLLEGES FOUNDATION INCORPORATED
super(context, attrs);
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
// white background
canvas.getClipBounds(rect);
offset = rect.height() - rect.width();
offset = offset / 2;
paint.setColor(Color.WHITE);
paint.setStyle(Style.FILL);
canvas.drawRect(rect.left, rect.top + offset, rect.right,
rect.bottom
- offset, paint);
// column width
d = rect.width() * 1f / COUNT_CELLS;
// areas
paint.setColor(Color.LTGRAY);
paint.setStyle(Style.FILL);
} else {
canvas.drawRect(rect.left, rect.top + offset + i * d,
rect.left
+ 1 * d, rect.top + offset + (i + 1) * d,
paint);
canvas.drawRect(rect.left + 3 * d, rect.top + offset +
i * d,
rect.left + 4 * d, rect.top + offset + (i
+ 1) * d,
paint);
}
}
// Black grid
paint.setColor(Color.BLACK);
paint.setStyle(Style.STROKE);
Page | 126
ICCT COLLEGES FOUNDATION INCORPORATED
// Stars
paint.setStyle(Style.FILL);
int starsize = 4;
canvas.drawRect(rect.left + 2 * d - starsize, rect.top + offset + 2
* d
- starsize, rect.left + 2 * d + starsize, rect.top +
offset + 2
* d + starsize, paint);
canvas.drawRect(rect.left + 6 * d - starsize, rect.top + offset + 2
* d
- starsize, rect.left + 6 * d + starsize, rect.top +
offset + 2
* d + starsize, paint);
canvas.drawRect(rect.left + 2 * d - starsize, rect.top + offset + 6
* d
- starsize, rect.left + 2 * d + starsize, rect.top +
offset + 6
* d + starsize, paint);
canvas.drawRect(rect.left + 6 * d - starsize, rect.top + offset + 6
* d
- starsize, rect.left + 6 * d + starsize, rect.top +
offset + 6
* d + starsize, paint);
canvas.drawRect(rect.left + 4 * d - starsize, rect.top + offset + 4
* d
- starsize, rect.left + 4 * d + starsize, rect.top +
offset + 4
* d + starsize, paint);
// Scale Path
if (originalWidth > 0 && originalHeight > 0 && !resized) {
float faktor = (COUNT_CELLS * d) / originalWidth;
float topoffset = (originalHeight * faktor - rect.height()) /
2;
resized = true;
}
// fixedPath
paint.setColor(Color.RED);
paint.setStyle(Style.STROKE);
Page | 127
ICCT COLLEGES FOUNDATION INCORPORATED
paint.setStrokeCap(Cap.ROUND);
paint.setStrokeWidth(3);
canvas.drawPath(fixedPath, paint);
// tmpPath
canvas.drawPath(tmpPath, paint);
// DotPath
paint.setStyle(Style.FILL);
canvas.drawPath(dotPath, paint);
// tmpDotPath
canvas.drawPath(tmpDotPath, paint);
PassGo.cs
package de.uulm.graphicalpasswords.openpassgo;
PassGoActivity.cs
package de.uulm.graphicalpasswords.openpassgo;
import de.uulm.graphicalpasswords.R;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.support.v4.app.NavUtils;
import android.annotation.TargetApi;
Page | 128
ICCT COLLEGES FOUNDATION INCORPORATED
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.preference.PreferenceManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pass_go);
// Show the Up button in the action bar.
setupActionBar();
}
@Override
protected void onResume() {
super.onResume();
Button login = (Button) findViewById(R.id.btn_login);
SharedPreferences sharedPref = PreferenceManager
.getDefaultSharedPreferences(this);
if (sharedPref.getString("passgo_pw", "").equals(""))
login.setEnabled(false);
else
login.setEnabled(true);
}
/**
* Set up the {@link android.app.ActionBar}, if the API is available.
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void setupActionBar() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
getActionBar().setDisplayHomeAsUpEnabled(true);
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is
present.
getMenuInflater().inflate(R.menu.pass_go, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of
this
// activity, the Up button is shown. Use NavUtils to allow
users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
Page | 129
ICCT COLLEGES FOUNDATION INCORPORATED
//
//
http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
NavUtils.navigateUpFromSameTask(this);
return true;
case R.id.action_settings:
Intent intent = new Intent(
this,
de.uulm.graphicalpasswords.openpassgo.PassGoSettingsActivity.class);
startActivity(intent);
}
return super.onOptionsItemSelected(item);
}
de.uulm.graphicalpasswords.openpassgo.PassGoCreatePasswordActivity.class);
startActivity(intent);
}
de.uulm.graphicalpasswords.openpassgo.PassGoLoginActivity.class);
startActivity(intent);
}
}
PassGoCreatePasswordActivity.cs
package de.uulm.graphicalpasswords.openpassgo;
import de.uulm.graphicalpasswords.R;
import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.support.v4.app.NavUtils;
import android.annotation.TargetApi;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.SharedPreferences;
import android.os.Build;
import android.preference.PreferenceManager;
Page | 130
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pass_go_create_password);
/**
* Set up the {@link android.app.ActionBar}, if the API is available.
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void setupActionBar() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
getActionBar().setDisplayHomeAsUpEnabled(true);
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is
present.
getMenuInflater().inflate(R.menu.pass_go_create_password, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
Page | 131
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new
AlertDialog.Builder(getActivity());
String message = getString(
R.string.msg_dialog_pass_go_createpw,
getArguments().getInt("length"));
builder.setTitle(R.string.title_dialog_pass_go_createpw)
.setMessage(message)
.setNeutralButton(R.string.btn_ok, new
OnClickListener() {
@Override
public void onClick(DialogInterface
dialog, int which) {
dialog.dismiss();
}
Page | 132
ICCT COLLEGES FOUNDATION INCORPORATED
});
return builder.create();
}
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new
AlertDialog.Builder(getActivity());
builder.setMessage(
R.string.msg_dialog_pass_go_deletepattern)
.setCancelable(false)
.setPositiveButton(R.string.btn_yes, new
OnClickListener() {
@Override
public void onClick(DialogInterface
dialog, int id) {
((PassGoCreatePasswordActivity)
getActivity())
.clearAll();
}
})
.setNegativeButton(R.string.btn_no, new
OnClickListener() {
@Override
public void onClick(DialogInterface
dialog, int which) {
dialog.dismiss();
}
});
return builder.create();
}
}
.findViewById(R.id.passgo_rememberpw_patternView);
Page | 133
ICCT COLLEGES FOUNDATION INCORPORATED
patternViewDialog.setFixedPath(patternView.getFixedPath());
patternViewDialog.setDotPath(patternView.getDotPath());
patternViewDialog.setOriginalDimensions(patternView.getWidth(),
patternView.getHeight());
.setTitle(R.string.title_dialog_pass_go_rememberpw)
.setPositiveButton(R.string.btn_done,
new OnClickListener() {
@Override
public void
onClick(DialogInterface dialog,
int which) {
dialog.dismiss();
getActivity().finish();
}
});
return builder.create();
}
}
PassGoLoginActivity.cs
package de.uulm.graphicalpasswords.openpassgo;
import de.uulm.graphicalpasswords.R;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.content.DialogInterface.OnClickListener;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.support.v4.app.NavUtils;
Page | 134
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pass_go_login);
// Show the Up button in the action bar.
setupActionBar();
/**
* Set up the {@link android.app.ActionBar}.
*/
private void setupActionBar() {
getActionBar().setDisplayHomeAsUpEnabled(true);
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is
present.
getMenuInflater().inflate(R.menu.pass_go_login, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of
this
// activity, the Up button is shown. Use NavUtils to allow
users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
Page | 135
ICCT COLLEGES FOUNDATION INCORPORATED
//
//
http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new
AlertDialog.Builder(getActivity());
builder.setMessage(R.string.msg_pw_correct).setNeutralButton(
R.string.btn_ok, new OnClickListener() {
@Override
public void onClick(DialogInterface
dialog, int id) {
dialog.dismiss();
getActivity().finish();
}
});
return builder.create();
}
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new
AlertDialog.Builder(getActivity());
builder.setMessage(R.string.msg_pw_wrong).setNeutralButton(
R.string.btn_ok, new OnClickListener() {
@Override
Page | 136
ICCT COLLEGES FOUNDATION INCORPORATED
PassGoSettingActivity.cs
package de.uulm.graphicalpasswords.openpassgo;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
import android.view.MenuItem;
import android.support.v4.app.NavUtils;
import java.util.List;
import de.uulm.graphicalpasswords.R;
import de.uulm.graphicalpasswords.opentapi.TAPIActivity;
/**
* A {@link PreferenceActivity} that presents a set of application settings. On
* handset devices, settings are presented as a single list. On tablets,
* settings are split by category, with category headers shown to the left of
* the list of settings.
* <p>
* See <a href="http://developer.android.com/design/patterns/settings.html">
* Android Design: Settings</a> for design guidelines and the <a
* href="http://developer.android.com/guide/topics/ui/settings.html">Settings
* API Guide</a> for more information on developing a Settings UI.
*/
public class PassGoSettingsActivity extends PreferenceActivity implements
OnSharedPreferenceChangeListener {
/**
Page | 137
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setupActionBar();
}
/**
* Set up the {@link android.app.ActionBar}, if the API is available.
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void setupActionBar() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
// Show the Up button in the action bar.
getActionBar().setDisplayHomeAsUpEnabled(true);
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of
this
// activity, the Up button is shown. Use NavUtils to allow
users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
//
http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
// TODO: If Settings has multiple levels, Up should navigate
up
// that hierarchy.
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
setupSimplePreferencesScreen();
}
/**
Page | 138
ICCT COLLEGES FOUNDATION INCORPORATED
// Add preferences.
addPreferencesFromResource(R.xml.pref_passgo);
/** {@inheritDoc} */
@Override
public boolean onIsMultiPane() {
return isXLargeTablet(this) && !isSimplePreferences(this);
}
/**
* Helper method to determine if the device has an extra-large screen. For
* example, 10" tablets are extra-large.
*/
private static boolean isXLargeTablet(Context context) {
return (context.getResources().getConfiguration().screenLayout &
Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;
}
/**
* Determines whether the simplified settings UI should be shown. This is
* true if this is forced via {@link #ALWAYS_SIMPLE_PREFS}, or the device
* doesn't have newer APIs like {@link PreferenceFragment}, or the device
* doesn't have an extra-large screen. In these cases, a single-pane
* "simplified" settings UI should be shown.
*/
private static boolean isSimplePreferences(Context context) {
return ALWAYS_SIMPLE_PREFS
|| Build.VERSION.SDK_INT <
Build.VERSION_CODES.HONEYCOMB
|| !isXLargeTablet(context);
}
/** {@inheritDoc} */
Page | 139
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public void onBuildHeaders(List<Header> target) {
if (!isSimplePreferences(this)) {
loadHeadersFromResource(R.xml.pref_headers, target);
}
}
/**
* A preference value change listener that updates the preference's summary
* to reflect its new value.
*/
private static Preference.OnPreferenceChangeListener
sBindPreferenceSummaryToValueListener = new
Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object
value) {
String stringValue = value.toString();
/**
* Binds a preference's summary to its value. More specifically, when the
* preference's value is changed, its summary (line of text below the
* preference title) is updated to reflect the value. The summary is also
* immediately updated upon calling this method. The exact display format
is
* dependent on the type of preference.
*
* @see #sBindPreferenceSummaryToValueListener
*/
private static void bindPreferenceSummaryToValue(Preference preference) {
Page | 140
ICCT COLLEGES FOUNDATION INCORPORATED
.setOnPreferenceChangeListener(sBindPreferenceSummaryToValueListener);
preference.getContext()).getString(preference.getKey(),
""));
}
@Override
protected void onResume() {
super.onResume();
PreferenceManager.getDefaultSharedPreferences(this)
.registerOnSharedPreferenceChangeListener(this);
}
@Override
protected void onPause() {
super.onPause();
PreferenceManager.getDefaultSharedPreferences(this)
.unregisterOnSharedPreferenceChangeListener(this);
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
String key) {
if (key.equals("passgo_length")) {
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.remove("passgo_pw");
editor.commit();
}
}
}
PatternView.cs
package de.uulm.graphicalpasswords.openpassgo;
import java.util.ArrayList;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Cap;
import android.graphics.Paint.Style;
Page | 141
ICCT COLLEGES FOUNDATION INCORPORATED
import android.graphics.Path.Direction;
import android.graphics.Path;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
private float d;
private int offset;
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
// white canvas
canvas.getClipBounds(rect);
Page | 142
ICCT COLLEGES FOUNDATION INCORPORATED
paint.setColor(Color.WHITE);
paint.setStyle(Style.FILL);
canvas.drawRect(rect.left, rect.top + offset, rect.right,
rect.bottom
- offset, paint);
// column width
d = rect.width() * 1f / COUNT_CELLS;
// areas
paint.setColor(Color.LTGRAY);
paint.setStyle(Style.FILL);
} else {
canvas.drawRect(rect.left, rect.top + offset + i * d,
rect.left
+ 1 * d, rect.top + offset + (i + 1) * d,
paint);
canvas.drawRect(rect.left + 3 * d, rect.top + offset +
i * d,
rect.left + 4 * d, rect.top + offset + (i
+ 1) * d,
paint);
}
}
// black grid
paint.setColor(Color.BLACK);
paint.setStyle(Style.STROKE);
// Stars
paint.setStyle(Style.FILL);
int starsize = 4;
Page | 143
ICCT COLLEGES FOUNDATION INCORPORATED
// fixedPath
paint.setColor(Color.RED);
paint.setStyle(Style.STROKE);
paint.setStrokeCap(Cap.ROUND);
paint.setStrokeWidth(3);
canvas.drawPath(fixedPath, paint);
// tmpPath
canvas.drawPath(tmpPath, paint);
// DotPath
paint.setStyle(Style.FILL);
canvas.drawPath(dotPath, paint);
// tmpDotPath
canvas.drawPath(tmpDotPath, paint);
}
@Override
public boolean onTouch(View v, MotionEvent event) {
// input coordinates
float x = event.getX();
float y = event.getY();
// nearest intersection
int gridX = Math.round(x * 1f / d);
int gridY = Math.round((y * 1f - offset) / d);
// coordinates of intersection
Page | 144
ICCT COLLEGES FOUNDATION INCORPORATED
switch (event.getActionMasked()) {
case MotionEvent.ACTION_DOWN:
if (Math.sqrt(Math.pow(x - gridXc, 2) + Math.pow(y - gridYc,
2)) <= d / 3) {
tmpDotPath.addCircle(gridXc, gridYc, 6, Direction.CW);
dot = true;
lastXc = gridXc;
lastYc = gridYc;
validInput = true;
this.invalidate();
input.add(new Coordinates(gridX, gridY));
}
break;
case MotionEvent.ACTION_MOVE:
tmpPath.reset();
if (validInput) {
if (Math.sqrt(Math.pow(x - gridXc, 2) + Math.pow(y -
gridYc, 2)) <= d / 3) {
fixedPath.moveTo(lastXc, lastYc);
fixedPath.lineTo(gridXc, gridYc);
lastXc = gridXc;
lastYc = gridYc;
tmpPath.reset();
tmpDotPath.reset();
Coordinates lastElement = input.get(input.size()
- 1);
if (!lastElement.equals(new Coordinates(gridX,
gridY))) {
input.add(new Coordinates(gridX, gridY));
dot = false;
currentlength++;
}
} else {
tmpPath.moveTo(lastXc, lastYc);
tmpPath.lineTo(x, y);
}
}
invalidate();
checkLength();
break;
Page | 145
ICCT COLLEGES FOUNDATION INCORPORATED
case MotionEvent.ACTION_UP:
if (validInput) {
if (dot) {
dotPath.addCircle(gridXc, gridYc, 6,
Direction.CW);
currentlength++;// rawData.add(new
//
RawData(event.getEventTime(),
// "ACTION_UP Circle
x:"+gridXc+"y:"+gridYc+" input x:"+x+" input y:"+y));
} else if (Math.sqrt(Math.pow(x - gridXc, 2)
+ Math.pow(y - gridYc, 2)) <= d / 3) {
fixedPath.moveTo(lastXc, lastYc);
fixedPath.lineTo(gridXc, gridYc);
}
input.add(new Coordinates(-1, -1));
}
tmpPath.reset();
tmpDotPath.reset();
validInput = false;
invalidate();
checkLength();
break;
}
return true;
}
Page | 146
ICCT COLLEGES FOUNDATION INCORPORATED
I m a ge Ad a p t e r . c s
package de.uulm.graphicalpasswords.opentapi;
import android.content.Context;
import android.content.res.TypedArray;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import de.uulm.graphicalpasswords.R;
Page | 147
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
public int getCount() {
return pictureIDs.length;
}
@Override
public Object getItem(int position) {
return position;
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
String[] split = pictureIDs[position].split(":");
int resId = Integer.parseInt(split[0]);
int field = Integer.parseInt(split[1]);
RememberPassImageView i = new RememberPassImageView(mContext);
i.setHighlitedField(field);
i.setScaleType(ImageView.ScaleType.FIT_XY);
i.setBackgroundResource(galleryItemBackground);
i.setImageResource(resId);
i.setClickable(false);
return i;
}
P a s s I m a ge V i ew . c s
package de.uulm.graphicalpasswords.opentapi;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Rect;
import android.widget.ImageView;
Page | 148
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
canvas.getClipBounds(rect);
canvas.drawLine(rect.left, rect.top, rect.right, rect.bottom,
paintRed);
canvas.drawLine(rect.left, rect.bottom, rect.right, rect.top,
paintRed);
}
@Override
public void setImageResource(int resId) {
super.setImageResource(resId);
this.resourceID = resId;
}
R e m e m b e rP a s s I ma g e . c s
package de.uulm.graphicalpasswords.opentapi;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Paint.Style;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.widget.ImageView;
Page | 149
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
public void setImageResource(int resId) {
super.setImageResource(resId);
Drawable drawable = getDrawable();
Bitmap bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(),
drawable.getIntrinsicHeight(), Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
drawable.draw(canvas);
paint.setAlpha(150);
paint.setStyle(Style.STROKE);
paint.setAntiAlias(true);
paint.setStrokeWidth(3);
Page | 150
ICCT COLLEGES FOUNDATION INCORPORATED
setImageBitmap(bitmap);
}
T AP I Ac t i vi t y. c s
package de.uulm.graphicalpasswords.opentapi;
import de.uulm.graphicalpasswords.R;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.support.v4.app.NavUtils;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tapi);
// Show the Up button in the action bar.
setupActionBar();
}
@Override
protected void onResume() {
super.onResume();
Button login = (Button) findViewById(R.id.btn_login);
SharedPreferences sharedPref = PreferenceManager
.getDefaultSharedPreferences(this);
if (sharedPref.getString("tapi_pw", "").equals(""))
Page | 151
ICCT COLLEGES FOUNDATION INCORPORATED
login.setEnabled(false);
else
login.setEnabled(true);
}
/**
* Set up the {@link android.app.ActionBar}.
*/
private void setupActionBar() {
getActionBar().setDisplayHomeAsUpEnabled(true);
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is
present.
getMenuInflater().inflate(R.menu.tapi, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of
this
// activity, the Up button is shown. Use NavUtils to allow
users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
//
http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
NavUtils.navigateUpFromSameTask(this);
return true;
case R.id.action_settings:
Intent intent = new Intent(this,
de.uulm.graphicalpasswords.opentapi.TAPISettingsActivity.class);
startActivity(intent);
}
return super.onOptionsItemSelected(item);
}
de.uulm.graphicalpasswords.opentapi.TAPICreatePasswordActivity.class);
startActivity(intent);
}
Page | 152
ICCT COLLEGES FOUNDATION INCORPORATED
de.uulm.graphicalpasswords.opentapi.TAPILoginActivity.class);
startActivity(intent);
}
T AP I L o g i n Ac t i vi t y. c s
package de.uulm.graphicalpasswords.opentapi;
import de.uulm.graphicalpasswords.R;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.content.DialogInterface.OnClickListener;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.ImageView.ScaleType;
import android.widget.TableRow.LayoutParams;
import android.support.v4.app.NavUtils;
import android.text.Editable;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tapi_login);
Page | 153
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
public void addInput(int resID, int field) {
text.append("*");
input[currentIndex] = "" + resID + ":" + field;
currentIndex++;
back.setClickable(true);
back.setEnabled(true);
clear.setClickable(true);
clear.setEnabled(true);
Page | 154
ICCT COLLEGES FOUNDATION INCORPORATED
if (currentIndex == input.length) {
save.setClickable(true);
save.setEnabled(true);
for (int i = 0; i < imageViews.length; i++) {
imageViews[i].setClickable(false);
imageViews[i].setEnabled(false);
}
}
}
Page | 155
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new
AlertDialog.Builder(getActivity());
builder.setMessage(R.string.msg_pw_correct).setNeutralButton(
R.string.btn_ok, new OnClickListener() {
@Override
public void onClick(DialogInterface
dialog, int id) {
dialog.dismiss();
getActivity().finish();
}
});
return builder.create();
}
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new
AlertDialog.Builder(getActivity());
builder.setMessage(R.string.msg_pw_wrong).setNeutralButton(
R.string.btn_ok, new OnClickListener() {
@Override
public void onClick(DialogInterface
dialog, int id) {
dialog.dismiss();
getActivity().finish();
}
});
return builder.create();
}
}
/**
* Set up the {@link android.app.ActionBar}.
*/
private void setupActionBar() {
getActionBar().setDisplayHomeAsUpEnabled(true);
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is
present.
Page | 156
ICCT COLLEGES FOUNDATION INCORPORATED
getMenuInflater().inflate(R.menu.tapi_login, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of
this
// activity, the Up button is shown. Use NavUtils to allow
users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
//
http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
}
T AP I . c s
package de.uulm.graphicalpasswords.opentapi;
T AP I O n T o u c h Li s te n e r. c s
package de.uulm.graphicalpasswords.opentapi;
import android.content.Context;
import android.os.Vibrator;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
Page | 157
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
public boolean onTouch(View view, MotionEvent event) {
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
vibrator.vibrate(25);
float x = event.getX();
float y = event.getY();
int field = 0;
if (y < f1(x)) {
if (y < f2(x)) {
field = 1;
} else {
field = 2;
}
} else {
if (y > f2(x)) {
field = 3;
} else {
field = 4;
}
}
activity.addInput(this.view.getResourceID(), field);
return true;
}
return false;
}
Page | 158
ICCT COLLEGES FOUNDATION INCORPORATED
T AP I C r e a te P a s s w o r d Ac t i vi t y. c s
package de.uulm.graphicalpasswords.opentapi;
import java.util.Arrays;
import java.util.Random;
import de.uulm.graphicalpasswords.opentapi.PassImageView;
import de.uulm.graphicalpasswords.R;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.content.DialogInterface.OnClickListener;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Gallery;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.ImageView.ScaleType;
import android.widget.TableRow.LayoutParams;
import android.support.v4.app.NavUtils;
import android.text.Editable;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tapi_create_password);
Page | 159
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 160
ICCT COLLEGES FOUNDATION INCORPORATED
if (i % 4 == 3) {
table.addView(row);
}
imageViews[i].setOnTouchListener(new TAPIOnTouchListener(this,
imageViews[i]));
}
/**
* Set up the {@link android.app.ActionBar}.
*/
private void setupActionBar() {
getActionBar().setDisplayHomeAsUpEnabled(true);
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is
present.
getMenuInflater().inflate(R.menu.tapi_create_password, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of
this
// activity, the Up button is shown. Use NavUtils to allow
users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
//
http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
public void addInput(int resID, int field) {
text.append("*");
input[currentIndex] = "" + resID + ":" + field;
Page | 161
ICCT COLLEGES FOUNDATION INCORPORATED
currentIndex++;
back.setClickable(true);
back.setEnabled(true);
if (currentIndex == input.length) {
save.setClickable(true);
save.setEnabled(true);
for (int i = 0; i < imageViews.length; i++) {
imageViews[i].setClickable(false);
imageViews[i].setEnabled(false);
}
}
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
Page | 162
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
public void onClick(DialogInterface
dialog, int which) {
dialog.dismiss();
}
});
return builder.create();
}
}
.findViewById(R.id.tapi_rememberpw_gallery));
getActivity().finish();
}
});
return dialog;
}
}
Page | 163
ICCT COLLEGES FOUNDATION INCORPORATED
T AP I S e t t i n gs Ac t i vi t y. c s
package de.uulm.graphicalpasswords.opentapi;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
import android.view.MenuItem;
import android.support.v4.app.NavUtils;
import java.util.List;
import de.uulm.graphicalpasswords.R;
/**
* A {@link PreferenceActivity} that presents a set of application settings. On
* handset devices, settings are presented as a single list. On tablets,
* settings are split by category, with category headers shown to the left of
* the list of settings.
* <p>
* See <a href="http://developer.android.com/design/patterns/settings.html">
* Android Design: Settings</a> for design guidelines and the <a
* href="http://developer.android.com/guide/topics/ui/settings.html">Settings
* API Guide</a> for more information on developing a Settings UI.
*/
public class TAPISettingsActivity extends PreferenceActivity implements
OnSharedPreferenceChangeListener {
/**
* Determines whether to always show the simplified settings UI, where
* settings are presented in a single list. When false, settings are shown
* as a master/detail two-pane view on tablets. When true, a single pane is
* shown on tablets.
*/
private static final boolean ALWAYS_SIMPLE_PREFS = true;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setupActionBar();
}
/**
* Set up the {@link android.app.ActionBar}, if the API is available.
Page | 164
ICCT COLLEGES FOUNDATION INCORPORATED
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void setupActionBar() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
// Show the Up button in the action bar.
getActionBar().setDisplayHomeAsUpEnabled(true);
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of
this
// activity, the Up button is shown. Use NavUtils to allow
users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
//
http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
// TODO: If Settings has multiple levels, Up should navigate
up
// that hierarchy.
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
setupSimplePreferencesScreen();
}
/**
* Shows the simplified settings UI if the device configuration if the
* device configuration dictates that a simplified, single-pane UI should
be
* shown.
*/
private void setupSimplePreferencesScreen() {
if (!isSimplePreferences(this)) {
return;
}
// Add preferences.
Page | 165
ICCT COLLEGES FOUNDATION INCORPORATED
addPreferencesFromResource(R.xml.pref_tapi);
/** {@inheritDoc} */
@Override
public boolean onIsMultiPane() {
return isXLargeTablet(this) && !isSimplePreferences(this);
}
/**
* Helper method to determine if the device has an extra-large screen. For
* example, 10" tablets are extra-large.
*/
private static boolean isXLargeTablet(Context context) {
return (context.getResources().getConfiguration().screenLayout &
Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;
}
/**
* Determines whether the simplified settings UI should be shown. This is
* true if this is forced via {@link #ALWAYS_SIMPLE_PREFS}, or the device
* doesn't have newer APIs like {@link PreferenceFragment}, or the device
* doesn't have an extra-large screen. In these cases, a single-pane
* "simplified" settings UI should be shown.
*/
private static boolean isSimplePreferences(Context context) {
return ALWAYS_SIMPLE_PREFS
|| Build.VERSION.SDK_INT <
Build.VERSION_CODES.HONEYCOMB
|| !isXLargeTablet(context);
}
/** {@inheritDoc} */
@Override
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public void onBuildHeaders(List<Header> target) {
if (!isSimplePreferences(this)) {
loadHeadersFromResource(R.xml.pref_headers, target);
}
}
/**
* A preference value change listener that updates the preference's summary
* to reflect its new value.
*/
private static Preference.OnPreferenceChangeListener
sBindPreferenceSummaryToValueListener = new
Preference.OnPreferenceChangeListener() {
Page | 166
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
public boolean onPreferenceChange(Preference preference, Object
value) {
String stringValue = value.toString();
/**
* Binds a preference's summary to its value. More specifically, when the
* preference's value is changed, its summary (line of text below the
* preference title) is updated to reflect the value. The summary is also
* immediately updated upon calling this method. The exact display format
is
* dependent on the type of preference.
*
* @see #sBindPreferenceSummaryToValueListener
*/
private static void bindPreferenceSummaryToValue(Preference preference) {
// Set the listener to watch for value changes.
preference
.setOnPreferenceChangeListener(sBindPreferenceSummaryToValueListener);
preference.getContext()).getString(preference.getKey(),
""));
}
Page | 167
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
protected void onResume() {
super.onResume();
PreferenceManager.getDefaultSharedPreferences(this)
.registerOnSharedPreferenceChangeListener(this);
}
@Override
protected void onPause() {
super.onPause();
PreferenceManager.getDefaultSharedPreferences(this)
.unregisterOnSharedPreferenceChangeListener(this);
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
String key) {
if (key.equals("tapi_length")) {
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.remove("tapi_pw");
editor.commit();
}
}
}
Page | 168
ICCT COLLEGES FOUNDATION INCORPORATED
U Y I L o g i n Ac t i vi t y. c s
package de.uulm.graphicalpasswords.openuyi;
import java.util.Arrays;
import de.uulm.graphicalpasswords.R;
import android.os.Bundle;
import android.os.Vibrator;
import android.preference.PreferenceManager;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.support.v4.app.NavUtils;
import android.support.v4.view.ViewPager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Page | 169
ICCT COLLEGES FOUNDATION INCORPORATED
setContentView(R.layout.activity_uyi_login);
// Show the Up button in the action bar.
setupActionBar();
@Override
public void onClick(View v) {
vibrator.vibrate(25);
clickedPictures[countClicks] = v.getId();
countClicks++;
if (countClicks == password_length) {
Arrays.sort(clickedPictures);
DialogFragment dialog;
if (password.equals(Arrays.toString(clickedPictures))) {
dialog = new ResultOKDialog();
} else {
dialog = new WrongResultDialog();
}
dialog.show(getFragmentManager(), "result");
}
}
/**
* Set up the {@link android.app.ActionBar}.
*/
private void setupActionBar() {
getActionBar().setDisplayHomeAsUpEnabled(true);
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is
present.
getMenuInflater().inflate(R.menu.uyi_login, menu);
return true;
}
Page | 170
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of
this
// activity, the Up button is shown. Use NavUtils to allow
users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
//
http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new
AlertDialog.Builder(getActivity());
builder.setMessage(R.string.msg_pw_correct).setNeutralButton(
R.string.btn_ok, new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface
dialog, int id) {
dialog.dismiss();
getActivity().finish();
}
});
return builder.create();
}
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new
AlertDialog.Builder(getActivity());
builder.setMessage(R.string.msg_pw_wrong).setNeutralButton(
R.string.btn_ok, new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface
dialog, int id) {
dialog.dismiss();
Page | 171
ICCT COLLEGES FOUNDATION INCORPORATED
getActivity().finish();
}
});
return builder.create();
}
}
P i c t ur e . c s
package de.uulm.graphicalpasswords.openuyi;
import java.util.Arrays;
Page | 172
ICCT COLLEGES FOUNDATION INCORPORATED
I m a ge Ad a p t e r . c s
package de.uulm.graphicalpasswords.openuyi;
import android.content.Context;
import android.content.res.TypedArray;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import de.uulm.graphicalpasswords.R;
@Override
public int getCount() {
return pics.length;
}
@Override
public Object getItem(int position) {
return position;
}
@Override
public long getItemId(int position) {
return position;
}
Page | 173
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ImageView i = new ImageView(mContext);
i.setScaleType(ImageView.ScaleType.FIT_XY);
i.setBackgroundResource(galleryItemBackground);
i.setImageResource(pics[position]);
return i;
}
U Y I S e t t i n gs Ac t i vi t y. c s
package de.uulm.graphicalpasswords.openuyi;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.content.res.Configuration;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceCategory;
import android.preference.PreferenceFragment;
import android.preference.PreferenceManager;
import android.preference.RingtonePreference;
import android.text.TextUtils;
import android.view.MenuItem;
import android.support.v4.app.NavUtils;
import java.util.List;
import de.uulm.graphicalpasswords.R;
import de.uulm.graphicalpasswords.R.string;
import de.uulm.graphicalpasswords.R.xml;
/**
* A {@link PreferenceActivity} that presents a set of application settings. On
* handset devices, settings are presented as a single list. On tablets,
* settings are split by category, with category headers shown to the left of
* the list of settings.
* <p>
* See <a href="http://developer.android.com/design/patterns/settings.html">
* Android Design: Settings</a> for design guidelines and the <a
* href="http://developer.android.com/guide/topics/ui/settings.html">Settings
* API Guide</a> for more information on developing a Settings UI.
*/
Page | 174
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setupActionBar();
}
/**
* Set up the {@link android.app.ActionBar}, if the API is available.
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void setupActionBar() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
// Show the Up button in the action bar.
getActionBar().setDisplayHomeAsUpEnabled(true);
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of
this
// activity, the Up button is shown. Use NavUtils to allow
users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
//
http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
// TODO: If Settings has multiple levels, Up should navigate
up
// that hierarchy.
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
setupSimplePreferencesScreen();
Page | 175
ICCT COLLEGES FOUNDATION INCORPORATED
/**
* Shows the simplified settings UI if the device configuration if the
* device configuration dictates that a simplified, single-pane UI should
be
* shown.
*/
private void setupSimplePreferencesScreen() {
if (!isSimplePreferences(this)) {
return;
}
/** {@inheritDoc} */
@Override
public boolean onIsMultiPane() {
return isXLargeTablet(this) && !isSimplePreferences(this);
}
/**
* Helper method to determine if the device has an extra-large screen. For
* example, 10" tablets are extra-large.
*/
private static boolean isXLargeTablet(Context context) {
return (context.getResources().getConfiguration().screenLayout &
Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;
}
/**
* Determines whether the simplified settings UI should be shown. This is
* true if this is forced via {@link #ALWAYS_SIMPLE_PREFS}, or the device
* doesn't have newer APIs like {@link PreferenceFragment}, or the device
* doesn't have an extra-large screen. In these cases, a single-pane
* "simplified" settings UI should be shown.
*/
private static boolean isSimplePreferences(Context context) {
return ALWAYS_SIMPLE_PREFS
|| Build.VERSION.SDK_INT <
Build.VERSION_CODES.HONEYCOMB
|| !isXLargeTablet(context);
Page | 176
ICCT COLLEGES FOUNDATION INCORPORATED
/** {@inheritDoc} */
@Override
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public void onBuildHeaders(List<Header> target) {
if (!isSimplePreferences(this)) {
loadHeadersFromResource(R.xml.pref_headers, target);
}
}
/**
* A preference value change listener that updates the preference's summary
* to reflect its new value.
*/
private static Preference.OnPreferenceChangeListener
sBindPreferenceSummaryToValueListener = new
Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object
value) {
String stringValue = value.toString();
} else {
// For all other preferences, set the summary to the
value's
// simple string representation.
preference.setSummary(stringValue);
}
return true;
}
};
/**
* Binds a preference's summary to its value. More specifically, when the
* preference's value is changed, its summary (line of text below the
* preference title) is updated to reflect the value. The summary is also
* immediately updated upon calling this method. The exact display format
is
* dependent on the type of preference.
Page | 177
ICCT COLLEGES FOUNDATION INCORPORATED
*
* @see #sBindPreferenceSummaryToValueListener
*/
private static void bindPreferenceSummaryToValue(Preference preference) {
// Set the listener to watch for value changes.
preference
.setOnPreferenceChangeListener(sBindPreferenceSummaryToValueListener);
preference.getContext()).getString(preference.getKey(),
""));
}
@Override
protected void onResume() {
super.onResume();
PreferenceManager.getDefaultSharedPreferences(this)
.registerOnSharedPreferenceChangeListener(this);
}
@Override
protected void onPause() {
super.onPause();
PreferenceManager.getDefaultSharedPreferences(this)
.unregisterOnSharedPreferenceChangeListener(this);
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
String key) {
if (key.equals("uyi_length")) {
SharedPreferences.Editor editor = sharedPreferences.edit();
editor.remove("uyi_pw");
editor.commit();
}
}
}
Page | 178
ICCT COLLEGES FOUNDATION INCORPORATED
U Y I C r e a t e P a s s w or d Ac t i vi t y. c s
package de.uulm.graphicalpasswords.openuyi;
import java.util.Arrays;
import de.uulm.graphicalpasswords.R;
import android.os.Bundle;
import android.os.Vibrator;
import android.preference.PreferenceManager;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.content.DialogInterface.OnClickListener;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnLongClickListener;
import android.widget.AdapterView;
import android.widget.Gallery;
import android.widget.ImageView;
import android.widget.ScrollView;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ImageView.ScaleType;
import android.widget.TableRow.LayoutParams;
import android.support.v4.app.NavUtils;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_uyi_create_password);
// Show the Up button in the action bar.
Page | 179
ICCT COLLEGES FOUNDATION INCORPORATED
setupActionBar();
Arrays.fill(selectedPictures, null);
gallery.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View v,
int position, long id) {
ImageView viewOriginal = new ImageView(
UYICreatePasswordActivity.this);
ImageView viewDistorted = new ImageView(
UYICreatePasswordActivity.this);
int i = 0;
for (; i < selectedPictures.length; i++) {
if (i == selectedPictures.length - 1
&& selectedPictures[i] != null) {
removePicture(i);
}
if (selectedPictures[i] == null
|| i == selectedPictures.length -
1) {
viewOriginal = originalViews[i];
viewDistorted = distortedViews[i];
selectedPictures[i] = ((UYIImageAdapter)
parent
.getAdapter()).getPicture(position);
vibrator.vibrate(100);
ScrollView sv = (ScrollView)
findViewById(R.id.uyi_choosepi_scrollview);
int height =
originalViews[0].getMeasuredHeight();
sv.scrollTo(0, (i * height) - 200);
break;
Page | 180
ICCT COLLEGES FOUNDATION INCORPORATED
}
}
.getAdapter()).getImageResource(position);
viewOriginal.setImageResource(originalImageResource);
viewDistorted.setImageResource(((UYIImageAdapter)
parent
.getAdapter()).getDistortedImageResource(position));
((UYIImageAdapter)
parent.getAdapter()).removePicture(position);
viewOriginal.setOnLongClickListener(listener);
viewDistorted.setOnLongClickListener(listener);
// Check
int count = 0;
for (int j = 0; j < selectedPictures.length; j++) {
if (selectedPictures[j] != null) {
count++;
}
}
Page | 181
ICCT COLLEGES FOUNDATION INCORPORATED
if (count == selectedPictures.length) {
findViewById(R.id.uyi_save).setClickable(true);
findViewById(R.id.uyi_save).setEnabled(true);
}
}
});
row.addView(originalViews[i]);
row.addView(arrow);
row.addView(distortedViews[i]);
table.addView(row);
}
}
Page | 182
ICCT COLLEGES FOUNDATION INCORPORATED
dist.setClickable(false);
((UYIImageAdapter) gallery.getAdapter())
.addPicture(selectedPictures[index]);
selectedPictures[index] = null;
}
/**
* Set up the {@link android.app.ActionBar}.
*/
private void setupActionBar() {
getActionBar().setDisplayHomeAsUpEnabled(true);
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is
present.
getMenuInflater().inflate(R.menu.uyi_create_password, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of
this
// activity, the Up button is shown. Use NavUtils to allow
users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
//
http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
}
Page | 183
ICCT COLLEGES FOUNDATION INCORPORATED
dialog.setArguments(bundle);
dialog.show(getFragmentManager(), "remember");
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new
AlertDialog.Builder(getActivity());
String message = getString(R.string.msg_dialog_uyi_createpw,
getArguments().getInt("length"));
builder.setTitle(R.string.title_dialog_uyi_createpw)
.setMessage(message)
.setNeutralButton(R.string.btn_ok, new
OnClickListener() {
@Override
public void onClick(DialogInterface
dialog, int which) {
dialog.dismiss();
}
});
return builder.create();
}
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
DeleteOnClickListener deleteListener = new
DeleteOnClickListener(
getArguments().getInt("index", -1));
AlertDialog.Builder builder = new
AlertDialog.Builder(getActivity());
builder.setMessage(R.string.msg_dialog_uyi_deleteimage)
.setCancelable(false)
.setPositiveButton(R.string.btn_yes,
deleteListener)
.setNegativeButton(R.string.btn_no, new
OnClickListener() {
@Override
public void onClick(DialogInterface
dialog, int which) {
dialog.dismiss();
}
});
return builder.create();
}
Page | 184
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
if (which == Dialog.BUTTON_POSITIVE && deletePicture !=
-1) {
((UYICreatePasswordActivity) getActivity())
.removePicture(deletePicture);
}
}
}
}
.findViewById(R.id.uyi_rememberpw_gallery));
getActivity().finish();
}
});
return dialog;
}
}}
Page | 185
ICCT COLLEGES FOUNDATION INCORPORATED
UYIPagerAdapter.cs
package de.uulm.graphicalpasswords.openuyi;
import java.util.Random;
import de.uulm.graphicalpasswords.R;
import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.os.Parcelable;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.TableLayout;
import android.widget.TableRow;
Page | 186
ICCT COLLEGES FOUNDATION INCORPORATED
} else {
index++;
if (index >= pictures.length) {
index = 0;
}
}
} while (!pictureset);
}
}
}
@Override
public void destroyItem(View collection, int arg1, Object object) {
((ViewPager) collection).removeView((View) object);
}
@Override
public int getCount() {
return 3;
}
@Override
public Object instantiateItem(View collection, int pos) {
LayoutInflater inflater = (LayoutInflater) collection.getContext()
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
int page = 0;
switch (pos) {
case 1:
page = R.layout.uyipage2;
break;
case 2:
page = R.layout.uyipage3;
break;
default:
page = R.layout.uyipage1;
break;
}
switch (pos) {
case 1:
currentTable = (TableLayout) view
.findViewById(R.id.uyi_tablelayout_page2);
break;
case 2:
currentTable = (TableLayout) view
.findViewById(R.id.uyi_tablelayout_page3);
break;
default:
currentTable = (TableLayout) view
.findViewById(R.id.uyi_tablelayout_page1);
Page | 187
ICCT COLLEGES FOUNDATION INCORPORATED
break;
}
return view;
}
@Override
public boolean isViewFromObject(View view, Object object) {
return view == ((View) object);
}
@Override
public Parcelable saveState() {
return null;
}
@Override
public void finishUpdate(View arg0) {
// TODO Auto-generated method stub
@Override
public void restoreState(Parcelable arg0, ClassLoader arg1) {
// TODO Auto-generated method stub
}
@Override
public void startUpdate(View arg0) {
// TODO Auto-generated method stub
}
Page | 188
ICCT COLLEGES FOUNDATION INCORPORATED
UYIActivity.cs
package de.uulm.graphicalpasswords.openuyi;
import de.uulm.graphicalpasswords.R;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.support.v4.app.NavUtils;
Page | 189
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_uyi);
// Show the Up button in the action bar.
setupActionBar();
}
@Override
protected void onResume() {
super.onResume();
Button login = (Button) findViewById(R.id.btn_login);
SharedPreferences sharedPref = PreferenceManager
.getDefaultSharedPreferences(this);
if (sharedPref.getString("uyi_pw", "").equals(""))
login.setEnabled(false);
else
login.setEnabled(true);
}
/**
* Set up the {@link android.app.ActionBar}.
*/
private void setupActionBar() {
getActionBar().setDisplayHomeAsUpEnabled(true);
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is
present.
getMenuInflater().inflate(R.menu.uyi, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of
this
// activity, the Up button is shown. Use NavUtils to allow
users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
//
http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
NavUtils.navigateUpFromSameTask(this);
return true;
case R.id.action_settings:
Intent intent = new Intent(this,
Page | 190
ICCT COLLEGES FOUNDATION INCORPORATED
de.uulm.graphicalpasswords.openuyi.UYISettingsActivity.class);
startActivity(intent);
}
return super.onOptionsItemSelected(item);
}
de.uulm.graphicalpasswords.openuyi.UYICreatePasswordActivity.class);
startActivity(intent);
}
de.uulm.graphicalpasswords.openuyi.UYILoginActivity.class);
startActivity(intent);
}
UYILoginActivity.cs
package de.uulm.graphicalpasswords.openuyi;
import java.util.Arrays;
import de.uulm.graphicalpasswords.R;
import android.os.Bundle;
import android.os.Vibrator;
import android.preference.PreferenceManager;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.support.v4.app.NavUtils;
import android.support.v4.view.ViewPager;
Page | 191
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_uyi_login);
// Show the Up button in the action bar.
setupActionBar();
@Override
public void onClick(View v) {
vibrator.vibrate(25);
clickedPictures[countClicks] = v.getId();
countClicks++;
if (countClicks == password_length) {
Arrays.sort(clickedPictures);
DialogFragment dialog;
if (password.equals(Arrays.toString(clickedPictures))) {
dialog = new ResultOKDialog();
} else {
dialog = new WrongResultDialog();
}
dialog.show(getFragmentManager(), "result");
}
}
/**
* Set up the {@link android.app.ActionBar}.
*/
private void setupActionBar() {
getActionBar().setDisplayHomeAsUpEnabled(true);
@Override
public boolean onCreateOptionsMenu(Menu menu) {
Page | 192
ICCT COLLEGES FOUNDATION INCORPORATED
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
// This ID represents the Home or Up button. In the case of
this
// activity, the Up button is shown. Use NavUtils to allow
users
// to navigate up one level in the application structure. For
// more details, see the Navigation pattern on Android Design:
//
//
http://developer.android.com/design/patterns/navigation.html#up-vs-back
//
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new
AlertDialog.Builder(getActivity());
builder.setMessage(R.string.msg_pw_correct).setNeutralButton(
R.string.btn_ok, new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface
dialog, int id) {
dialog.dismiss();
getActivity().finish();
}
});
return builder.create();
}
}
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new
AlertDialog.Builder(getActivity());
builder.setMessage(R.string.msg_pw_wrong).setNeutralButton(
Page | 193
ICCT COLLEGES FOUNDATION INCORPORATED
R.string.btn_ok, new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface
dialog, int id) {
dialog.dismiss();
getActivity().finish();
}
});
return builder.create();
}
}
Page | 194
ICCT COLLEGES FOUNDATION INCORPORATED
MainActivity.cs
package de.uulm.graphicalpasswords;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is
present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
de.uulm.graphicalpasswords.openmiba.MIBAActivity.class);
startActivity(intent);
}
de.uulm.graphicalpasswords.openpassgo.PassGoActivity.class);
startActivity(intent);
}
de.uulm.graphicalpasswords.opentapi.TAPIActivity.class);
startActivity(intent);
}
Page | 195
ICCT COLLEGES FOUNDATION INCORPORATED
Page | 196