How to disable factory reset button for Company owned Device in Android Management API? - android-management-api

I am setting Factory Reset Protection (FRP) for COMPANY-OWNED device with WORK PROFILE. Such that, user can only bypass using FRP email.
Though It works well when the device is hard reset but when the user does the same through
Settings -> Backup & Reset -> Erase All Data
, it doesn't ask for FRP on startup.
So, What I'm trying to achieve is disable the factory reset button in settings for COMPANY-OWNED WORK PROFILE devices, so that the user doesn't bypass the FRP.
I have tried to patch the device with the policy with
"factoryResetDisabled": true,
source
but it doesn't reflect in the device.
Kindly suggest me other ways, for Work Profile in Android Management API.
Is any workaround available to disable the Factory Reset Button?

Factory Reset Prevention (factoryResetDisabled) api does not work on COMPANY-OWNED devices with WORK PROFILE as of android 11 onwards. Since factory resetting is the only reliable way to remove all user data from COPE devices or COMPANY-OWNED devices with WORK PROFILE.

Related

How to edit Windows 10 login screen so that it will only work if there is a working usb camera installed?

How can I edit Windows 10 login screen so that it will only work if there is a working usb camera installed? Is there any documentation of API example or tool for this use case?
Try to implement and use a combination of your own couple of Credential Provider and Credential Provider Filter.
Inside of ICredentialProviderFilter::Filter method you can make a decision to enable or disable any Credential Provider.
Inside of ICredentialProvider::SetUsageScenario method you also can make a decision to show or to hide your own Provider.
Here you also can create and show a dummy tile with "Please connect USB-camera" caption on it.

Why GeneXus is using the READ_PHONE_STATE permission in my Android app?

So I have an app generated with GeneXus in the Play Store and I received the following e-mail from the store:
[...] Policy issue: Google Play requires developers to provide a valid privacy policy when the app requests or handles sensitive user or device information. Your app requests sensitive permissions (e.g. camera, microphone, accounts, contacts, or phone) or user data, but does not include a valid privacy policy. [...]
So I went to the Developer Console and found this in the privacy police section (translated from portuguese):
Your app have an APK with the version code 40 thar require these permissions: android.permission.READ_PHONE_STATE. Using these permissions in an APK require a privacy police.
So my question is: What am I using in GeneXus that needs this permission? I get the NetworkId from the ClientInformation object, is it?
Yes, that is precisely the reason. The Android method that obtains the IMEI number (and that GeneXus applications call to obtain it) needs the READ_PHONE_STATE permission to execute. This is understandable, as it's considered private information.
Following Android's Best Practices for Unique Identifiers I would suggest using the ClientInformation.Id property instead. As a bonus, it doesn't persist over device wipes, which in 99% of cases is the intended behavior (unless the app is only installed in controlled devices, which doesn't seem to be the case if it's published in the Play Store).
If you decide to go this route, just remember to reset the Send Device Information on Requests property to false.
(Note: the property name has been/will be changed to Include Network Id in Client Information as of GeneXus 15 U3, since the old name was prone to confusion).

Where exactly Android Wear app Permission request to be placed

I want to request the permissions that I need for my android wear app upfront as per this. So Programmatically where exactly I should put my permission request code. Also is the protocol to ask for Permission the same as the mobile app like this.
All of the permissions are controlled in the Androidmanifest. Here is an example of some permissions being declared in the Androidmanifest:
These permissions are used to get the weather from the device and relay the information to an Android Wear device. Google offers documentation for developers to use to determine what permissions should be used. Declaring permissions should happen in the Androidmanifest in the format provided in the image. In the sample code posted, it is not necessary to include watch permissions, they are only required if the app works with Android Wear.
Way back in the day Google added a feature in Android 4.3 that let the user control what permissions apps could access on a per app basis known as App Ops. This was a great feature that cut down on privacy issues and gave users the piece of mind knowing that random apps installed could not access the device’s location. When Google introduced Android 6.0 Marshmallow, This time when an app needs to use a permission a dialog box pops up on the screen and asks the user if it is OK that the app uses a certain permission. This may get a little annoying, but at least every permission used by an app has to go through the user first.
If your app doesn't already have the permission it needs, the app must call one of the [requestPermissions()](https://developer.android.com/reference/android/support/v4/app/ActivityCompat.html#requestPermissions(android.app.Activity, java.lang.String[], int)) methods to request the appropriate permissions. Your app passes the permissions it wants, and also an integer request code that you specify to identify this permission request. This method functions asynchronously: it returns
right away, and after the user responds to the dialog box, the system calls the app's callback method with the results, passing the same request code that the app passed to requestPermissions().
You should dynamically request the permissions from user on wearable devices just the same way you do on the phone side.

MobileFirst: Logon to one device that will logout other devices/web

I have to implement a scenario in which if user login to 2nd device or mobile-web then the first device/web should be logged-out.
Both app & mobile-web are running on the same MobileFirst server and are using the same adapters and having almost same functionality.
I am not sure if such type of provision provided in MFP.
I am open to suggestions or guidance.
MFP doesn't support that. I know some application has similar feature,
I believe it's up to user code.
Would you check this information?
https://www-01.ibm.com/support/knowledgecenter/SSHSCD_7.0.0/com.ibm.worklight.dev.doc/dev/c_oauth_security_model.html
http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_administration_guide_chapter09186a0080153e60.html
How to logout previous session of a user,if he logins again on same or different browser
http://webcache.googleusercontent.com/search?q=cache:jbA-CDEbHowJ:stackoverflow.com/questions/1416732/how-to-logout-previous-session-of-a-user-if-he-logins-again-on-same-or-different+&cd=1&hl=en&ct=clnk&gl=us

Two users Having same HomeKit controller application installed on two different iPhone

Two users Having same HomeKit controller application installed on two different iPhone.
User 1 adds Home, Rooms, Zones and Accessories using the application and he can now control the Accessories, using the app interface.
User 2 is in same environment (either in physical Home which has all the Accessories of user 1), But how can he control these accessories using the same app, how he will be able to see all the Rooms, Zones and Accessories added by the User 1?
How does HomeKit manages this multiple user accessing same Accessories scenario, or do we need to handle this scenario by our self in code?
Also how does it maintains the identity of the user with Home, that this particulate Home belongs to this XYZ user? As all the HomeKit user data is synced with iClod there should be some identity mapping for the Home entity.
I have done a much workaround for this.
First of all handling things by our own is not preferable for multiple users.
I had this query that how all configuration done on one device will reflect on another device for same home.
Unfortunately apple didn't provided much information on this and they also didn't clarify that Apple TV will require or not(As I have referred to some reports that says Apple TV will use as intermediator between iOS devices.
Now at application side i have tried to add User to home.
There is a HMUser class and we can add user to any home that we want to sync.
I was running my app in iOS 8.1 in both the devices, I was also logged in to icloud and keychain access was also enabled.
Now i have tried to add user using method of HMHome class
-addUserWithCompletionHandler()
I shows a popup in which we need to enter the email id of user to which we want to give access to current home.
But it didn't work. I always get error "notification not enable at remote side"
I think that login to Apple TV is require for adding user. I am not sure about this, Apple hasn't clarify on this too.
I don't have Apple TV if you have try to login in it and use two other iOS devices to give access to any icloud account.
Also revert me if it works.

Resources