Question

Is it possible to access test.salesforce.com from a Hybrid app generated with the Salesforce.com Mobile SDK for Android?

When using the iOS SDK, the login URL can be set via an application setting, however this does not seem possible within a Hybrid App on Android.

Do I need to modify the PhoneGap plugin SalesforceOAuthPlugin to do this?

I'm referring to the SDK available from https://github.com/forcedotcom/SalesforceMobileSDK-Android

Was it helpful?

Solution

I think that this can't be done using javascript, if you're doin' this with mac, you have to change your app settings at (Settings | Your App | Custom Host) and replace login by test.

If you're doin' this on android, you have to edit the DEFAULT_LOGIN_URL attribute of the classe com.salesforce.androidsdk.auth.OAuth2.java to the test login URL (https://test.salesforce.com).

I was in this trouble since a week, and that's what I did and it works on my Hybrid App.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top