The Salesforce Mobile SDK 3.1 introduces new features like a new Unified SmartSync API for native and hybrid apps, Improved build tools for iOS and Android, new flows to initiate authentication with an enterprise certificate and canonical Sample Apps that show how to create native and hybrid apps with data synchronization.
This article extends those by showing how you can build a native Android app that utilizes the Chatter_API Chatter REST API. To accomplish this, we will use the Mobile SDK 3.1, which acts as a wrapper for low-level HTTP functions, allowing us to easily handle Oauth and subsequent REST API calls. In general, the TemplateApp provided in the SDK will serveas a base for building most apps. This tutorial uses the structure of the TemplateApp and builds upon it by borrowing and modifying from the REST Explorer sample application. This helps to ensure things are as straightforward as possible. We aren’t going to touch on every aspect of building this application, but instead cover the salient points, giving the reader a good starting point while trying to expand on the salesforce.com documentation. This tutorial attempts to serve as a bit of a shim for developers, who are not overly familiar with the platform, to use the API in a way that is presumably more familiar. A lot of what we’ll cover will complement the Salesforce Mobile SDK Development Guid.
Main Features of Salesforce Mobile SDK 3.1:
- Extended choice of development tools or UI frameworks like for iOS you can now use CocoaPods. So, with the Salesforce Mobile SDK 3.1 release, mobile developers no longer have to make these trade offs for selecting.
- Salesforce Mobile SDK 3.1 does have everything consistent like all the libraries, all the APIs & all the major mobile building blocks.
- It is unified app architecture (SmartSync API for fast and responsive apps) brings unparalleled flexibility meaning that you can built hybrid or native apps using same core set of functionality regardless of their target platform.
- Salesforce Mobile SDK 3.1 have flows to initiate authentication with an enterprise certificate.
Recent versions of Salesforce Mobile SDK add flexibility for login and especially for hybrid apps. Here are some of highlights:
- SmartSync for native iOS and Android apps. (Introduced in Mobile SDK 3.0)
- Launch flow management for iOS native apps. (Introduced in Mobile SDK 3.0)
- Ability to access Salesforce-specific functionality for hybrid apps through independent Cordova plugins and build hybrid apps from
the Cordova command line. Developers can consume Salesforce OAuth2 Identity, SmartStore secure offline database, and push
plugins, always in the latest version of Cordova, independent of Mobile SDK releases. (Introduced in Mobile SDK 2.3)
- For hybrid remote apps, locally hosted HTML, JavaScript, and CSS resources. You simply host a landing page on the remote Visualforce
server, while the rest of your app can reside on the mobile device. (Introduced in Mobile SDK 2.3)
- Support for push notifications in native apps. (Introduced in Mobile SDK 2.1)
- Support for push notifications in hybrid apps. (Introduced in Mobile SDK 2.3)
- New SmartStore APIs for re-indexing soups and gathering information. (Introduced in Mobile SDK 2.3)
- Multi-user support, allowing the user to log into multiple accounts simultaneously. (Introduced in Mobile SDK 2.2 and later)
- Flexible authentication. You can postpone Salesforce login until any logical point in your app’s life cycle. (Introduced in Mobile SDK
2.2)
USEFUL LIBRARY:
- iOS Native SDK: https://github.com/forcedotcom/SalesforceMobileSDKiOS/tree/master/native/SampleApps/SmartSyncExplorer
- Android Native SDK: https://github.com/forcedotcom/SalesforceMobileSDK-Android/tree/master/native/SampleApps/SmartSyncExplorer
- Hybrid App Native SDK:https://developer.salesforce.com/blogs/engineering/2014/11/cross-platform-apps-salesforce-mobile-sdk-webcomponents.
Happy Programming 🙂