Creating a new Tizen Project for Samsung TVs

The objective of this entry while basic covers an easy mistake to make. It is a mistake that I have made. I’ve got a new Samsung Series 6 TV and I tried to deploy a new project to it. Errors were encountered, frustration levels were raised, but eventually I encountered success.

The Samsung TVs are more locked down than some of the other Tizen devices that I’ve worked with. The more recent ones are more locked down than some of the previous ones. When things go wrong this is what you might see.




The TV I am using runs version 4 of the Tizen operating system. I make a new Tizen project and select to create the new project from the TV templates choosing Tizen 4 as the platform.

TizenNewProject

Attempts to debug the project created from this template fail. I get an error message stating:

Launching [your app name here] has encountered a problem
closed
   closed
     closed

The terminal output isn’t of much help.

Launching the Tizen application...
# If you want to see the detailed information,
# please set the logging level to DEBUG in Preferences and check the log file in 'C:\tizen-studio-data\ide\logs/ide-20191006_014055.log'.

[Initializing the launch environment...]
RDS: Off
Target information: UN43NU6900
Application information: Id(07DOxO8iKR.SystemInfo3), Package Name(07DOxO8iKR), Project Name([your app name here])
Unexpected stop progress...
(0.337 sec)

So what gives?  There are two ways to address this that are essentially two paths to the same destination. The manual solution involves editing a couple of configuration options in the files config.xml and .tproject.

The file .tproject is not visible in the Tizen IDE. But you can still open it through file -> open. This file is an XML file. There is an element named that has a sub-element . I changed the value here to tv-samsung-540. The other change in config.xml is on an element of the form . This needs to be changed to .

Why are these changes necessary? I don’t have full confirmation on this, but I believe it has to do with differences between a generic Tizen device and Samsung Tizen devices. At the time of this writing I know of no physical implementations of any non-Samsung TV Tizen devices. But it does exist as a specification.

The other solution would be performed at the creation of the project. When creating a new project do not select from the TV project templates. Instead select the Custom project templates. Within these templates there is a TV template subtype. If you choose this project type then you will start off with the configuration files mentioned above having the values that are needed.

As the Tizen operating system and the development environment are updated year to year more readers will read this entry after a new Tizen version has been released than before. It is likely that the exact values that you include here will be different than what I have used. You may need to update the values accordingly. But hopefully this will point you in the right direction.

Advertisements

Album Release Party: Nine

An associate and I have been attending some entertainment events lately that I wanted to write about. One was an album release party, the other was a gathering of SciFi book authors. I’ll be writing about the SciFi experience soon. But my associate has already written about his experience at the album release party.  The following was written by A. Harrison.

Album Release for Nine

thumbnail_image

I rode from Cobb County, GA to midtown to pick up my friend at his 8th street tower apartment. 27 minutes to his residence, the pick up was quick with no time wasted. We headed to the location on Crescent. I don’t know why I thought of another location on Cypress, I can see the building in my mind. Nonetheless, my friend corrected me and 1100 Crescent Ave NE, Traffik Kitchen and Cocktails was in sight, but wait, there’s a line, wrapped around the building from Crescent Ave. to the side street/12th street. We rode past the venue looking for parking. We decided to park in a secure garage at the brand new Moxy Atlanta Midtown Hotel. We took the elevator from the parking garage to the street level. The hotel was chic modern with full game room and bar instead of a traditional hotel lobby, but I digress. We exited the building to a cool and breezy night in Midtown Atlanta. Below 70 degrees feeling great.

Walking from the Moxy we were contemplating what would be our angle of approach to Traffik. Should we approach from 13th street to Crescent passing the front door of Traffik, properly scoping the front door, security and handlers? Or should we take Peachtree Walk NE to 12th street bringing up the rear of the line being very discreet? We decided on the latter. Walking through slight inclines and feeling that nice chilly breeze we were happy the cool weather in Atlanta had finally arrived.

Alas we arrived at the rear of the line. We quickly made a friend in line with a fellow Lil’Kim fan. We examined the other fans (BeeHive) and their attire. I must say we are a very calm, snappy when necessary, and good looking bunch of fans. We talked about how excited we were to be there and speculated what time they would start moving the line to let folks in. Tonight was Lil’Kim’s big night back in Smyrna at the Cobb Energy Center where the BET Hip Hop Awards was being filmed. Lil’Kim was the highlight of the evening as the “I Am Hip Hop” Icon Award recipient. Huge accomplishment at this point in her career. Over 21 years in the game and still producing music as a female rap artist is very commendable. Her career is longer than Missy “Misdemeanor” Elliot’s. After about 10 minutes in line I had my friend do a walk around to view the front of the line and see what was what. He came back reporting that there were two lines. The one that we were in and another for Press. With that information, maybe we did needed to approach passing the front of Traffik, as we were in fact Press as we registered our passes with our affiliating organizations. J2i Tech blog for me and CNA entertainment for my friend. So we switched lines.

thumbnail_image (1)

Once the doors opened, Press was being let in first and we had a smooth transition through security entering the building. I’m familiar with this location as I’ve had many Friday night outings here as it was formerly Truth lounge. Now, Traffik Kitchen and Cocktails, the set up was the same with the bar on the right, and many VIP areas on the left. The space was lit up with Lil’Kim album promotional material everywhere. Ice Sculptures of the album title (9)

with her name, life size posters of her album cover for fans to take pictures with. The entire bar has digital signage in the background of the liquor bottles. That digital signage was running a continuous loop of Lil’Kim albums, award show looks, fashion campaigns, etc throughout her career. You had to be there to feel the moment. Time passed by and the anticipation of Lil’Kim’s entrance was high.

The Clock struck 12:27am, on October 6, and Lil’Kim has arrived to her iconic song Queen *****, off her Debut album Hardcore……. “if peter piper pecked em, I bet you biggie bust em, he probably tried to F&^% em, I told him not to trust em….” the song plays to Kim being escorted to VIP walking up the steps to an area that is 3 VIP’s wide. She’s dressed in her acceptance speech outfit from the Hip Hop Awards show, fish-nets, with knee high boots, a custom diamond encrusted leotard and her hair is pink with finger waves and a ponytail. She instantly steps onto one of the couches in her heels and starts to dance between two couches as the crowd cheers her on. She is joined by the likes of Lil’Cease from Junior Mafia, Tiffany Foxx, Pretty Vee (Girls Cruise castmate), OT Genasis (featured on the album 9) later in the night, and many other knowns and unknowns in the music industry.

The DJ is playing old school hits as well as current music…..however we’re thirsting for a new track from album. See Track listing below.

  1. Pray for me(feat. Rick Ross & Music Soulchild)
  2. Bag
  3. Catch My Wave (feat. Rick The Kid)
  4. Go Awff
  5. Too Bad
  6. You Are Not Alone
  7. Found You(feat. O.T. Genasis and City Girls)
  8. Auto Blanco
  9. Jet Fuel

Finally, the DJ Plays a known track from the new album. We are familiar with the song because Kim’s Pre-Orders on iTunes and other platforms started October 4th. The song is “Pray for me” feat. Rick Ross and Music Soulchild. It’s a great opener for the album where Kim sings along with Music Soulchild. Kim describes this track as two songs in one as the beat changes when Rick Ross enters with his hard Mayback Music esq lyrics. Kim starts off the track with smooth slow rapping stressing the “pray for me” theme, before Rick Ross’s delivery on the new beat, Kim returns with a second part in the song rapping moreso and stressing her greatness and the haters who are needing to repent.

The DJ is playing regular music hyping the crowd as the night goes on until he announces he has another track from the album 9. He doesn’t say what song it is, but close listening reveals its 9’s second track “Bag”. At 1:04 AM, the beat sounds like a variation of piano keys, under water, under heavy synthesis as Kim rap/sings “People looking at me different, people looking at me funny……”. The crowd listens intensely as the pre-order didn’t allow for that track to be downloaded as it did with “Pray for me”. Before long the crowd recognizes and mouths along the hook “give me that bag, give me that bag!” when the hook reprises. Sounds like an instant hit and my friend is looking like what he would later

