Namespaces
Variants
Actions

Create Flash Applications with Carbide.c++

Jump to: navigation, search
Article Metadata

Code Example
Compatibility
Platform(s): S60 3rd Edition, S60 5th Edition

Article
Created: Risalmin (09 Dec 2009)
Last edited: hamishwillee (27 Oct 2011)
Featured-article.png
03 Jan
2010

This article explains how to add a plugin for Carbide.c++ to quickly compile your Flash project into a Symbian installable application for S60 3rd edition and 5th edition Nokia Symbian devices. If you are interested in packaging into a WRT widget, see the article How to package Flash content in a Widget. If you want to package Flash for Series 40 phones, go and see this document about the NFL format.

Contents

Prerequisites

You need to have access to a computer with Windows operating system. If you already have a working Symbian SDK and Carbide.c++ IDE installed, you can skip to Step 1.

Download a Symbian SDK

The Symbian SDKs are free. You are only required to register as Nokia Developer member, which is also free.

  • Get S60 5th Edition here
  • Get S60 3rd Edition here

Download and read the release notes corresponding to your choice of the SDK.


From the release notes you will learn:

  • If you need to have installed some 3rd party software like ActivePerl and Java Runtime Environment (JRE).
  • Known issues (e.g. installation problems and known bugs or limitations)
Note.png
Note: If you have Windows Vista, read also Moving to Windows Vista.

Install the SDK

Once you are sure you have all the necessary pieces of the SDK puzzle, install the SDK on your PC.

Install Carbide.c++

Carbide.c++ is a free IDE from Nokia, you can download and install it from the link below

Creating and testing a Flash Stub app

Follow the steps below to create a Flash Stub application. Please note, that to be able to publish sis file in the Ovi Store you need to have a publisher account for the Ovi Store and to sign the sis file. More information about signing in the chapter Ready for Signing

Step 1. Add the Wizard template for Flash Stub

(only needed once)

  • Make sure Carbide.c++ is not running and closed.
  • Unzip and drop this .jar file to <installation path>/plugins (for example C:\Apps\Nokia\Carbide.c++ v2.0\plugins)

Step 2. Open Carbide and create a new stub

  • Start a new project (ctrl+N)
  • In Select Wizard dialog, select 'Symbian OS/Symbian OS C++ project
(Click Next)
  • In Select type of project dialog, select Flash stub application

NewStub.jpg

(Click Next)
  • Give a name to your project
(Click Next)
  • Select the SDK
Flash does not work in the emulator, select only Phone Release GCCE

SelectSDK.jpg

(Click Next)
  • Give your project’s UID, you author name and a Copyright, if desired
NOTE: For the first trial, you might wish to leave the Test UID there, since a “real” UID will not work for Self Signing

TypeUID.jpg

(Click Finish)

Step 3. Drop your own content in

DataFolder.jpg

  • Select the data folder under the project.
If you cannot see the Data folder, select Window\Open perspective\Other…\C/C++
  • Right Click on the folder and select Show in Explorer
  • Drop your SWF into this folder, rename it and replace the one in the folder (it’s a placeholder swf)
The name needs to be the same as the placeholder swf.
If you have more than one file, add the extra files your PKG file in the 'group folder

Step 5. Test the content

  • Select your project in the left pane
  • Press Ctrl+B to build the project
Wait for the build to finish

Build.jpg

  • Right click on the sis folder and select Show in Explorer
  • Send the *.sisx file to your device (sis=unsigned, sisx=self signed)
*.sis is an unsigned file, which cannot be installed anywhere. the 'x' in the end is not mandatory for signed files, it's for convenience only.
Emulators don’t support Flash, so you need to have a supported device
If you do not have a supported device check the Remote Device Access service
Note.png
Note: For S60 3rd Edition: The sis will compatible with both S60 5th and S60 3rd edition devices, but is if you are targeting a S60 3rd edition device, you cannot have the location capability in a self signed application. So in this case you need to edit the *.mmp file in the group folder and remove the location keyword at the end of the file.

