i am developing an applocker application in android.so to prevent user from clearing data,i need to disable clear button in settings which i can achieve by adding my app in device administrator..i am able to achieve that using this code
Runtime.getRuntime().exec("dpm set-device-owner com.example.hp.useradministratordemo/.DemoFrag");
but my app is not active or enabled in device administrator and this process i want to do without user interaction..I searched for that and i found that there is one command "set-active-admin" but i don't know how to use this shell command
..thanks in advance
Related
I am working on a project that will work on android devices and will convert them in kiosk. So at this moment I am doing R&D on Kiosk mode, but there is very little help on it. But I came across different things. These are using DPM, Using EMM or Using Android Management API
I just wanted to do following things to ship my app to my clients.These objectives are as follow
If client is installing my app, he should follow simple steps (like android permissions) to make my app as default app.
While following simple steps, my app must make android device as Kiosk and should make my app unable to exit by clients user.
My app must be able to clear kiosk mode from device so that client can use his device as simple device
The most important thing is, we are not shipping devices with our app and we may not have any physical access to the client device and client may not be so much technical. So app must do all things
**So from the perspective of these above 4 points , what is best for me please share your knowledge. What will be best for me to go with? Please help me as this is so much confusing...
**
Fully managed mode
In fully managed mode the entire device is managed and the device needs to be factory reset before setup. To set up a device in fully managed mode you need to use a QR code.
For devices running Android 7.0 or above:
Turn on a new or factory-reset device.
Tap the same spot on the welcome screen six times to enter QR code mode. Connect to a WiFi network.
Scan the QR code.
For devices running Android 6.0:
Turn on a new or factory-reset device.
Follow the setup wizard and enter your Wi-Fi details.
When prompted to sign in, enter afw#setup.
Tap Next, and then accept the installation of Android Device Policy.
Scan the QR code.
Work profile mode
In work profile mode corporate apps and data are kept secure in a self-contained work profile while the user keeps control of the rest of the device. To set up a work profile you can either use a QR code or an enrollment link.
Using the enrollment link:
Make the link accessible on the device (send it via email or put it on a website).
Open the link.
Or using the QR code:
Go to Settings > Google.
Tap "Set up your work profile".
Scan the QR code.
What's next?
By now you should have a managed device configured with a basic policy, but there's much more you can do with the Android Management API
for more info : https://developers.google.com/android/work/release-solution
I'm creating an application which is going to be active for first 30 days and after that the user should get automatically log out from application itself (as user's account will be deactivated), or is there is any workaround for the same because I can disable accounts from Firebase Console but that doesn't affect any user if they remains logged In.
Mainly I wanted this for Android Studio, I can do the required method through Firebase Database itself but just wanted to know if there is any alternate method available.
If you are asking how to disable a Firebase Authentication user account, that's not possible from within web or mobile application code. You can instead write backend code using the Firebase Admin SDK.
You can disable the account by updating the user and setting the disabled flag to true. Or you can delete the account entirely if you are done with it.
Hi every one I'm currently working on a project which i need to monitor app behavior on emulator boot (i have a broadcast receiver which is being triggered with boot complete) the problem is the logcat shows process is terminated when you restart the emulator.
any idea how can simulate the boot and see logs in logcat???
On your emulator, go to Settings -> System -> Developer Options. Under 'Debugging' go to "Select debug app" and find your app, then underneath that option enable "Wait for debugger". Now when you reboot the emulator, the dialog to attach the debugger will show asking you to manually attach your debugger. Once you do that, your app will start and the receiver will get triggered.
Android studio emulators restart by long-pressing the power button and choosing "Restart". If you want to simulate the request instead you can use the following command:
adb shell su root am broadcast -a android.intent.action.BOOT_COMPLETED
I am developing an APP wanted to connect the GPS device, in fact, I do not want to prompt the user to manually activate would like to do automatically is it possible?
I know to ask the user to activate it manually now connect the GPS without request can not my app works with root access, if it has something that can be done with root it will also be valid
The android platform relies upon permissions, you can most certainly use the GPS in your app, but the user will be notified at first use. After the user accepts your permission your app will be allowed to use GPS in background
Can i save automatically GPRS setting when i am installing the Java ME application.
Any one have any experience please share.
No, You can't have this.
What you can do is, Try making connection if it fails prompt user to make active connection available to application.
Unfortunately, you can't change the GPRS settings programmatically. We don't have the permission for accessing those things. So you have to change manually the GPRS settings before starting your application.