Reputation: 1
I am wondering if it's possible to hide the Facebook
app id for my application? The apk
can be decoded with special tools like apktool
and I don't want my Facebook
app id or other private information to be visible in the code.
Upvotes: 0
Views: 1026
Reputation: 43816
I'm not sure why you'd want to do this; an App ID is basically public information and is included in the dialogs the user sees when authorising the desktop/web (if applicable) version of the app. It will be also visible to the user in their privacy settings after they authorise your app, visible when they search for your app, etc.
If you're referring to your App Secret, under no circumstances should this be distributed with your client code, if you're making API calls which need the App Secret you should make these calls from a server and set up a communication path between your client app and this server - the app secret should never be passed over this path as with it users could make API calls on behalf of the app
Upvotes: 4
Reputation: 39549
You could load that ID from a server at app-start. I assume you need INTERNET permission for FB anyway ..
Upvotes: 0
Reputation: 21667
you could use proguard to obfuscate your code and as an extra measure you could compose your appid string in a for to concatenate characters
Upvotes: 0