Is it possible to have different keyboard for different apps, say I want to have Emoji Keyboard for facebook and twitter but Google Indic keyboard for my whatsapp is this possible.
Mobile : HTC Desire 820
OS : Android 5.1
If you just want to use 2 different keyboards, create such a profile for the keyboard you use with "fewer apps". In the condition, chose all the apps that should use that keyboard. You might need to add an "exit task" reverting back to your "default input method".
For more than 2 keyboards, create one profile per "special keyboard" the same way.
DEFAULT_INPUT_METHOD is a secure setting (it manages the input method (IME), keyboard in short) and any modification in its value requires the permission WRITE_SECURE_SETTINGS. However, that permission is not for use by third-party applications and no currently installed system app at the moment can do what you want.
It makes sense why third-party apps shouldn't be allowed to switch IME because otherwise, such permission would open plethora of opportunities for keylogger malware. Given the constraints, the only thing to do is root the device.
The flowchart to achieve the objective would look like
(Click image to enlarge)
The app would introduce you with its basic usage so making that flowchart is easy. Just for a little guidance, know that the second block (When foreground app) can be found under Apps and third block (Set input method) can be found under Settings.
After making the flowchart, make sure to install all the permissions it needs