android - Secure way to use password in java file -


I am developing an Android application through which I am sending a mail via Gmail API.
To send mail through Gmail API, I need to give them my ID and password.

  GmailSenderM = New GMSendender ("myemailhere@gmail.com", "mypasswordhere");  

And I know how to write a password like this that it is not absolutely safe because my password can be easily stolen by removing my APK and also storing passwords in the string. Could. XML is also not secure because XML can also be retrieved.

My question is-
Is there any other way of writing passwords in my file, so that it is safe?

No short answer. You should not store your password in the code not or anywhere in any file.

Even if you encrypt it as if someone has said that you will get it decryption algorithm / code, which will easily reverse engineer.


Comments