Setting Up Environment for Android App Development using Salesforce Mobile SDK
In this blog, we are going to discuss how to set up the environment of Salesforce Mobile SDK for developing mobile Apps using the Salesforce platform.
Pre-requisites
- Basic knowledge of command line
- Android Studio
First of all, to create a mobile app with Salesforce SDK we need to use force droid which is a CLI that needs to be installed. We install it globally using the following command. However, if your system doesn’t have npm then install it first then proceed with the following command.
After installation of forcedroid , it is ready to use it, now run the following commands to see the available options
On running above command we will get the following result contains the various options available for creating an App with Salesforce MobileSDK.
After creating an app with any of the above available options you need to provide the following information related to your app and press enter after each line.
appType: The type of app for, if using kotlin for native app development put kotlin_native otherwise put native as your app type
appname: Name of the application.
packagename : Package name for the app, it must contain at least one dot(.)
organization: Name of organization/company
ouputdir : Path of directory where you wan to store this project, leave empty for the current folder
Wait till cmd to finish the creation of the project successfully. Now your Android app is ready to connect with Salesforce Org. Open the project in Android Studio IDE and run it. If you don’t have Android Studio in your system then first install it then proceed. If everything is ok you will see a login screen with Salesforce Icon as shown image below.
Did I get something wrong? Mention it in the comments. I would love to improve.
If you liked what you read, please leave some claps!
Thanks for reading
To get updates about my upcoming blogs, follow me so that you’ll get notified when we write new posts.
LinkedIn : https://www.linkedin.com/in/alok1997/
Little about me
Hi, I am Alok Kumar (Mobile App Developer) and I love to develop mobile applications using Android and flutter and everyday ready to learn something new . Here are the links to my previous blogs of Android and flutter.
Kotlin Vs Java: https://medium.com/mobcoder-llc/kotlin-vs-android-f73fdbe75dfc
Getting Started with Flutter when you already know Android: https://alokiimtgn.medium.com/getting-started-with-flutter-when-you-already-know-android-469d2b576722
Flutter Layout Patterns : Rows (Horizontal ) & Columns(Vertical) : https://alokiimtgn.medium.com/flutter-layout-patterns-rows-horizontal-columns-vertical-4f4eafd35a25