Linking your apps on SlideME

Developers,

In order to help you improve discoverability of your apps or if you just wish to spread the word of other apps that you may like, or friends/developers/partners you would like to recommend, SlideME aids with providing an Intent-based interface for Android Interactions with the SlideME Marketplace (SAM: SlideME Application Manager).

SlideME and SAM adapts to Android Market Discoverability Interface. This means that SAM is also capable of handling all the Android Market intents, whether SAM is the sole Android App-Store Application on-device or even if 'Android Market' is also present at the same time with SAM and the end-user chooses to use SAM over Android Market. To read more on the Android Market Linking Interface, you can go to http://developer.android.com/guide/publishing/publishing.html#marketintent

SAM also supports an additional URI Prefix (sam://), which extends the interactions even further. Although the proprietary prefix "sam://" adapts to the Android Market host and parameters, you should opt for using SAM proprietary URI schemes only when specifically using SlideME's extended interactions interface.

The proprietary URI Scheme for SAM consists of (in left-to-right order):

  1. the "sam://" prefix, which clearly indicates that SlideME's SAM is the target URI recipient
  2. the concatenation of one of from below hosts, suffixed by question mark '?'
  3. a pair of "param=value" (equal sign '=' is the key-value separator; parameters are being explained for each host specifically below):

Parameter details

  • bundleId – (or App ID) the SlideME Application unique bundleId mapped to the application

Example URI for Pool Break Demo:

  • The bundleId for this application is "64a107d6-9ebe-102d-820b-12313b000c93";
  • The URI for SAM Intent should be: "sam://details?bundleId= 64a107d6-9ebe-102d-820b-12313b000c93"

Launching intent with this URI will open SAM and display the "Pool Break Demo" application as the search result (similar to how catalog application listing displays; Please note that at the moment SAM intents are entirely based on search results only, rather than displaying the application details directly. This is a design issue that is being tackled and a future SAM update should display the application directly, instead of Search Results).

Supported Intent actions for the SAM intent are: Intent.ACTION_VIEW and Intent.ACTION_SEARCH

Example usage of this specific intent:

Intent i = new Intent(Intent.ACTION_VIEW);
  i.setData(Uri.parse("sam://details?bundleId= 64a107d6-9ebe-102d-820b-12313b000c93o"));
  startActivity(i);

Further example URIs that SAM supports follow (just open below links from your device's browser):

Here is a method to programmatically detect if an application (SAM) is present on the device:

public boolean isApplicationIstalledByPackageName(String packageName) {
  List<PackageInfo> packages = getPackageManager().getInstalledPackages(0);
  if (packages != null && packageName != null) {
    for (PackageInfo packageInfo : packages) {
      if (packageName.equals(packageInfo.packageName)) {
        return true;
      }
    }
  }
  return false;
}

Example on how to use the above method to check if SAM is installed on device:

if(isApplicationIstalledByPackageName ("com.slideme.sam.manager")){
  // sam is installed, search SAM for bundleid; 
  // Create your market link intent to launch
  Intent intent = new Intent(Intent.ACTION_VIEW);
  //replace with your SlideME username
  intent.setData(Uri.parse("sam://search?pub:{yourSlideMeUsername}"));
  startActivity(intent);
} else {
  //sam is not installed, go to application details on slideme.org
  Intent intent = new Intent(Intent.ACTION_VIEW);
  //replace below url with the link to the application on slideme.org
  intent.setData(Uri.parse("http://slideme.org/application/slideme-marketplace"));
  startActivity(intent);
}
To open an application profile page on the SlideME website, using a URL approach with packageName : http://slideme.org/app/<packageName>

Feel free to leave a comment if you need any help or clarification on the above.

SAM Intent

It would be perfect if SAM application could catch http://slideme.org url. I would certainly use that scheme. At least browser would be opened in case SAM is not installed.

RE: SAM Intent

Simple and doable. We will plan to implement this feature in the next release of SAM. Thank you for the suggestion.

SAM Intent and URL by Package Name

I would like to know how can I use a Url scheme to open an application page on http://slideme.org using its Package Name.
Is it possible?

Thanks
Joel A.G. Oliveira

SAM Intent and URL by Package Name

Hi Joel,

You can use something like this: http://slideme.org/app/com.venator.app.ursafebattery

Hope this is what you are looking for.

Regards,
SlideME Team

SAM Intent and URL by Package Name

Hi,

That is it.
Thank you very much.

Regards
Joel A.G. Oliveira
Venator Software

SAM Intent when application is not in device's memory

Hello there,

I am experiencing some problems launching SAM intent. My intent url is sam://details?id=com.kb.Carrom3D (example).

However, if Application Manager is not already loaded, the application starts with home screen (list of featured) apps.

Kind regards, Viktor.

RE: SAM Intent when application is not in device's memory

Hello,
Thank you for reporting. This is a known issue that will hopefully be resolved in the next major release of SAM.