I wasn't sure if I was supposed to ask this here, or in the security stackoverflow page, but I'm sure somebody has a great answer on this.
I'm building an Android
app which uses the Fabric.io Twitter package
. Using this requires a TWITTER_KEY
and a TWITTER_SECRET
code. I'm trying to hide them, because that's what they mention when the package is added.
At the moment I'm saving my cridentials in a SharedPreference
like this at the beginning of my splash screen activity:
PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).edit().putString("TWITTER_KEY", "xxxxxxxxxxxxxxxxxxxxxxx").commit();
Later, for initializing the Twitter
package, I'm recieving them like this:
TwitterAuthConfig authConfig = new TwitterAuthConfig(PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).getString("TWITTER_KEY", "defaultStringIfNothingFound")
I do the same with the TWITTER_SECRET
code.
I have two questions:
- What can people achieve if they have access to my keys?
- Is this safe enough so that other apps can't acces my keys?
- Is this safe enough for app decompiling?
Thanks for your help!