we need to develop an android app that makes the connection to SF using the Mobile SDK. We follow all the steps indicated in the official guide but we are having problems, because after a successful login we are redirected to the community home page instead of having access to the android app. From Salesforce side is possible to see it from the login history, because under the column "Login Type", if the user get access to the app you see "Remote Access 2.0", if the user get access to the portal community you see "Chatter Communities External User".
In Salesforce we configured the followings:
Connected App associated to permission set and profiles that have access to the community
User with API ENABLED permission and member of the community
Inside the android app in \mobile_sdk\SalesforceMobileSDK-Android\libs\SalesforceSDK\res\xml\servers.xml
server name with the url of the community login
remoteAccessConsumerKey: same consumer key generated by the connected app
oauthRedirectURI: same callback url configured in the connected app (test2sfdc:///mobilesdk/detect/oauth/done)
oauthScopes: api, web, chatter_api, refresh_token, id, openid, visualforce (the first time oAuth worked even just with api, web)
It worked once and then no more. It is still working only if we make the login on login.salesforce.com (then the configurations should be fine, because in this case I can see the name of the connected app in the login history of the user), but not from the community login.
Is anyone having my same problem? Do you have suggestions?