Cannot change current password in android 7 - android-7.0-nougat

My app has device administration power. When I tried to update the current password in android 7, This "java.lang.SecurityException: Admin cannot change current password" exception is coming. It's working in android 6. Please tell me How can I reset my password in nougat.

Looks like Google has changed the ability of device admin apps. I don't fully understand why. I know it could be used by hackers, but that's why screen lock is a separate permissions set you have to enable.
We’ve reduced the power of device admin applications so they can no longer change your lockscreen if you have a lockscreen set, and device admin will no longer be notified of impending disable via onDisableRequested().These were tactics used by some ransomware to gain control of a
device.
Here's the full link https://blog.google/topics/connected-workspaces/keeping-android-safe-security-enhancements-nougat/

Related

iOS Terminated due to signal 9 on allowing permission [duplicate]

This question already has answers here:
Toggling Privacy settings will kill the app
(2 answers)
Closed 4 years ago.
I am making an iOS app and I am new in iOS world. In this app, I want to access user contacts. Everything is going good and working well. But I experienced a amazing behavior which I have not seen in Android since I am android developer.
In iOS to access user contacts I am using Contacts Framework. I think it is relatively more easy and fast then anyother else in the iOS. However, I did not able to completely take advantage of that. Let me tell you what I did and what Problem did I faced.
What I have done I cask for permission on ViewController and User is prompt with Dialog asking for contacts permission. If user allow permission, everything goes well, but when user dont allow the permission here comes the trouble.
Accessing User contacts are more necessary since My app's whole working and basic business idea is upon user contacts. Now to handle this, when user Do not allow permission I am showing another dialog telling him that He must allow permission so that App can continue, So far so good.
Now I am taking user to settings where he can allow the permission or he can simply go again back. Now checkout 2 cases
CASE 1: When User come on Settings screen and go back again without
allowing permission
When I take user to Settings screen and instead of allowing permission he gets back to my app I try to show him same dialog again to enable permission in every case. This is going good. I mean for testing purpose I repeat same procedure manytimes, I mean I do not allow my self Contacts permission, It takes me to setting scree, from settings screen I get back to my app and again I am able to see same dialog that took me to settings scree. THIS IS FINE
CASE 2: When User is taken to settings screen and he permits the
permission:
Here when user allows the permission I get message in the log that is "Message from debugger: Terminated due to signal 9". And when I get back to my app, it starts over again. Looks like my app gets re-open or crashed being in background.
Important: For this I examined my memory or task anything that is being performed in background, but there is nothing going on in background. My memory size before crashing is 54.78 mb. And I do not think so it is worth worying.
Any one have idea what is going on??
Your app is not crashing its just forced to restart by iOS with new privacy settings. iOS will SIGKILL the app. (it's default behaviour of iOS). You can checkout - WWDC 2012 Session Videos: Privacy Support in iOS and OS X for more info on this.
This does not hold true for Location permissions.
It is expected behaviour. iOS terminates the app when user changes permission for Contacts, Camera, Microphone and Photos (and possibly some others).

How to activate and open my app as soon as I unlock my screen in iOS devices

I'm managing few iOS devices, so I want to create a app to add security feature like collecting the user information from the user like UserID to track which user is currently using the device .
Desired output:
So I want to trigger my app as soon as a user unlock the device and without giving the details the user should not able to access the home screen of the Device.
Is it possible to do it with any framework in iOS without Jailbreak ?
No its not possible. iOS does not allows application to manage device with it self. Application should work in the pre given area which is called Sandbox. So its not possible to handle the entire device and you can not check it that who is using the device.
This is not possible, you should look to Mobile Device Management solutions and rather go that route. You could also look at apple's business solutions.

How permanently access the microphone in IOS id user deny the allowing in AIR application?

How i access the microphone in iOS id user deny the allowing in AIR application ?
I am using AIR 3.8.
When i run in debug mode on device it prompts that Flash Debug requires microphone access.
And how i get mic if user deny to access on prompt ?
You can't. That's the entire point of the prompt — to give the user a choice in whether your app can access something that could potentially invade their privacy or harm their system. There would be no point in the prompt if you could override it.
Adobe is real big on these kinds of security tasks (after Macromedia was relatively lax) and Apple is even stricter. If the user says no, it means no. There is absolutely no way around it.

kCLAuthorizationStatusRestricted is showing up for one of my apps but not another on the same device

I have an app i'm maintaining which recently stopped reporting users locations. This is happening on many devices where it was previously working. On my device I have determined that the auth status of CLLocationManager is kCLAuthorizationStatusRestricted. This stops the app from prompting for user permission.
I have no restrictions set around core locations and another app of mine running the exact same helper class to manage location works fine on the same device. It prompts for user permission as it should.
Does anyone know anything that would cause kCLAuthorizationStatusRestricted to show up besides restrictions?
In the Settings app (in iOS 6) look under General, then Restrictions. If Restrictions is enabled, then scroll way down to Privacy section. This is where Restrictions are set for Location Services.
This is a different set of Privacy restrictions from the Privacy section that is on the first screen that can be locked with a passcode.

iOS - Restricting use to single app

I am developing a business app for use on an iPad/iPod Touch. I am wondering if there is a way to restrict usage on the device to my app only. In other words, we don't want employees installing other apps such as games and playing around with the devices.
Yes, that's possible.
Check out the iOS Configuration Profile Programming Guide.
Edit: See the section about restrictions, it will allow you to do exactly what you need. Note however that you'll need to have access to those devices, ideally the devices should be company property. And you need to distribute your app via Enterprise Distribution.
Edit 2: Since iOS6, this feature is available through the normal settings app. It is called "Guided Access" and is part of the Accessibility settings. It will let you disable the home button (cancel guided access by triple-clicking the home button and enter the preset code) and it will even let you define areas within apps which should be disabled.
I don't think so, unless their device is jailbroken.
If they're logged into an Exchange server you could remote-wipe their phone if they install anything.
Do you provide the devices? Or they bring their own?
If you provide the devices that would mean you can use your Apple-id. If an employee would try to download any other app he would need the password of your Apple-id. So thats a simple way to prevent that.
Im am not sure if there is a total "lock" of such type.

Resources