I primarily use SwiftKey keyboard on my Samsung Galaxy 10.1 tablet. I want to find a way to automatically switch to the default Samsung keyboard when I enter a password. Currently I have to pull down the notification tray and choose "Select input method". I want to have this automated. If it is not possible to detect whether you are entering a password then maybe I can do it on a per app basis.
1 Answer
The goal may seem to be switching the keyboard app when the password is to be entered, but the real issue is to protect the password from being logged by third-party keyboard apps, or at least be restricted from being uploaded somewhere. In that case, I suggest using a firewall so that you can restrict any app from connecting to Internet, let alone it can send the passwords among other things.
Be it a rooted device or not, there are firewall apps available to suit your needs. Some of them are mentioned here:
- Closing internet access for some apps (see my answer here)
- Block apps from accessing the Internet on Android device
I've tested two firewall apps: AFWall+ (needs root access), and NoRoot Firewall, former tested on Android 4.2.1, 4.4.2 and 5.0.2, while the latter is tested on Android 4.2.1, and 4.4.2.
Since your device is rooted, I suggest using AFWall+ to be in control of the device. It runs default in White list mode i.e. all the apps including System apps and Kernel are denied root access. You can change that mode however.
Things to do
- Install the app
Tap the three dots vertical line next to lens icon → Preferences, and check the options suitable to you. I prefer:
- Show notification icon
- Show filter option -- it will break the app list into "All", "Core", System", and "User".
- Active Rules
- Confirm box on AFWall+ disable
- Enable Firewall logs
- Turn on log service
- Device Admin; and others you won't need
Choose Blacklist mode over White list mode if you intend to block specific apps while allowing Internet access to everything apps
(Click image to enlarge)
Find your app in the list (under "All" or "User") and check the boxes at its left if you're in Blacklist mode, or have it unchecked for White list mode.
- Choose Apply by tapping that three dots vertical line, and you're good to go. You can check Firewall logs after sometime for assurance.
As for NoRoot Firewall, it's very intuitive, straightforward, runs in Blacklist mode, so you would know what to do.
However, if you're still adamant to use the idea of switching the keyboard app, then I suggest you take a look at my comments:
The table
secure
ofsettings.db
(Settings Storage) has keys likedefault_input_method
(Samsung/Swiftkey) and some related keys. Change their values using Tasker when your specific app is launched and you're good to go.
Enable/Disable the app on-the-fly
You can on-the-fly disable the SwiftKey when your specific app is launched, because when SwiftKey is disabled (i.e. not available), Android will tend to fall back to the available keyboard which would be the Samsung one. This technique can be achieved by Tasker, and while it's theoretical, I believe it would also work.
-
I'd like people to know that any app with Accessibility Service enabled can record what's being shown (including what is being typed) on the screen. This answer doesn't address that.– Firelord ♦Commented Sep 15, 2017 at 12:03
secure
ofsettings.db
(Settings Storage) has keys like default input method (Samsung/Swiftkey) and some related keys. Change their values using Tasker when your specific app is launched and you're good to go. I don't have a Samsung device, otherwise, I would've attempted to answer. //Is the device rooted, and which Android version are you using?