reveal that this is his favorite track of the album. After 3 minutes 5 seconds of the track, the DJ transitions into a classic P Diddy and the family track “All About the Benjamins”, saying “Since we talking about that bag”.

The next track off the album comes at 1:16am, and it’s the 5th cut off the album, “Too Bad”. This is a chill track as the beat comes in soft then heavy drums, as Kim starts off “I’ma really, really run through it, run through it….”, the crowd listens again. Kim is telling a story on this track but hearing it the first time I can’t pick up the story, it is captivating, nonetheless. Halfway through the track the DJ announces that OT Genasis has entered the building. The track continues to the end and the DJ transitions into Junior Mafias “Get Money”.

The next track the DJ Plays from “9” is “You are not alone”. At 1:30am, this track was hard to figure until Kim reminds you in the song “you are not alone” many times. She’s telling another story. If you are a hater leave her alone she pleads “Please leave my life alone, Please leave my life alone” singing with long runs and vibratos. If you haven’t realized already this is not Kim from 1996, this is 2019 New Kim and it’s a joy to hear her growth. The track plays for 2 minutes 13 seconds and transitions into Meg The Stallions “Cash ****”.

The night went on and my feet hit their limit in my brown dress shoes. The clock struck 2:01 am and I escorted my new friend and fellow Kim fan out of the venue to the street where we parted ways for our cars. I thoroughly enjoyed the night and have a confidence in this album I’ve never felt since I was in college during the late 90’s.

nine.jpg71nw7GPr4-L._SX522_

Windows 10 IoT Core Installer Blocked?

If you try to install Windows 10 IoT core from the installer chances are you wil get blocked with the following error.

Your administrator has blocked this application because it potentially poses 
a security risk to your computer."  and "Your security settings do not allow 
this application to be installed on your computer.

I ran into this recently when preparing a Raspberry Pi to run Windows 10 IoT Core. What gives? Well, that is due to a Windows Security Setting. The setting can be changed by editing the registry.  The registry key can be found at the following location

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\Security\TrustManager\PromptingLevel

The keys inside of this path contain one key named Internet that is set to Disabled. Change it to Enabled. Then you should be able to perform the installation and then change the key back.

Raspberry Pi Starter Kit

Available on Amazon for free at the time of this writing

Getting Ready for the Holiday Season with Phillips Hue and a Raspberry Pi

The holiday season is upon us; by the end of this month I expect to start seeing my neighbors put out their fall decorations. By mid-October decorations for Halloween will show up. After Halloween the decorations roll back to fall themed only and then are changed to Christmas decorations right after new years. Two of these holidays tend to come with flashy displays and lights: Halloween and Christmas.

porch

I primarily use Phillips Hue lighting throughout my house and it is a perfect companion for festive displays. The color bulbs are adaptable to any color scheme and the newly released Edison-style bulbs add a warm glow to fall scenes.  The Phillips Hue lighting sets are programmable if you are using a hub. While the new light bulbs have Bluetooth support to directly be controlled by a phone there’s not public API for them (yet). For programming a hub is needed.

pumpkin

I’ve written on controlling the Phillips Hue lights before. Expanding on that I wanted to make a project that would let an IoT device trigger a scene according to some external event. I’ll use a motion sensor to trigger the relevant events.

 

But you could also use sound, change in temperature, lighting, or time as sources. I’ll be using a Raspberry Pi; it has network connectivity and can be easily interfaced to a number of devices.  I’m using the Raspberry Pi zero but about any Pi will do. Hue does have available a motion sensor ; if one only wishes to control lights based on motion a solution is available. But if one wishes to have other triggers or trigger other actions along with the lights a custom solution is needed.

20191005_160504.jpg

The Raspberry Pi 4 with a heat sink attached.

20191005_161532.jpg

Raspberry Pi Zero with a 4-port USB hub

