简体   繁体   中英

Salesforce sandbox access from Android Hybrid App

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM