Android’s Gboard always suggests replies in chat apps that fit the context of what my contacts write.
If my previous message had been related, I would assume it predicted what my contact would say in response and make a suggestion based on that. But even if the contact changes the topic, the suggestions are appropriate.
I don’t expect that the apps all share the conversation with Gboard. So how are the predictions made.
It seems unlikely that it would take screenshots and base predictions on that. But otherwise I don’t know how it is possible.
Applications like that obfuscate the already almost unreadable decompiled code
Obfuscation only makes the effort of decompilation take a bit longer - fundamentally, they are going to be executing the bytecode on your device, and that cannot be hidden from you.
I’m speaking from experience here - I’ve decompiled multiple APKs before, all containing bytecode that has been obfuscated by ProGuard. It’s a bit harder than reading source code, but with some practice it’s always possible to figure out what’s going on in the end.