How to lock the Screen customly? Just like WaveSecure in Android - android

I want to do a demo just like WaveSecure, which win Android Develop Challenge 2 with a third place. Now I have a problem in locking the screen customly, so I want to know how WaveSecure achieve its locking function, as the following picture show:
When the mobile is locked, WaveSecure can require customer to input their own password. So I think WaveSecure must replace Android's original locking function.
And I also google it, but I didn't find anything helpful. I only find two packages may be helpful. They are:
android.app.KeyguardManager
android.os.PowerManager
But after I reading the Android Docs, I still can't have an idea on it.
Can you help me? Thx:)

I have been searching for an answer to the exact same question for a while. Apparently, after 2.0 onwards the device manager privileges for the app level were removed. But with Froyo - 2.2 the device policy manager is revealed granting us developers a multitude of administrative level controls.
http://developer.android.com/guide/topics/admin/device-admin.html

Related

Flutter - To detect the device was previously rebooted

I would like to detect whether the device (Android and ios) has been previously rebooted before opening the apps. I noticed that there would be many possible ways to achieve it if we could rely on the device clock's time like what has been elaborated here. My concern would be; the device clock can be changed, and the apps can work in offline mode.
Android
My idea would be to store a boolean variable using Android SharedPreferences after device has been rebooted, and set as true. Then check the variable after user opens the apps. If true, then we can confirm that the device is previously rebooted, else not.
ios
I have no idea on how to implement it for ios, but the link above might gives me a hint.
Solution that might works in both platform (not try yet)
If RAM usage cleared after device restart, then I would assume that if RAM usage is on certain level,the device has been rebooted.
Of all the possible ways to achieve the objective, I would prefer to use existing package. But I would happy if you can give your feedbacks for the above ideas.
So my questions would be :
I hate to reinvent the wheel, so any existing Flutter package or any other library which can't be found on https://pub.dev/packages that can be used to detect whether the device has been previously rebooted before opening the apps?
Is there any other possible solution that I missed which already have in Flutter architecture to solve the issue?
Update
I've found a package called boot_completed which only supported on Android.
..and I've found an interesting feature for Android running API level 24
BOOT_COUNT. Horray!

How to Configuration Device as a Single Purpose Application Device?

I have seen this in action in places like hostels/hotels:
How can you lock/restrict/configure an android device to only use an application, while having the following or most of them?
After every boot open and lock to a specific application.
Restrict specific hardware buttons, if any. (power button or all)
Lock device to use specific applications.
Is there anything "out of the box" provided by the SDK when building your applications? And if there is something like that what is the API support for that and how low does it get, API level wise?
Do you configure your device in a specific way? Is ther a documented pipeline for that?
I would prefer something official from google rather than 3rd party applications that do that.
firet it will suport in or after android 5.0
second lock app on your device for that creaate activity for luncer startLockTask(){}
First of all Single Purpose application is supported after Android 5.0.
To lock the app on your device call a method startLockTask() in your onCreate of launcher activity.
For detailed decription see this doc.

Mobile Device Managed Single App Devices

I like to have single android app in our managed devices, we want only that app to be used on the device with necessary restriction, such that,
Single use - Device will have only one app, user can't use other apps, like browsing, youtube or anything,
the initial setting like notification sound, GPS always on, notification and ring sound maximum level can't be modified.
user can not power off the device.
this setting can only be changed by our servers.
i think i have 2 option,
1) Using samsung knox sdk on samsung devices,
Here's MDM proving feature of Samsung Knox Standard!
2) General Android way, Set up Single-Purpose Devices, COSU solution
Android Developer's site.
Wanted to know your's view on this, may be if you guys have done any of the two or any other ways, i could use some of the guidelines or a path.
Thanks for reading, and please comment if i was unable to articulate the subject or it needs editing.
You can use Google's new Android Management API, it seems to suit your needs.
It is a new cloud API that allows to manage Android devices from a server, without having to build an on-device agent (a device policy controller).
I have broad experience of using Samsung Kiosk Mode from Knox Standard SDK which is free and Pro-Kiosk mode from Knox Customization SDK (which has more functions but is not free).
So I can tell you for sure that all 4 points that you have mentioned can be achieved by using Knox Standard SDK.
Singe Purpose: https://seap.samsung.com/api-references/android-standard/reference/android/app/enterprise/kioskmode/KioskMode.html
LocationPolicy (you can turn on GPS and restrict changing): https://seap.samsung.com/api-references/android-standard/reference/android/app/enterprise/LocationPolicy.html
Yes. It is possible but I forgot the exact implementation.
Yes, as well.
Only downside of using this SDK is:
You are tied to Samsung (which I personally okay with, since Samsung has such market penetration and you could get service almost anywhere in the world and in enterprise world it is critical)
About Android native functionality: never tried it
Update March 7, 2019: Now I am playing around Device Owner, we use it for Kiosk mode, works well and works on android Device with Nougat and earlier.

Is it possible to know whether an android phone has OTG support without rooting?

Is it possible to know whether an android phone has OTG support without rooting? If so how? I am asked to check some information before developing an app for android.
Yes, you can download a USB On-The-Go checking application from Google Play.
This one below for instance doesn't require root, although it does require that you follow the exact plugging and unplugging steps.
Before I give you the link thought, I must warn you that this app asks for way too many permissions and can display very intrusive ads that can draw themselves on top of other apps. If you install this, definitely uninstall it and get rid of it as soon as you're done with it.
Another thing you could do is just google for the exact model name. That kind of information is usually included in the specs, in the pdf specs, in wikipedia, or in some tear-down blog. If the specs won't even tell you the usb version number at the very least, then you'll know to keep on looking.

How to start screenshot service using a code in android 4.0

I want to know how to start screenshot service in android 4.0 using code. I know I can take screenshots using the power button. But I want to know how to do this using code.
This is not possible, except maybe by rooted device users. Apps cannot take screenshots of other apps, for obvious privacy and security reasons.

Categories

Resources