Creating the actual application

Getting a UID

Now, if everything is OK, and you wish to make a commercial application, go and get a UID from Symbian Signed. Here too you need to create an account, but Symbian signed is also a free service. If you do not wish to make a commercial application, you can use the automatically generated UID, it's from a free range and can be used for testing and Self signed apps. But a commercial application needs a "proper" UID assigned to your company name.

Make a new Flash Stub project

(O.K. this is not absolutely necessary, you can of course find and replace each and every occurrence of the UID all over the project, but since the Wizard is so nice and easy to use, why not take advantage of it ;o)

  • Repeat steps 2 and 3

Step 6. Getting ready for delivery

RLSFile.jpg

  • Edit the content of qtn_caption_string in group\<projectname>.rls
This is used as your application title in the device
Make it as short as possible, there is not much room on the Applications menu
  • Drop a new SVG icon to “gfx” folder, remove the placeholder svg and give your icon the same name it had.
More information about creating SVG icons in: How to create application icon(SVG) in S60 3rd edition

Testing the final application

Now that you have your file in a commercial format you cannot self sign it anymore with a self signing key. In the previous steps Carbide was creating a self signing key for you, but since you are now using a proper UID you need to have the file properly signed. You can use the Open Signed Online tool for signing the sis for installation to a single device. For this you need to give your IMEI code. (press *#06# on the device).
Note.png
Note: Even though in the sis folder you still have both a self-signed .sisx and an unsigned .sis file, you cannot install either one of them to your phone, you need to have the .sis file open signed, the .sisx is useless at this point.

Ready for signing?

TIP

The following is only needed for signing with your Publisher ID: Instead of using the command line tools for signing and making the sis package, you need to use Carbide. A new key is added like this:

  • Right click on the project icon in Carbide
  • Select Properties
  • Select Carbide.c++ / Build configurations
  • In SIS builder tab select the configuration (you should have only one by now) and click Edit
Check Sign sis file with certificate/key pair
Browse and select the cer and key files you got from you pfx file.
Note.png
Note: IMPORTANT
You cannot install a sis package signed with your publisher ID, it's only meant for submitting to Symbian Signed.

To be able to install and submit to OVI Store, Go to Step by Step instructions to Express signing and follow the instructions there.

Feedback much appreciated!

Please use the Comment tab for feedback to the author.

Comments

Featured article, January 3rd 2010 (week 1)

If you have a Carbide C++ or Symbian SDK related issue, please use the discussion boards to get help

[Link to Discussion board]

Please ask anything, I'll try to reply in a timely manner ;o)

'"Q:"' is it possible to force landscape or portrait mode for the swf using this stub?

A: Since it only acts as a launcher, you have to do the tricks inside the SWF.


Q: Hey i did exactly as told in the tut. the app installs but it doesnt work. it jus opens and empty flash screen and closes :(

A: Did you use a swf of your own? Are you sure it a) Works in the device b) Is named correctly. It's case sensitive, so make sure that also the .swf extension is in the same case as the example


Q: Hi thanks for this great tutorial. However i want to know how to package a swf that has resource files with it (swf/txt etc). I didn't fins any examples of packaging a swf with its resource files into a sis using carbide yet.

A: You just need to add them to the same folder than the .swf and add corresponding lines to the .pkg file so they will be copied over. See how the .swf is copied in the .pkg file for reference.


TIP: There's a memory limitation when embedding Flash Lite content with Flash Stub. If you are getting the -6 "bad image error", you have to create your own Flash Lite launcher. This error happens with the Nokia 5530 without the Flash Lite software update. How to make Flash Launcher with Symbian C++

--Risalmin 12:47, 30 March 2010 (UTC)

This page was last modified on 27 October 2011, at 22:27.
307 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2012 All rights reserved