I am getting BranchSDK: returned {}
as response
when i use Branch.getInstance().setIdentity("your_user_id");
Asked
Active
Viewed 307 times
-2

Sharanjeet Kaur
- 796
- 13
- 18
-
@Sharnjeet Kaur check out my updated answer – Aniruddha K.M Oct 10 '17 at 09:34
-
It looks like there is some issue with your configuration of the Branch SDK. Can you write to `integrations@branch.io`? – Amruta Deshmukh Oct 11 '17 at 00:37
-
@AmrutaDeshmukh it is already given in the docs maybe he is using old sdk version cause i answer that i have given is valid for the latest sdk – Aniruddha K.M Oct 11 '17 at 05:22
-
@Sharanjeet check out firebase dynamic links, an alternative to Branch.io – Aniruddha K.M Oct 27 '17 at 16:58
1 Answers
0
if you want a branch instance back use this method
Branch branch = Branch.getAutoInstance(context,"your branch key");
as per the docs
Singleton method to return the pre-initialised, or newly initialise and return, a singleton object of the type Branch.
After that use can use singleton Branch object throughout your appp

Aniruddha K.M
- 7,361
- 3
- 43
- 52
-
the method that you have given i used to initialize the Branch instance. The getAutoInstance() method is used in the Application class and not the Activity Class. Please check the documentation [here](https://docs.branch.io/pages/apps/android/#load-branch) – Amruta Deshmukh Oct 11 '17 at 15:55
-
So you cannot use `Branch.getAutoInstance()` in your Activity to get the Branch instance. – Amruta Deshmukh Oct 11 '17 at 17:31
-