3

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.

4
  • I can think of two approaches right now. One is very easy, which is to use a Firewall to restrict SwiftKey from getting connected to Internet, so that you don't have to worry about logged passwords getting uploaded somewhere. Second is, the table secure of settings.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?
    – Firelord
    Commented Jul 27, 2015 at 0:31
  • I like the firewall approach. I am rooted and running Kit Kat 4.4.2. Can you recommend an application I should look at to control firewall settings?
    – realp
    Commented Jul 27, 2015 at 0:37
  • Since the device is rooted, look no further than AFWall+. It's easy as well as effective. // There is a third method I forgot to write last time: 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 what's 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.
    – Firelord
    Commented Jul 27, 2015 at 10:41
  • Yes I have tried it. I can verify it is blocking SwiftKey from sending packets to the web. The app is a little annoying since at first it blocked all web traffic. However by using the firewall logs Im starting to 1 by 1 re-enable applications to access web. If you want to write formal answer. I can accept it as solved.
    – realp
    Commented Jul 27, 2015 at 19:05

1 Answer 1

2

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:

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

  1. Install the app
  2. 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
  3. 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)

    IMG: Tap Mode IMG: Select Black List

  4. 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.

  5. 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:

Delve into settings.db

The table secure of settings.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.

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.

1
  • 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .