WeeNow Blog Logo

How to create an Android app integrated with Salesforce

Learn how to create a native Android app integrated with Salesforce using Mobile SDK, OAuth2 and APIs for data and synchronization.

By Caio Lopes
Cover image for the post How to create an Android app integrated with Salesforce
CategoriesIntegrations

Looking to develop a native Android application that communicates with Salesforce? Integration between mobile apps and the market's number-one CRM can transform how teams access information and interact with customers, sales data, leads, and internal processes. The goal here is to show a secure, practical, up-to-date path to build an app connected to the Salesforce cloud from scratch, taking full advantage of its API, authentication, and synchronization ecosystem.

Putting Salesforce in your pocket: this changes everything.

According to data from published on the overload caused by apps without integration, companies handle more than a thousand different applications and, unfortunately, only a small portion communicate with one another. Data silos create costs and friction that could be fully avoided through a simple integration between Salesforce and a custom Android application. This not only brings agility but also connects the entire team to the workflow, improving field service, sales, and operations.

Prerequisites and environment setup

Before you start coding, several points are essential to ensure success on this journey. To develop an Android app connected to Salesforce, you will need:

  • A valid Salesforce account with administrator permissions to create Connected Apps and access APIs.
  • Basic Java or Kotlin knowledge and, preferably, prior experience with Android Studio.
  • Node.js installed on your machine (the tool forcedroid requires it).
  • An up-to-date Android Studio installation, ready to compile native Android projects.
  • Salesforce Mobile SDK, available and ready to use.

If you have questions about the roles and profile of the developer involved, I recommend reading Salesforce developer: what does this professional do?.

Configuring the Connected App for OAuth2 authentication

The first concrete technical step is to create a Connected App in Salesforce. That is where your Android app will request authorization to access CRM data using OAuth2 authentication.

