In Facebook SDK Guide, there are no comments about requestCode. However sometimes I needed to set requestCode on onActivityResult to distinguish with other action and prevent wrong behavior.
Set enum value instead of XXX. Enum values are below.
Example : CallbackManagerImpl.RequestCodeOffset.Login.toRequestCode()
public enum RequestCodeOffset {
Login(0),
This is what I found while investigating Facebook SDK.
If you have more than one app communicate each other, you can experience this.
There are defence codes in Facebook SDK, so it would not make a problem.
Set taskAffinity with a package name which holds the task.
<activity
- cause of multidex problem
Some of apps doesn't support multidex option, due to support low version below Lollipop.
In my case, I was using Facebook SDK to implement social login, but with recent version of SDK, v4.28. My app's method counts was over to 65K. However I was supporting from Kitkat, so I should exclude some libraries not using. - To reduce apk size
- make configurations blocks with any name and change compile to the name.