Manually installing apps
If you're not using the SDK (e.g. you don't have the right operating system), but still want to install apps on a Tizen developer device (as handed out at the Tizen conference), there is a manual method you can use.
This article explains this method, showing how to manually package and install an app using command line tools on Linux. (Note that it's likely you could follow a similar process on Windows if you don't want the whole SDK, e.g. using PuTTY and 7zip, though I'm not sure how/if USB networking works on Windows.)
If you want to read more generally about Tizen development, see the Tizen developer documentation.
NB I call the "Tizen developer device" a "phone" below, for brevity.
Packaging an app
Tizen apps are packaged according to the W3C widget packaging spec. The steps below explain how to manually create one of these packages, but for a real project you'd probably want to script it.
Write your app first. As a minimum, you need an HTML page. Make a new file called
index.htmlwith this HTML in it:
<!doctype html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Tizen test app</title> </head> <body> <p>Nominally a Tizen app...</p> </body> </html>
(See these docs for more information about the viewport meta element. We add it here so the application appears fullscreen.)
- Create a 128x128 pixel png for an icon. If you can't be bothered to make one yourself, generate a placeholder by visiting the URL http://placehold.it/180x180/icon.png in your browser. Then save the image as
icon.png, in the same directory as
index.html. This icon is optional, but having one makes it slightly easier to find your application on the Tizen home screen. And you'd want one in a real project.
config.xmlfile (which tells Tizen's web runtime how to install, display and run your app). It should look like this as a minimum:
<?xml version="1.0" encoding="UTF-8"?> <widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" version="2.0 Beta" viewmodes="fullscreen" id="http://mydomain/myapp"> <icon src="icon.png"/> <content src="index.html"/> <name>myapp</name> </widget>
Make a zip file with your app's files in it, but give the file a
.wgtsuffix. For example, you can do this from a command line in your app's directory (the one containing
config.xml) like this:
zip myapp.wgt config.xml index.html icon.png
The zip file's structure will look like this:
myapp.wgt index.html config.xml
Installing an app on the phone
The next bit involves making a USB network connection between your PC and the phone. I found instructions on Flashing to device, but I repeat them here for convenience:
- Turn the phone on.
- Connect the phone to your computer via a USB lead.
- On the phone's home screen, press the Settings icon; at the top of the settings screen, press All to show all settings. Then select USB utilities and check the USB debugging option. This enables the phone to act as a usbnet device.
- On the computer, configure the USB connection by entering the following:
sudo ifconfig usb0 192.168.129.4
- You should now be able to login to the device from the computer. On the computer (not the phone), use SSH from a command line like this:
Check that this works before you try to do the next step.
Once the ssh login works, you can copy the
.wgtfile to the device with scp:
scp <path to .wgt file> firstname.lastname@example.org:/opt/home/root
Now login to the device over SSH again:
You should be in the /opt/home/root directory, where you scp'd the file to.
- At the command prompt, install the widget with:
wrt-installer -i myapp.wgt
You should now see its icon on the home screen:
- Touching the icon should open it in the web runtime, like this:
If anything goes wrong, you can uninstall the app on the phone via Settings > All > Manage applications. Select the app from the list, then click on the Uninstall button.
You can also update an existing app from the command line with:
wrt-installer -iu myapp.wgt
(though if the app is running, you'll have to stop it to get the update to take).