The Tapslash Developer Hub

Welcome to the Tapslash developer hub. Here you'll find comprehensive guides and documentation to help you start working with the SDK(s) as quickly as possible, as well as support if you get stuck slong the way. Let's jump right in!

Get Started    

Local Services

In addition to the services Slash provides, developers can also add custom, local services using the Slash SDK. To add a local service, follow the steps below:

1) Add a new local service on the Slash Platform (recommended)


Create a service in the slash_services.json file and set the type property set to local.

      "id": 50,
      "app_order": 200,
      "image_baricon": "http://s3.amazonaws.com/slash-media-staging/services/baricon/1f1950e9205393bc0c9d97c609c8a997b3644f8f.png",
      "slash": "ourlocalservice",
      "type": "local"

You need to have a distinct id from the other in the file.
The app_order is used to sort the icons in the bar.
The image_baricon is the icon image URL. You will probably want to cache it as res/drawable/slash_ourlocalservice_bar.png

2) Register the local service(s). This ensures that if a local service is added to the dashboard, it will only show up on the Slash toolbar if the client is registered to handle that service in order to avoid versioning issues. Registering local services must be done before sync is called.

Slash.getInstance().registerLocalServices(new String[] {"ourlocalservice"});

3) Implement the OnSelectServiceListener as follows:

slashView.setOnSelectServiceListener(new OnSelectServiceListener() {
    public boolean selectService(RService service) {
        if (service.getSlash().equals("ourlocalservice")) {
            // Returning true means you are implementing the service
            return true;
        return false;

Also, in order to clear the icon highlighting, you can use slashView.resetServiceBarView().

Every time you change the local files or language, you need to bump up the precache version by calling

Slash.init(...).precacheVersion(version); // Default value is 0

Local Services