All that I want to happen is for the the lighting pattern to change when a person is detected. I’ll use a passive infrared sensor for presence detection.  For Halloween I want a Hue light that is illuminating a jack-o-lantern to pulsate an orange color. When someone comes up knock on the door I want the light for the front door to go bright white. A few moments after a person is no longer there I want the system to go back to it’s previous pattern. But past a certain hour I don’t want this to continue; after 10:00pm the lights should extinguish. Simple enough, right?

 

20191005_155936.jpg

This is the passive infrared sensor that I used.

The physical build for this circuit is easy. The Passive Infrared Sensor (PIR) will get power from the VCC and ground pins of the Raspberry Pi. The signal line from the PIR can be connected to any of the GPIO pins. I’m going to use pin 3. The circuit will need to be put in an enclosure to protect it from rain or humidity in general. If your enclosure doesn’t already have a weather protected way to get power in your options are to either run the Pi off of a battery that is within the enclosure  (that means periodic recharging) or drill a hole for the wires yourself and apply a sealant.

There are a lot of languages that I could use for writing my program on the Pi. Python, Java, and C/C++ make the top of the list (in no specific order). For this project I’ve decided to go with Java. To interact with the pins in Java we will need to import classes from com.pi4j.io and com.pi4j.wiringpi. These are not standard libraries; they exists to provide an interface to the pins. To demonstrate reading a pin in Java here is a simple program that will print text in a look that reflects the pin state.

import com.pi4j.io.*;
import com.pi4j.wiringpi.Gpio;
import com.pi4j.wiringpi.GpioUtil;

public class PinTest {
   public static void main(String args[]) throws InterruptedException {   
      final GpioController gpio = GpioFactory.getInstance();
      Gpio.pinMode (3, Gpio.INPUT) ;          
      while(true) {
         if (Gpio.digitalRead(3) == 0){
               System.out.println(The Pin is ON");
         }else{
            System.out.println("The Pin is OFF");
         }
      }
   }
}

Phillips has an SDK for Java. You might see it present as an SDK for Android, but it works fine in other Java environments. A convenience from this is that a significant portion of the development can be done on your computer of choice. I did most of the development on a Mac and used git to transfer it to the Raspberry Pi when done.

20191005_162433.jpg

The color Hue lighting can take on a variety of colors.

The overall execution loop of the program will check whether or not the trigger condition has occurred. If the trigger condition has occurred then the program will activate a scene. If not then it deactivates the scene. The program loop also contains some debouncing logic. Depending on the type of sensor used and the sensors characteristics a sensor could change states with ever cycle. I’ve chosen to only deactivate if a certain amount of time has passed since the last activation. For initial development instead of interfacing to an actual sensor I have a method that is returning a random Boolean value. When the code is moved to the Raspberry Pi this method will be updated to read the state of the actual sensor. The following will only deactivate after there have been 2 seconds with no activation event.

    boolean getActivationState() { 
        return random.nextBoolean();
    }

    void runLoop() throws InterruptedException{ 
        System.out.println("running");
        long lastActivation = System.currentTimeMillis();
        while(true) { 
            Thread.sleep(100);
            boolean isActivated = getActivationState();
            if(isActivated) {
                lastActivation = System.currentTimeMillis();
                activateScene();
            }
            else {
                long now = System.currentTimeMillis();
                if ((now - lastActivation)> 2000)
                    deactivateScene();
            }
        }
    }

Controlling the lights happens through the Hue SDK. Before activating the lights the Hue bridge must be discovered. While Hue makes a series of lights that have Bluetooth controllers built in and can be controlled without the Hue Bridge currently they only support APIs through the bridge. It is a required hardware component.

The SDK already contains functions for discovering the bridge. All that a developer needs to do is initiate a search and implement a callback object that will receive information on the bridges discovered. In the following I instantiate the Phillips Hue SDK object and register a listener.  If the program had been connected with a bridge before the IP address if that bridge is loaded and it reconnects to it. Otherwise the search is initiated. As the search occurs the earlier registered listener receives callbacks.

private void init() {
    this.loadSettings();
    System.out.println("Getting SDK instance");
    phHueSDK = PHHueSDK.create();
    System.out.println("Setting App Name");
    phHueSDK.setAppName("HolidayLights");
    phHueSDK.setDeviceName("RaspPi");
    System.out.println("SDK initialized");
    phHueSDK.getNotificationManager().registerSDKListener(listener);

    if(this.getLastIpAddress()  != null) {
        System.out.println("Connect to last access point");
        PHAccessPoint lastAccessPoint = new PHAccessPoint();
        lastAccessPoint.setIpAddress(getLastIpAddress());
        lastAccessPoint.setUsername(getUserName());
        if (!phHueSDK.isAccessPointConnected(lastAccessPoint)) {
            phHueSDK.connect(lastAccessPoint);
        }
    } else {
        System.out.println("Searching for access point");
        PHBridgeSearchManager sm = (PHBridgeSearchManager) phHueSDK.getSDKService(PHHueSDK.SEARCH_BRIDGE);
        // Start the UPNP Searching of local bridges.
        sm.search(true, true);
    }
}

The listener is of type PHSDKListener. I won’t show the full implementation here but will show some of the more relevant parts.

When the bridges are found they are returned as a list. I’ve only got one on my home network and so I connect to the first one seen. If you have more than one bridge you’ll need to implement your own logic for making a selection.

@Override
public void onAccessPointsFound(List accessPoint) {
    System.out.println("Access point found");
    if (accessPoint != null && accessPoint.size() > 0) {
        System.out.println("Number of access points: "+new Integer(accessPoint.size()).toString());
        phHueSDK.getAccessPointsFound().clear();
        phHueSDK.getAccessPointsFound().addAll(accessPoint);      
        phHueSDK.connect(accessPoint.get(0));       
    }
}

When the connect attempt is made it is necessary to press the pairing button on the bridge. The console will print a message from the SDK saying this.  Once the bridge is connected I save an instance of the bridge and the a

 

 

        @Override
        public void onBridgeConnected(PHBridge b, String username) {
            HolidayController.this.bridge = b;
            isBridgeConnected = true;
            System.out.println("on bridge connected...");
            phHueSDK.setSelectedBridge(b);
            phHueSDK.enableHeartbeat(b, PHHueSDK.HB_INTERVAL);
            phHueSDK.getLastHeartbeat().put(b.getResourceCache().getBridgeConfiguration() .getIpAddress(), System.currentTimeMillis());
            setLastIpAddress(b.getResourceCache().getBridgeConfiguration().getIpAddress());
            setUserName(username);
        }

After the bridge connects the SDK will query the state of the lights on the system and update some objects representing the last known state of each light. The first time the cache is updated the program prints the name of each light and the light’s identity. This information is useful for selecting which lights will be controlled.  The light list is saved for the program to use.

        @Override
        public void onCacheUpdated(List<Integer> arg0, PHBridge bridge) {
            if(!isDeviceListPrinted) {
                PHBridgeResourcesCache rc = bridge.getResourceCache();
                List<PHLight> lightList = rc.getAllLights();
                HolidayController.this.lightList = lightList;
                ListIterator<PHLight> it = lightList.listIterator();
                while(it.hasNext()) {
                    PHLight l = it.next();
                    System.out.println(l.getIdentifier() + "    " + l.getName());
                }
                isDeviceListPrinted = true;
            }
        }
With that in place we now have enough information to change the state of the lights. To test things out I started with implementations of activateScene and deactivateScene that will just turn all the Hue lights on and off (don’t do this if you have other people in your dwelling that this would affect).
void activateScene() {
    ListIterator<PHLight> it = lightList.listIterator();
    while(it.hasNext()) {
        PHLight l = it.next();
        System.out.println(l.getIdentifier() + "    " + l.getName());
        PHLightState state = l.getLastKnownLightState();
        state.setOn(true);
        state.setBrightness(254);
        float[] xy = PHUtilities.calculateXYFromRGB(
            0xFF & ((int)color>> 0x10), 
            0xFF & ((int)color >> (long)0x08), 
            0xFF & (int)color, l.getModelNumber());
        l.setLastKnownLightState(state);
    
        bridge.updateLightState(l.getIdentifier(), state,  NOPListener);
    }
    isDeviceListPrinted = true;
}

void deactivateScene() {
    ListIterator<PHLight> it = lightList.listIterator();
    while(it.hasNext()) {
        PHLight l = it.next();
        System.out.println(l.getIdentifier() + "    " + l.getName());
        PHLightState state = l.getLastKnownLightState();
        state.setOn(false);
        //state.setBrightness(254);
        l.setLastKnownLightState(state);
    
        this.bridge.updateLightState(l.getIdentifier(), state,  NOPListener);
    }
    isDeviceListPrinted = true;
}
If the program is run at this point the lights will turn on and off somewhat randomly. Ultimately we don’t want it to control all the lights. Instead I want to be able to specify the lights that it is going to control. I’ve made a JSON file file that contains a couple of elements. One is the RGB color that I want to use in the form of an integer, the other is an array of numbers where each number is an ID for the light to be controlled. The RGB color is specified here as a base 10 number instead of the normal base 16 that you may see used for RGB codes. Unfortunately JSON doesn’t support hexadecimal numbers 🙁.
{
    "lights":[5, 7, 9],
    "color": 16711935
}
These values are read by the code. Before the code acts on any light it checks to see if its identifier is in this array before continuing. During activation if the identifier is in the array the light’s state is set to on, brightness is set to full, and the color is applied. The color must be converted to the right color space before being applied to the light; something that is done with a utility function that the SDK provides.
void activateScene() {
    System.out.println("activating scene");
    ListIterator<PHLight> it = lightList.listIterator();
    while(it.hasNext()) {
        PHLight l = it.next();
        if(isTargetLight(l.getIdentifier())) {
            System.out.println(l.getIdentifier() + "    " + l.getName());
            PHLightState state = l.getLastKnownLightState();
            state.setOn(true);
            state.setBrightness(254);
            float[] xy = PHUtilities.calculateXYFromRGB(
                0xFF & ((int)color>> 0x10), 
                0xFF & ((int)color >> (long)0x08), 
                0xFF & (int)color, l.getModelNumber()
            );
            state.setX(xy[0]);
            state.setY(xy[1]);
            l.setLastKnownLightState(state);        
            bridge.updateLightState(l.getIdentifier(), state,  NOPListener);
        }
    }
}

void deactivateScene() {
    System.out.println("deactivating");
    ListIterator<PHLight> it = lightList.listIterator();
    while(it.hasNext()) {
        PHLight l = it.next();
        if(isTargetLight(l.getIdentifier())) {
        System.out.println(l.getIdentifier() + "    " + l.getName());
        PHLightState state = l.getLastKnownLightState();
        state.setOn(false);
        l.setLastKnownLightState(state);
    
        this.bridge.updateLightState(l.getIdentifier(), state,  NOPListener);
        }
    }
}
The last steps needed to make the device work as intended are to update the getActivationState() function to read the actual state of the motion sensor instead of a random value and wiring the motion sensor to a Raspberry Pi. From hereon the code is only going to work on a Raspberry Pi since the libraries for reading the pins are only applicable to this device. It is possible to dynamically load class libraries and use them as needed for the specific platform on which code is running. But information on doing that is beyond the scope of what I wish to discuss here.
I’m declaring a GpioController variable at the class level and am instantiating it in the constructor. I also set the mode of the IO pin that I’ll be using to  input.
    GpioController gpio;
    
