Skip to main content
Samsung Developer Program

Integrate Look Edge

This section provides development guidelines for integrating Look Edge functionality into either an Edge app (which implements an Edge Single Plus panel, Edge Single, 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 you are implementing.

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

  • The Edge Single Plus panel app, the Edge Single 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 with another app APK:

  • The Edge Single Plus panel app, Edge Single 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 deep linking 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 one APK:

  • The Edge Single Plus panel app, Edge Single 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 deep linking 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 deep linking 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 the 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 Plus panel, Edge Single, 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 one 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 one subview (see Android documentation)
    2. Specify the panel layout and content in a subcontent view.
    3. Identify the subcontent view for the panel (SubContentView).
  8. Add Edge layout resources for vertical and horizontal device orientation modes

Integrate Basic Edge Functionality 

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

Check 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 two curved Edges, the user can configure which side is to activate and start the display of Edge Single Plus panels (which take up the entire display screen), activate and display Edge Single and Edge feeds, and display Edge Immersive panels.

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

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

The following example code shows some handling exceptions, how to initialize Look, and how to check device support for Edge Single Plus panels, Edge Singles, 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. */ 
    ...
} 

The following example code shows some handling exceptions, how to initialize Look, and how to checking device support for 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 reoriented 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. Your Edge panel or feed will not adjust when the device screen is reoriented, which could result in odd displays, such as upside-down text. 

The following example code shows how to specify 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" />

The following example code shows how to specify 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" /> 

Specify 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 Plus Panels, specify Edge_single_plus
    • For Edge Single Panels, specify edge_single  
    • For Edge Feed Panels, specify edge_feeds 
    • For Edge Immersive Panels, specify edge_immersive 

The following example code shows how to specify an Edge App for Galaxy Apps Store distribution:

/AndroidManifest.xml 

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

 

 

  • Was this article helpful?