I am using mobile SDK v10.1.1 for logging into the salesforce credentials, I had successfully logged in and after that allow and cancel button is shown in the screen, I had clicked the allow and taking the next action, but once clicked the allow button my app suddenly closes, please help me with the solution for this.

Added dependency in build.gradle file

implementation 'com.salesforce.mobilesdk:SalesforceSDK:10.1.1'

Added following Lines in MyApplication Class

SalesforceSDKManager.initNative(this, MainActivity::class.java)

Using LoginCheck Activity to check login by extending it to SalesforceActivity

but main activity is not extend to SalesforceActivity

Thank you.

1 Answer 1


Found the root cause by experimenting with Activities. Adding the answer here so that if anyone comes across the same issue can get a clue

I found that in My case entry point activity that was extended SalesforceActivty was having noHistory = true. so when activity launches it checks and calls LoginActivity as noHistory is true, so the instance is not maintained in the stack. after completion of the login process login activity simply get finish() and it looks like add is crashing but its just end up with no activity in the stack

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .