npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

forcedroid

v12.2.0

Published

Utilities for creating mobile apps based on the Salesforce Mobile SDK for Android

Downloads

319

Readme

Salesforce Mobile SDK for Android Package

The forcedroid npm package allows users to create Android mobile applications to interface with the Salesforce Platform, leveraging Salesforce Mobile SDK for Android.

Getting Started

If you're new to mobile development or the force.com platform, you may want to start at the Mobile SDK landing page. This page offers a variety of resources to help you determine the best technology path for creating your app, as well as many guides and blog posts detailing how to work with Mobile SDK.

But assuming you're all read up, here's how to get started with the forcedroid package to create the starting point for your mobile application.

Install the forcedroid Package

Because forcedroid is a command-line utility, we recommend installing it globally so that it's easily accessible on your path:

    sudo npm install forcedroid -g

You're of course welcome to install it locally as well:

    npm install forcedroid

In local installations, you can access the forcedroid app at [Install Directory]/node_modules/.bin/forcedroid.

Using forcedroid

For the rest of this document, we'll assume that forcedroid is on your path.

Typing forcedroid with no arguments gives you a breakdown of the usage:

-> forcedroid
forcedroid: Tool for building an Android native mobile application using Salesforce Mobile SDK

Usage:

# create an Android native mobile application
forcedroid create
    [--apptype=application type (native or native_kotlin, leave empty for native_kotlin)]
    --appname=application name
    --packagename=app package identifier (e.g. com.mycompany.myapp)
    --organization=organization name (your company's/organization's name)
    [--outputdir=output directory (leave empty for current directory)]

 OR 

# create an Android native mobile application from a template
forcedroid createwithtemplate
    --templaterepouri=template repo URI or Mobile SDK template name
    --appname=application name
    --packagename=app package identifier (e.g. com.mycompany.myapp)
    --organization=organization name (your company's/organization's name)
    [--outputdir=output directory (leave empty for current directory)]

 OR 

# list available Mobile SDK templates
forcedroid listtemplates

 OR 

# validate store or syncs configuration
forcedroid checkconfig
    --configpath=path to store or syncs config to validate
    --configtype=type of config to validate (store or syncs)

 OR

# show version of Mobile SDK
forcedroid version

 OR 

forcedroid

Note: You can specify any or all of the arguments as command line options as specified in the usage. If you run forcedroid create with missing arguments, it prompts you for each missing option interactively.

Once the creation script completes, you'll have a fully functioning basic application of the type you specified. The new application has an Android Studio workspace that you can peruse, run, and debug.

forcedroid create options

App Type: ( Optional ) The type of application you wish to develop:

  • native_kotlin (default) — A fully native Android application written in Kotlin
  • native — A fully native Android application

App Name: The name of your application

App Package Identifier: The Java package identifier for your app (e.g. com.acme.mobile_apps). Note: Your package name must be formatted as a valid Java package name, or you will receive an error.

Organization: The name of your company or organization. For example, Acme Widgets, Inc.

Output Directory: ( Optional ) The folder where you want your app to be created.

More information

  • After your app has been created, you will see some on-screen instructions for next steps, such as building and running your app, importing the project into Android Studio, and changing the default Connected App (sample) configuration values to match your own Connected App.

  • You can find the forceios npm package here to develop Mobile SDK apps for iOS.

  • You can find the forcehybrid npm package here to develop Mobile SDK hybrid apps for iOS and Android.

  • You can find the forcereact npm package here to develop Mobile SDK react native apps for iOS and Android.

  • The Salesforce Mobile SDK for iOS source repository lives here.

  • The Salesforce Mobile SDK for Android source repository lives here.

  • See our developerforce site for more information about how you can leverage Salesforce Mobile SDK with the force.com platform.

  • If you would like to make suggestions, have questions, or encounter any issues, we'd love to hear from you. Post any feedback you have on Salesforce StackExchange.