Follow these steps to create your Connected App:

  1. In Salesforce, go to Setup and search for “App Manager.”
  2. Click "New Connected App". Give it a name, a contact email, and the URL of your future app, if you have one.
  3. Select “Enable OAuth Settings.” Specify the callback URL (for example, myapp://oauth2/callback).
  4. Add the required scopes your app will need. For read, edit, and offline access, include api, refresh_token, offline_access.
  5. Save and note down the Consumer Key and the Consumer Secret, which are essential for configuring the mobile SDK.

This step is like opening the Salesforce door only to those properly identified by your Android app. Without it, nothing works.

Installing the Salesforce Mobile SDK and preparing the project in Android Studio

Once the Connected App is created, the next step is to prepare the development environment. The Salesforce Mobile SDK for Android ensures authentication, API, and security flows are ready to use with few adjustments, while supporting features such as offline data storage — essential for apps used in the field.

  1. Install the Mobile SDK: if you have not done so already, use npm:

Npm install -g forcedroid

  1. Initialize the project: in the terminal, type:

Forcedroid create

  1. Follow the instructions to specify the app name and package, choose "Native", and select the output path.
  2. Open the project in Android Studio: import the created directory as a standard Android project.
  3. Configure the bootconfig.json file: adjust the parameters client_id, callback_url and login_url according to the Connected App details.

Person programming an Android app on a laptop, with Salesforce displayed on screenAt this point, note how the SDK saves time by managing complex flows and already provides a ready-to-use login flow, secure token and session management, and support for communicating with Salesforce APIs.

Authentication, API access, and a practical flow

With the right settings in place, your Android app will be able to log in securely, manage OAuth2 sessions, and finally access Salesforce data through REST APIs. To continue along this path:

  1. Perform OAuth2 login: the Mobile SDK automatically generates the entire login interface and token handling.
  2. Build requests to REST APIs: using the SDK's standard classes, create calls to the desired endpoints. For example, to retrieve leads:

RestRequest request = RestRequest.getRequestForQuery(apiVersion, “SELECT Id, Name FROM Lead LIMIT 10”);client.sendAsync(request, new RestClient.AsyncRequestCallback() { // response handling});

  1. Response handling: API responses always come in JSON format, ready to be processed and displayed.

More tips on this integration model are detailed in the content about different API types on the Salesforce platform, including a comparison of REST, SOAP, and other possible approaches.

If the app needs to work offline, the SDK provides SmartStore, a local storage mechanism: write data to "soups" (local databases) and schedule automatic synchronisation when a connection is available. This is useful for field teams, rural sales, construction sites, or remote areas where connectivity is an ongoing challenge.

Android app screen with Salesforce data and a side chartVisual customization and Android app identity

It is not just about functionality. Visual design and identity also matter when companies seek to retain internal or external users in the brand's digital ecosystem.

The Mobile SDK lets you customize login screens, splash screens, app icons, and themes to align with the company's branding. Simply replace graphical resource files (icons, logos, colors) and adjust the manifests.

Another tip: use Android Material Design features to ensure fluidity and consistency within the native mobile experience. This way, the application delivers both Salesforce's robustness and your business's own look and feel, giving users familiarity and confidence.

Security and publishing best practices

Integrating sensitive CRM data is a serious task. A few simple actions make all the difference from the start of the project:

  • Never store credentials, tokens, or passwords directly in source code.
  • Implement biometric authentication and a PIN to protect local access on the device, especially if the app will be used outside controlled environments.
  • Monitor and manage permissions: request only what is truly necessary (contacts, storage, location… only if essential).
  • Keep the Mobile SDK up to date, applying security patches.
  • When publishing to the Play Store, follow Google's policies and clearly document how data and permissions are handled. Security and transparency go hand in hand.

Every secure app starts with the right configuration.

Companies that value compliance and data protection find essential support in WeeNow, an official Salesforce Partner consultancy that supports them from planning through to support, including IT outsourcing and ongoing-support cases.

Using CRM integration for business mobility

When a company decides to “bring Salesforce to mobile,” it has already recognized that agility and real-time information are differentiators. Field supervisors, salespeople, and technicians gain the autonomy to register leads, log opportunities, and resolve pending issues directly from their smartphones, even offline.

The secret is not only in the technology, but in how well the integration fits business workflows. Finance, education, construction, or retail teams often have specific requirements, approval flows, or custom data. A native app lets you tailor all of this — layouts, buttons, journeys, and custom dashboards — for each user profile.

Consultancies such as WeeNow bring a differentiator to this customisation by understanding each segment's context and proposing tailored Salesforce solutions, from simple integrations to deep integrations with legacy systems. Also explore content on Salesforce specialisation in Salesforce specialization for business, or learn more about implementation stages in step-by-step Salesforce implementation for companies.

Professional using a Salesforce app on a mobile phone in a construction environmentMany of these apps focus on the sales force, and content about Salesforce Sales Cloud further enhances results, as detailed in Salesforce Sales Cloud sales funnel.

Conclusion

Integration between Android applications and Salesforce turns silos into dynamic connections, reduces costs, and increases the decision-making power of those on the front line at the exact moment of action. The path involves planning, choosing the right tools, security from the outset, and customisation that respects each company's DNA.

If your goal is to accelerate business mobility, digitize processes, and empower your team, creating an Android app integrated with Salesforce is a clear strategy. Along the way, having experienced partners makes a difference, and Weenow is ready to accelerate and scale businesses like yours by designing tailored solutions for the future.

Discover how to transform your sales, service, or data-management process. Get in touch and see how Weenow can help with your Android app's Salesforce integration.

Frequently asked questions about Android apps integrated with Salesforce

How can I integrate my Android app with Salesforce?

Integration begins by creating a Connected App in Salesforce to configure OAuth2. Then use the Salesforce Mobile SDK in Android Studio to authenticate and access Salesforce APIs. The SDK handles login flows, session management, and REST request execution.

Which Salesforce APIs should I use on Android?

REST API is usually the primary choice for mobile apps because it is lightweight and simple to consume. With it, you can query, create, edit, and delete records, as well as run advanced searches on objects such as Lead, Account, and Opportunity.

Do I need to know how to code to create the app?

Yes, it is important to have at least basic knowledge of Java or Kotlin and familiarity with Android Studio. The Salesforce Mobile SDK helps considerably, but programming is required for customization and true integration.

What are the costs of integrating with Salesforce?

Costs include Salesforce licensing (depending on the number of users and features), potential consulting or development services, and costs to publish apps in the Play Store. Tools such as forcedroid and the Mobile SDK are free, but project complexity can affect the budget.

Is it safe to connect Android to Salesforce?

Yes, as long as you follow best practices: use OAuth2, keep SDKs up to date, do not expose credentials, and implement additional device authentication, such as biometrics or a PIN. By taking care of these points, the integration is very secure.

Continue reading

Related posts

View all

Speak with WeeNow

Describe your Salesforce scenario and a specialist will guide you, with no commitment.