Secure API Keys with a Public-Key Cryptography on Android
Store API Keys on a Backend Server and exchange them Securely with Andorid app, with the help of Android Keystore System
Public key cryptography, also known as asymmetric cryptography, is a cryptographic approach that uses key pair: public key and private key. They are mathematically related but cannot be derived one from another.
Android Keystore system is a part of the Android operating system that provides a secure storage facility for cryptographic keys, certificates, and related information.
A modern approach of securely exchanging information between two parties. It includes private and public key. Private is kept safe, while public is shared with anyone.
Encrypted Shared Preferences
Securely persist the data on your Android device, in an encrypted manner. Even if someone get your data, it's hard to decrypt it.