---
schema_version: "1"
id: 9bd74025f9360ee8e5a9e0a64631b20a1d0738b32db2d1cac972d3ddf677f8a2
title: Salesforce Mobile App Context Considerations
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/canvas-framework/guides/platform-connect/using/chatter/canvas-apps-salesforce1-context-considerations.md
canonical_url: https://developer.salesforce.com/docs/platform/canvas-framework/guide/canvas-apps-salesforce1-context-considerations.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 70c989f3777e7c16894e2cce7475591fef029c607174a43305fecb438e6e2b60
products:
  - Canvas Developer Guide
  - Platform Developer Content
---

# Salesforce Mobile App Context Considerations

Keep these considerations in mind when you display a canvas app inside of the Salesforce mobile app.

When you display a canvas app inside of the feed or publisher, the canvas context you receive (either from the Signed Request or from the `getContext` call) contains information specific to the Salesforce mobile app publisher.

-   You can verify you’re on either the feed or publisher by looking at the `displayLocation` value in the environment section. For publisher, `displayLocation` is set to `Publisher`. For the feed, `displayLocation` is set to `ChatterFeed`.
-   When creating a Canvas feed item, you can specify a `JSON` string as the parameter’s value. When the context is sent, any value in the parameter’s field on the feed item is sent in the parameters of the environment section of the context.
-   As with any canvas app, the context contains information about the app’s dimensions. Since Salesforce is designed for mobile, the sizes we provide for it are different than the ones we provide for the full Salesforce sites.
-   To create a single-finger touch scrolling experience:

    -   Ensure that the outermost `div` elements contain the following properties.

        -   min-height: 250px;
        -   overflow: scroll;
        -   width: 100%;
        -   -webkit-overflow-scrolling: touch;
        -   -webkit-transform: translated(0%,0px,0px);
    -   Set the `height` attribute to the `clientHeight` value delivered in the signed request. For example:

        ```nolang
        // Where sr is a parsed signed request object.
        var h = parseInt(sr.context.environment.dimensions.clientHeight, 10);
        Sfdc.canvas.byId('divElementId').style.height = h;
        ```

    -   The `clientHeight` value can be very small, particularly in a phone’s landscape mode, and users might not be able to see any content. Use `min-height` set to the desired height in pixels to ensure a good user experience.
    -   In the navigation menu, the default puzzle icon size is 60 pixels by 60 pixels.

**See Also**  


-   [Canvas in the Salesforce Mobile App](https://developer.salesforce.com/docs/platform/canvas-framework/guide/canvas-apps-in-salesforce1.md)
-   [Salesforce Mobile App Access Considerations](https://developer.salesforce.com/docs/platform/canvas-framework/guide/canvas-apps-salesforce1-app-access-considerations.md)
-   [Resizing a Canvas App](https://developer.salesforce.com/docs/platform/canvas-framework/resizing/canvas-app-resizing.md)
-   [Salesforce Mobile App Custom Icons](https://developer.salesforce.com/docs/platform/canvas-framework/guide/canvas-apps-salesforce1-icon-considerations.md)

