Facebook requestCodes

前端 未结 7 754
予麋鹿
予麋鹿 2021-02-02 11:26

I have an Activity that should handle results from both the Facebook SDK, and from other custom Activities.

Where can I find the requestCodes used by the Facebook SDK, i

7条回答
  •  南方客
    南方客 (楼主)
    2021-02-02 12:17

    Adding to Apetroaei Andrei's answer, there are other options available at Facebook SDK's CallbackManagerImpl class:

    public enum RequestCodeOffset {
        Login(0),
        Share(1),
        Message(2),
        Like(3),
        GameRequest(4),
        AppGroupCreate(5),
        AppGroupJoin(6),
        AppInvite(7),
        ;
    

    These can be accessed by the foll. code:

    if (requestCode == CallbackManagerImpl.RequestCodeOffset.Share.toRequestCode()) {
        callbackManager.onActivityResult(requestCode, resultCode, data);
    }
    

提交回复
热议问题