This folder contains the library projects provided in the Salesforce Mobile SDK, and the test projects associated with them.
Please follow the instructions for setting up your development environment from the README file at the root of this repo, prior to working with the Salesforce SDK.
For the rest of this document, we assume that you have setup three shell variables:
- ANDROID_SDK_DIR pointing to the Android SDK directory
- SALESFORCE_SDK_DIR pointing to your clone of the Salesforce Mobile SDK repository e.g.
/home/jon/SalesforceMobileSDK-Android
. - LIBS_DIR pointing to $SALESFORCE_SDK_DIR/libs
If you haven't, just make sure to replace $ANDROID_SDK_DIR, $SALESFORCE_SDK_DIR and $LIBS_DIR in the snippets below with the actual paths.
Inside the $NATIVE_DIR, you will find several projects:
- SalesforceAnalytics: The SalesforceAnalytics library project which provides instrumentation and analytics functionality
- SalesforceSDK: The SalesforceSDK library project which provides support for OAuth2, REST API calls, pin screen (driven by mobile policy)
- SmartStore: Library project which provides the SmartStore functionality
- MobileSync: The MobileSync library project which provides support for Salesforce object metadata API calls, layout API calls, MRU API calls, caching
- SalesforceHybrid: The SalesforceHybrid library project which provides support for Cordova based hybrid apps
- SalesforceReact: The SalesforceReact library project which provides support for React based native apps
- test/SalesforceAnalyticsTest: Test project for SalesforceAnalytics
- test/SalesforceSDKTest: Test project for SalesforceSDK
- test/SmartStoreTest: Test project for SmartStore
- test/MobileSyncTest: Test project for MobileSync
- test/SalesforceHybridTest: Test project for SalesforceHybrid
- test/SalesforceReactTest: Test project for SalesforceReact
- Launch Android Studio and select
Import project (Eclipse ADT, Gradle, etc.)
. - Navigate to $SALESFORCE_SDK_DIR, select it and click
Ok
. - If a popup appears with the message
Unregistered VCS roots detected
, clickAdd roots
. - From the dropdown that displays the available targets, choose the sample app or test suite you want to run and click the play button.
To create a new native application, follow the instructions here:
- Launch Android Studio and select
Import project (Eclipse ADT, Gradle, etc.)
. - Navigate to your application's directory, select it and click
Ok
. - If a popup appears with the message
Unregistered VCS roots detected
, clickAdd roots
. - From the dropdown that displays the available targets, choose your application and click the play button.