Start United States USA — software Building a Kotlin Mobile App with the Salesforce SDK

Building a Kotlin Mobile App with the Salesforce SDK

152
0
TEILEN

Join the DZone community and get the full member experience.
Nowadays, users expect mobile apps to act as counterparts to the websites and platforms they …

Join the DZone community and get the full member experience. Nowadays, users expect mobile apps to act as counterparts to the websites and platforms they use on the web. Mobile applications give users the ability to carry their data with them, granting them the flexibility to interact with platforms wherever they go. This usability makes sense, and we are all familiar with it. Developing a mobile experience that’s seamlessly integrated with the functionality of your website can be intimidating. For starters, how should you store and retrieve data if the mobile app loses connectivity? What happens when two mobile users try to update the same data at the same time? How can you just make sure your app’s data is in sync, given that it has limited storage space? In this series, we’ll take a look at the Salesforce Mobile SDK, a toolkit that addresses many of these technical challenges for developers building apps for Android or iOS. The Salesforce Mobile SDK handles data synchronization, offline storage, notifications, authentication, and many more essential details. To highlight some of these features, we’ll build an app that accesses real Salesforce data. On the Salesforce end, we’ll set up an org with a pre-populated app that uses custom objects. In this first post of the series, we’ll cover how to get our mobile app to display our records. In Part Two, we’ll cover how to create and update records in our list. Finally, in Part Three, we’ll learn how to work with the SDK and the Salesforce APIs to synchronize data between the desktop and mobile environments. Although the app will be written in Kotlin and run on Android, the fundamental concepts apply to iOS. We’re choosing Kotlin for the same reasons the Android platform recommends it: it’s faster to write in, offers more code safety than Java, and boosts productivity with its expressiveness. Before we begin, install the following software on your machine: Since we’re just exploring the SDK right now, it’s important that whatever we build doesn’t affect your “real” production Salesforce organization (also called „org“ for short). Therefore, we’re going to create a separate free Developer Edition org which our app can interact with. First, sign up for your Developer Edition. Take note of your username, as you’ll need it in a moment. After you’ve verified your email address and your org is available for use, go ahead and follow these instructions to clone the dreamhouse-lwc project onto your computer, and then upload it to your new org using sfdx, the Salesforce CLI.

Continue reading...