Skip to main content

Ready to market your stellar app?

Samsung Developer Program is your gateway to app monetization success.

Learn More

Samsung Developer Program

Integrating Look Edge

This section and its sub-topics  provide development guidelines for integrating Look Edge functionality into either: an Edge app (which implements an Edge Single or Single Plus panel or an Edge feed), or in an Edge-integrated app (which implements an Edge Immersive panel).

For details about the Edge API, see the Edge API Structure section.

 

Edge APK Development and Distribution

You have several options in developing and distributing your Edge apps and your Edge-integrated apps, which depend on the type of Edge panel or feed your are implementing:

 

Your Edge app APK is not associated with any other app APK:

  • The Edge Single panel app, Edge Single Plus panel app, or Edge feed app can:
    • Receive panel / feed item content from the device platform and independent sources.
    • Launch actions related to independent apps and functions.
  • The Edge APK can be distributed freely or commercially via app stores.
     

Your Edge app APK is associated another app APK:

  • The Edge Single panel app, Edge Single Plus panel app, or Edge feed app can:
    • Receive panel / feed item content from the device platform and independent sources.
    • Receive panel / feed item content from the associated app.
    • Launch actions related to independent apps and functions (such as deeplinking to an app store or launching a browser).
    • Launch the associated app or actions related to it.
  • Both apps can communicate with each other.
    NOTE:  The associated app CANNOT launch the Edge app's panel or feed.
  • Both APKs can be distributed freely or commercially via app stores.
     

Your Edge app and an associated app are in 1 APK:

  • The Edge Single panel app, Edge Single Plus panel app, or Edge feed app can:
    • Receive panel / feed item content from the device platform and independent sources.
    • Receive panel / feed item content from the associated app.
    • Launch actions related to independent apps and functions (such as deeplinking to an app store or launching a browser).
    • Launch the associated app or actions related to it.
  • Both apps can communicate with each other.
    NOTE:  The associated app CANNOT launch the Edge app's panel or feed.
  • The APK can be distributed freely or commercially via app stores.

 

Your Edge-integrated app APK (Edge Immersive panels only):

  • The Edge Immersive panel integrated into an app can:
    • Receive content from the device platform and independent sources.
    • Receive content from the integrated app.
    • Launch actions related to independent apps and functions (such as deeplinking to an app store or launching a browser).
    • Launch the integrated app or actions related to it.
  • The APK can be distributed freely or commercially via app stores.

 

To integrate Look Edge functionality into an Edge app APK or an Edge-integrated app APK:

  1. Review the Look Development information and meet its requirements.
  2. Initialize Look Edge and S-Pen.
  3. Set up Look.
    1. Manage SsdkUnsupportedException exceptions (getType).
    2. Get the Look SDK version number and name (getVersionCode, getVersionName).
    3. Ensure that Look Edge features are enabled on the user's device (isFeatureEnabled and setFeatureEnabled).
       
  4. Determine whether or not the user's device supports your intended Look Edge panel and act appropriately.
  5. Optional  For Galaxy Apps store distribution, identify your Edge APK or Edge-integrated main APK.
  6. To implement an Edge Single or Single Plus panel or an Edge feed in an Edge app APK:
    1. Declare a data and metadata container for the Edge panel or feed in the manifest file.
    2. Specify the Edge panel / feed metadata.
    3. Specify the Edge panel / feed content and code in 1 or more RemoteViews (see Android documentation).
    4. Specify a receiver to process Edge broadcasts.
    5. Specify the management of Edge broadcasts.
    6. Update RemoteViews objects
  7. To implement an Edge Immersive Panel into an Edge-integrated app APK:

    1. Specify the panel content and code in 1 sub-view (see Android documentation)
    2. Specify the panel layout and content in a sub-content view.
    3. Identify the sub-content view for the panel (SubContentView).
       
  8. Add Edge layout resources for vertical and horizontal device orientation modes

 

Integrating Basic Edge Functionality 

This section describes Edge functionality that your app can integrate when implementing any Edge panel or feed.

 

Checking Device Support of Look Edge

To display your Edge panel or feed, a user's device must have a curved Edge screen on the right side or on  both right and left sides of the device. 

NOTE:  If the user's device has 2 curved Edges, the user can configure (via Edge settings) which side is to: activate and display Edge Single and Edge feeds, to activate and start the display of Edge Single Plus panels (which take up the entire display screen), and display Edge Immersive panels.

Your app can check whether a user's device supports either or both of 2 groups:

  • Edge Single Panels, Edge Single Plus Panels, and Edge Feeds
  • Edge Immersive Panels

 

Example Code: Initializing Look, Handling Exceptions, and Checking Device Support of Edge Single and Single Plus Panels, and Edge Feeds
Slook slook = new Slook(); 

try { 
    slook.initialize(this); 
} catch (SsdkUnsupportedException e) { 
    ...
    return; 
} 

if (slook.isFeatureEnabled(Slook.COCKTAIL_PANEL)) { 
    /* What to do when the device supports Edge Single and Single Plus panels, 
    and Edge feeds. */ 
    ...
} 

 

Example Code: Initializing Look, Handling Exceptions, and Checking Device Support of Edge Immersive Panels
Slook slook = new Slook(); 

try { 
    slook.initialize(this); 
} catch (SsdkUnsupportedException e) {
    ... 
    return; 
} 

if (slook.isFeatureEnabled(Slook.COCKTAIL_BAR)) { 
    /* What to do when the device supports Edge Immersive panels. */ 
    ...
}

 

Edge Panel and Feed Layout Resources

For all types of Edge panels and feeds, Android vertical layout resources must be specified to support the portrait device display mode.  To support displaying your Edge panels and feeds when the device is re-oriented to landscape mode, add horizontal layout resources.  Edge will then manage the proper display in each mode.

If horizontal layout resources are not added, vertical layout resources will be used when the device is in landscape mode, and your Edge panel or feed will not adjust when the device screen is re-oriented, which may result in unusual display (such as upside-down text). 

 

Example Code: Specifying Vertical  Layout Resources
/res/layout/sample_panel.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical" >

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="120dp"
    android:background="@android:color/holo_orange_light"
    android:orientation="vertical" />

 

Example Code: Specifying Horizontal Layout Resources
/res/layout-land/sample_panel.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal" >

<LinearLayout
    android:layout_width="120dp"
    android:layout_height="match_parent"
    android:background="@android:color/holo_orange_light"
    android:orientation="horizontal" /> 

 

Specifying Edge-Integrated Apps for the Galaxy Apps Store

When distributing your Edge app or Edge-integrated app via the Galaxy Apps store, your app will be available in the Edge Store section, and your app must specify a<metadata> element in the AndroidManifest.xml file that indicates your app is an Edge app:

  • For all types of Edge panels and feeds, specify an android:name of com.samsung.android.cocktail.mode
  • Specify an android:resource of the type of Edge panel or feed implemented:
    • For Edge Single Panels, specify edge_single 
    • For Edge Single Plus Panels, specify Edge_single_plus 
    • For Edge Feed Panels, specify edge_feeds 
    • For Edge Immersive Panels, specify edge_immersive 
Example Code: Specifying an Edge app for Galaxy Apps store distribution
/AndroidManifest.xml 

<meta-data
    android:name="com.samsung.android.cocktail.mode"
    android:value="edge_single_plus" />