    HolidayController() {
        gpio = GpioFactory.getInstance();
        Gpio.pinMode (3, Gpio.INPUT) ; 
        //....
     }
The getActivationState() implementation only needs to contain a single line.
boolean getActivationState() { 
   return Gpio.digitalRead(3);
}
With that change it will now work. If the Raspberry Pi is placed in a position where the motion sensor has a view of the space of interest then it will control the lights. If you are using one of the earlier Raspberry Pis (anything before the Raspberry Pi 4) you should be able to also power the Pi off of a portable phone charger; there are many that will make sufficient batteries for the Pi. The Raspberry Pi 4 has higher energy requirements and you may run into more challenges finding a portable power supply that works.
Why use the Pi at all for this? Because there is a lot of room to expand. Such as using the video capabilities of the pi to power a display or controlling other devices. Controlling the lights is a start. I’ll be revisiting this project for add-ons in the future.
If you want to start on something similar yourself the following (affiliate) links will take you to the products on Amazon.
Parts Lists

Developing for older Samsung TVs

If you already have a Samsung TV and want to start developing for it chances are you don’t have the latest and greatest model. But when you install the Tizen development tools they only target 2 operating system versions; the latest version that is out now and the version that is yet to be released in a year or so. Your TV is too old! So what can you do?

If you check the Tizen development forums the suggestion is to install an older version of the development tools. But that’s no fun! And it is possible to develop for the older TVs with the newer tools. Go ahead and install the latest versions of the Tizen development Studio first. While that is installing you will need to download an older version of the Extensions for TV. You can find them at this site. As you scroll through the available versions you will see that if you attempt to get a version older than the 3.0 version you can’t download it. Download the 3.1 or 4.0 extensions. Don’t worry, the  extensions also contain the components needed for TV’s running the 2.3 and 2.4 Tizen version.

tizen extension for tizen sdk

After Tizen Development Studio is installed open the package manager. In the upper right corner of the package manager is a gear icon. Select it.

 

packagemaker

Expand the “Extensions SDK” area of the window to see the extensions installed and click on the + button to add an extension. A window opens asking for a URL. Leave the URL blank and click on the three dots next to it. You’ll now be asked to navigate to a local archive of the extension you with to add. Navigate to the file that you downloaded earlier and select it.  The package manager will take a few moments to install the extension.

When you attempt to create a new project and look at the TV templates available there’s only the 4.0 and 5.0 projects. What gives? The missing project templates can be found under the Custom projects. Select “TV-Samsung v3.0.” Even if you have a TV running Tizen 2.3 this opeion will work. When you click the next button you’ll see the familiar project templates.

Listing Applications on a Tizen Device

In a Tizen project I was working on I found that Tizen Web alone wasn’t enough to help me accomplish my goal. For some of the functionality that I needed a native application would be needed (more on that in another blog post). Rather than completely write the application in native code I was going to use HTML for the UI and a native service for other functionality. This is a Tizen Hybrid application.

The Tizen documentation wasn’t quite clear to me on what identifier to use when trying to launch a service packaged with an HTML application. It mentions using the App ID. This didn’t work for me. I only figured out the right name to use when I tried listing all of the applications and services on the device.

Getting a list of the applications and services is done through tizen.application.getAppsInfo. This function takes as a parameter a callback. The call back is given a list of the applications installed on the device. For my purposes I was only interested in the id member of the objects that were passed back.

  

tizen.application.getAppsInfo(
    function onListInstalledApps(applications) {
        console.log("List of Applications:");
        applications.forEach(
          function(app) {
    		console.log(`  app.id: ${app.id}`);
        });
    });

Once I saw the output of this it was easy to identify the problem I encountered with launching the service.

Screen Shot 2019-05-24 at 10.38.17 AM
Output of app listing code

According to the Tizen documentation when launching a service the ID string used is composed of the package ID and the app ID of the service. The package ID can be found in the confix.xml for the web application.  In the following you can see the package ID is “IVFd9Or08P”.

Screen Shot 2019-05-24 at 4.34.54 PM

The app ID can be found in then tizen-manifest.xml for the service project.

Screen Shot 2019-05-24 at 4.37.53 PM

The app ID here is “org.sample.service.” If you look in the output from the code sample for listing installed applications you will see that the service shows up as IVFd9Or08P.testservice. It is using the entry from the “exec” field instead of the appid field. I’m not sure why the documentation points to the appid only. But I’m happy to have figured out this problem.