I was doing an android app and I want to lock some feature temporally for each user.
What I want is to lock say 1 activity to be used before someone performs a predefined task say share on facebook, only then I want them to view the activity.
How can I achieve this? It is for application, just like games lock the level.
You should make an application/user profile and save it in a database or in the shared preferences.
you could simply check if a certain task has been performed prior to opening the activity you want locked.
Related
i'm working on applocker application, i have listed all the apps with app icon ,app name and a checkbox to select the app ,now my requirement is when user checks the checkbox, app should be locked with a pin or pattern. I have given the usage access permission. now, how can i achieve the remaining process like monitoring apps, to show the pattern screen.
Your best shot at this would be to build a custom launcher app.
Then you have control over which apps the user sees, and how to open them. You can implement this pattern/password logic by yourself before opening the apps, and have another activity with the list of apps and checkboxes.
As a starting point, take a look at some open source android launchers like Lawnchair
I want to create an Android application for conducting Quiz (at University level). While the quiz is progressing, I don't want users to go out of the app and search Internet/use any other app and answer. I dont want the user to exit the app unless they explicity submit/exit the quiz upto what they have done.
I have tried making it as launcher app but I couldn't take control of task switcher button. Also, I was not able to disable notification area.
If I cannot restrict this much, I want to monitor what they are doing while quiz is progressing. I can get any permissions or be device administrator or anything but I cannot restrict internet access as the server of the quiz is in internet. If a call or notification comes, I dont want that to popup while quiz is progressing etc.
Atleast, I want to log everything to server if they have done anything intentional. How can I achieve this?
Thanks
listening for onStop in your Activity might do the trick.
see: https://developer.android.com/training/basics/activity-lifecycle/stopping.html
You can finish the activity in onStop() or you can use this on the activity in AndroidManifest.xml
android:launchMode="singleTask"
android:noHistory="true"
I'm trying to create a new lock screen and I'm aware that if I use the FLAG_DISMISS_KEYGUARD for use with non-secured lock screens, I can present multiple functions and don't have any restrictions to intent access.
However, I've been having a very difficult time identifying what limitations are implemented if the user had a secure (password, pin, pattern, etc) keyguard active and I use the FLAG_SHOW_WHEN_LOCKED.
For example, if my activity is visible over the keyguard and the user wanted to change the background of the activity to a picture they took, they cannot access the gallery to select the photo if the phone is locked.
I couldn't find anything in the Android SDK documentation or on here (or anywhere for that matter) that could answer what other functions are disabled. Any and all help is greatly appreciated!
Thanks!
I am new in Android and is developing an app which runs in background as service to collect user activity. till now my app is able to get information about Time_Start, Time_End and Name of other app used by user.
I want to improve my app to be able to count how many interactions(like user tap, touch,...) user make while using other app.
any help?
Thanks!
AFAIK one can't catch touch events/key presses if they are outside your Activity's context or Application's context. I think it goes against the design principle in general ( every app. is sandboxed in its own DVM).
Also, Android has provided mechanism of Intents to track some specific actions and not evry interaction the user has with the mobile . So, I don't think it seems possible .
When a user tries to launch an application I want to suppress that application and then call another application. Example I want the user to authenticate himself before launching a particular system application (settings application etc). The authentication application should pop up every time the user launches the settings application
I know you will have to use broadcast receivers and intents but have no clue how to do it.
Sounds like you should create a "lib" project that have public interfaces that you can use.
Then share them between the apps instead of trying to execute another app?
But what I know this is not possible to actually execute up another app, since this then gives dependency to something that you don't know if it is installed. It must already been started if the intents should work.
Also like the answer before, it could be used for abuse.
Look at this link for more information:
http://mylifewithandroid.blogspot.com/2007/12/playing-with-intents.html
I sort of hope this isn't possible... Launching a different application from the one the user actually clicked? Leaves the door open for abuse.