How do I enable and disable Android Nougat's "Work Mode" in Tasker? - android-7.0-nougat

How do I enable and disable Android Nougat's "Work Mode" in Tasker? Is there an intent I can send, or a setting I can change (using AutoTools if necessary)?

as I am still waiting for my s7 to get an OTA update to Nougat, I can only guess here as I did not have a possibility to tinker with that setting.
From what I could gather so far on the Internet there does not seem to be any Intent to switch on/off work mode. In that case your only option would be to automate the process of going into settings and clicking that option. You could use AutoInput for that

Related

What is Electron's 'kiosk' mode?

What exactly does kiosk: true in the BrowserWindow config of a new ElectronJS window do?
The documentation just states that the parameter indicates, that the window is in 'kiosk' mode. I was unable to find information on what this means.
Basically, Kiosk mode is a Windows operating system (OS) feature that only allows one application to run. Kiosk mode is a common way to lock down a Windows device when that device is used for a specific task or used in a public setting.
So in electron kiosk mode, we'd have the ability to lock down our application to a point that users are restricted to the actions that we want them to perform. Also, the browser would merely act as our canvas with exactly defined capabilities and doesn't get into our way. And this is why you want to use Electron!
It's true that this feature is not very well documented. There is a open bug about it : Kiosk mode is poorly documented
This seems that the kiosk flags brings some like :
Disable the F11 key to exit full screen
Disable keyboard shortcuts for navigating or creating new tabs / windows
Prevents other programs from popping up on your screen
According to this article, but I was unable to replicate all behaviours.
I think that under the hood it's may be linked to the kiosk command line switch in chromium : --kiosk.

How to enable "Allow Remote Automation" in Safari programmatically

I am using macOS Sierra 10.12.4 with safari version 10.1
I need to enable the Allow Remote Automation option in Develop tab in Safari programmatically.
I can run the below command which changes the com.apple.Safari.plist file in the ~/Library/Preferences and that enables the Develop menu perfectly.
`defaults write com.apple.Safari IncludeDevelopMenu -bool true`
However I did not find any option to enable the "Allow Remote Automation"
Any idea which plist contains that info?
It is not possible to toggle the setting using the method you described.
Starting in Safari 11, you can force safaridriver to authenticate by using the --enable command line option. After authenticating, this menu item will be set. This will also cache the authentication for the rest of your login session. Subsequent invocations of safaridriver (say, by the Selenium libraries) will not need further setup.
It can also be done using AppleScript if it is not possible by modifying the plist. To do that, first enable develop from Safari preferences and then choose Allow Remote Automation from the Develop menu.
Here is the AppleScript that I wrote to enable Allow Remote Automation (this covers both the steps mentioned above).
tell application "Safari" to activate
delay 2
tell application "System Events"
tell application process "Safari"
keystroke "," using command down
set frontmost to true
tell window 1
click button "Advanced" of toolbar 1
delay 2
set theCheckbox to checkbox 4 of group 1 of group 1 of it
tell theCheckbox
if not (its value as boolean) then click theCheckbox
end tell
delay 2
keystroke "w" using command down
delay 2
end tell
tell menu bar item "Develop" of menu bar 1
click
delay 2
click menu item "Allow Remote Automation" of menu 1
delay 2
end tell
end tell
end tell
tell application "Safari" to quit
Note: Here I enabled develop menu from safari preferences only if it is unchecked.
Hope this helps..

How can I automate WiFi testing using Xcode Instruments?

I want to automate the UI flow on iOS, specifically below steps:
User taps on Settings
Opens WiFi options
Taps on the desired SSID
Enters Username and Password
Taps connect
Opens up a browser
I can do similar flow on Android with Android Debug Bridge. In Xcode Instruments, I don't see any WiFi options listed. Do we have any other tool to automate UI flow on iOS?
The standard is now to use UI Unit tests from XCode. Automation via instruments is deprecated (as far as I know).
However you can automate iOS itself, only the app you are testing. So accessing the settings like this will not work.
I'm also wondering why you need to test this. It's part of iOS and not your app. Therefore it's Apple's job to test it. You can just assume it works.
There is no way to do this on iOS. You may want to look into something like http://www.tapster.io.
Also ui_automation is remove from Xcode 8, so theres that.
I'm having pretty good luck with http://www.tapster.io

Access an iPads Device Settings using UIAutomation

Can you access the iPad Device settings using the UIAutomation instrument?
I can use deactivateAppForDuration, but that does not allow me to exit the app navigate to the settings page, change a setting, and navigate back to the app and move on.
any suggestion?
No, you cannot automate anything outside of the target application as of right now. When your app leaves the foreground the automation tool loses control until it returns (if it does at least).

Disable deleting application by tap-and-hold

Usually on a long press of a third-party application icon, it will give you the option to delete the app. Is there any way to disable that option, the way it seems to be with the preloaded applications on iPhone?
It's not possible to do it from within the app.
You could, however, configure the parental settings on the device to disallow removing applications (Settings -> General -> Restrictions), but you would need to do it on each device you want the feature enabled, and the setting will apply for all third party apps, not only yours.
Nope, you can't disable it. If you're developing some enterprise application where the iPad is supposed to run only your app and nothing else, I suggest getting a case or something along those lines to block the "home" button on the iPad.

Resources