I'm building an Android app and the client want me to do SSL Pinning to avoid any Mitm attacks. I've already implemented complete encryption and decryption on my API requests (JSON Format) and the corresponding responses (JSON Format).
By searching the web and reading a few blogs, my understanding of Mitm attacks is that the attacker can intercept the request, modify the data and send it to backend server and then alter the response and push it back to the client app with incorrect data. But since my request and response are completely encrypted (ciphering), is it still possible to carry out Mitm attacks on my app and alter the data?
I understand that the request still can be intercepted and the encrypted data is visible to attacker but since he don't have keys to decrypt so it's of no use and if the encrypted string is altered, the decryption will fail causing the app to not load any thing mimicking the behavior of Mitm where if the certificate keys mismatch, the connection is terminated.
And I found this solution here to implement SSL Pinning in android application with Volley library. Is it enough or should I implement some other methods?