android - security vulnerabilities in using launching activity -


in android , use home screen activity shows registred items .

when launching application, home screen activity launched default.

from settings screen of application, can set password app. once set password. every time launch application. shows password screen. after entering password takes home screen activity.

but hacker point of view, without knowing password, can still go home screen when give command.

    start -n com.share.device/.device.devicelistactivity 

this automatically starts home screen activity, though have set password application.

how can restrict access home screen activity, if use "am start" command.

i dont want directly access home screen when there password set application. please suggest how can rectify issue.

introactivity -> devicelistactvity

using "am start" command, can directly start devicelistactivity

androidmanifest.xml

<activity     android:name=".common.introactivity"     android:screenorientation="unspecified"     android:theme="@android:style/theme.notitlebar.fullscreen" >     <intent-filter>         <action android:name="android.intent.action.main" />         <category android:name="android.intent.category.launcher" />     </intent-filter> </activity> <activity     android:name=".device.devicelistactivity"     android:configchanges="orientation|keyboardhidden"     android:screenorientation="unspecified"     android:theme="@android:style/theme.notitlebar" /> </activity> 

have login activity set static variable somewhere. in devicelistactivity, check variable. if isn't set, not run activity- instead launch login activity , finish() yourself.

this better if value set coming server, such login token if info coming server.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -