Skip to main content
Samsung Developer Program

Using the Edge Simulator

After a slight modification to your Edge apps, you can run them on the Edge Simulator to review your apps' UX features and functionality.

To develop your Edge apps using the Edge Simulator:

  1. Download the Edge SDK zip file by clicking the Edge (Look) SDK download icon in the webpage http://developer.samsung.com/galaxy/...edge-simulator

    The Libs directory contains the 2 JAR files to run your Edge apps on actual Edge devices.
    SDK_Libs_Directory.png

    The Tools directory contains the Edge Simulator directory that has all the necessary resources you need to run your Edge app on the Edge Simulator.SDK_EdgeSimulator_Directory.png
     
  2. Install and start the Edge Simulator app:
    1. Start up Android Studio (Eclipse).
    2. If not created yet, create a virtual device (with a 1440x2560 560dpi display and an Android Marshmallow (M) OS).
    3. Install the Edge Simulator app on the virtual device.
      From a file manager app, drag-and-drop the edge_simulator-[version].apk file into the virtual device screen.
    4. In the virtual device, launch the Edge Simulator app.
       

  3. If your Edge app has a ListView (your app uses a setRemoteAdapter command), grant permission for the Edge Simulator to get information from your Edge app's RemoteViewService.
    1. Specify the sharedUserId (bold text below) in the AndriodManifest.xml.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.edgescreen"
      android:sharedUserId="com.samsung.android.cocktailbar"
      android:versionCode="1"
      android:versionName="1.0" >
  1. Add the following metadata.
    1. Add the following widget_config.xml file to the XML directory.
res/xml/widge_config.xml                                                                    
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider
   xmlns:android="http://schemas.android.com/apk/res/android"    android:minWidth="100dp"
   android:minHeight="100dp" />
  1. In the receiver tag, specify the following receiver metadata code (bold text below) that identifies the widget_config.xml file.
<receiver android:name=".list.CocktailListAdapterProvider" >
   <meta-data
      android:name="android.appwidget.provider"
      android:resource="@xml/widget_config"/>
   <intent-filter>
      <action android:name="android.appwidget.action.APPWIDGET_UPDATE"/>
   </intent-filter>

   <intent-filter>
      <action android:name="com.samsung.android.cocktail.v2.action.COCKTAIL_UPDATE" />  
   </intent-filter>

   <meta-data
      android:name="com.samsung.android.cocktail.provider"
      android:resource="@xml/edge_single_list" />

</receiver>

 

  1. Enable your Edge app to run with the Edge Simulator app:
    1. Grant binding permission for your Edge app and the Edge Simulator to share data by entering the following command line in a terminal.
adb shellappwidgetgrantbind--packagecom.samsung.android.cocktailbar --user 0

Note:    If you delete the Edge Simulator and create it again in Android Studio, you must again grant binding permission before running your Edge app.
 

  1. In Android Studio (File > Project Structure > app > Signing), enter the Edge Simulator signing key:

    Edge_Simulator_Signing_Key_UI.png
  • Name: [Convenient name]
  • Key Alias: androiddebugkey
  • Key Password: android
  • Store File: [sim_test.jks Pathname]
  • Store Password: android
    Your Edge app may or may not require the store password to be specified. 
    However, we recommend that you specify it.
     
  1. In Android Studio (File > Project Structure > app > Dependencies), update Edge app dependencies.
    Edge_Simulator_JAR_File.png
  • Ensure that the edge_simulator_[version].jar file is listed.
  • Ensure that the Slook_[version].jar file is NOT listed.
    Put the Slook_[version].jar file in a convenient directory (such as the libs directory in your Edge app source code) for later use.
     
  1. Develop your Edge app(s), build your Edge app binary file, and run your app(s) in the Edge Simulator.
    1. Develop your Edge app.
      For details, see the documents in the SlookSDK_[version] / Doc directory.
    2. When your app is ready to be run in the Edge Simulator, build an Edge app binary file.
      Each Edge app binary file can contain a mix of 1 or more Edge panel apps and 1 or more Edge feed apps, up to 20 Edge panel and/or 20 Edge feed apps.
    3. Run your Edge apps.
  • In the Edge Simulator control screen, you can make up to 20 Edge panel apps panel and/or up to 20 Edge feed apps available for display.
  • In the Edge Simulator, you select a specific panel or feed and then review its UX and functionality.
  1. Click the Edge Simulator app icon.

    Edge_Simulator_Operations.png
     
  2. To run 1 or more Edge panel apps:
    1. In the Edge Simulator control screen:
      1. Click Panel.
      2. Checkmark your Edge panel apps that you want to make available.
      3. Click Play.
    2. In the Edge Simulator:
      1. To select an Edge panel, swipe-left or swipe-right.
      2. Test your Edge panel app's features and functionality.
         
  3. To run 1 or more Edge feed apps:
    1. In the Edge Simulator control screen.
      1. Click Feed.
      2. Checkmark your Edge feed apps that you want to make available.
      3. Click Play.
    2. In the Edge Simulator:
      1. To select an Edge feed, swipe-left or swipe-right.
      2. Test your Edge feed app's features and functionality.
         

The following are the most common issues that can be encountered when running your Edge apps, and how you can resolve them.

Issue:

 

Your Edge app displays the error text 'empty'.
This issue can only occur in the Edge Simulator, and not in actual Edge devices.

 

Resolution:  In your Edge app dependencies, ensure:

  • The Edge Simulator JAR file (edge_simulator_[version].jar) is listed.
  • The Edge JAR file (Slook_[version].jar) is not listed.
     

Issue:

Your Edge app screen is blank.
This issue can occur in the Edge Simulator and in actual Edge devices.

  Resolution:   Ensure that your Edge app's removeView is not empty.
 

Issue: 

Pending intents are sent to the wrong Edge app or your apps do not work properly.

The Edge Simulator identifies each SetOnLongClick request by the combination of package name and target view ID. If that combination is the same on more than one of your Edge panel or feed apps, it is possible that your Edge apps will not work properly (for example,  a  call from one of your Edge apps can result in the Edge Simulator sending the resulting pendingIntent to another of your Edge apps).

This issue can only occur in the Edge Simulator, and not in actual Edge devices.

  Resolution:    Ensure that each Edge panel and feed app combination of package name and target view ID is unique among all of your Edge apps.

 

 

 

 

 

  • Was this article helpful?