API Bridge – More Platform Services For Flash Lite & WRT

I just give API Bridge a try & thinks to share it with other developers. After Platform services API , it is a new tool which provides some other Platform Services. Btw, I like to write my article in form of questions .

What is API Bridge ?

API Bridges is actually a Symbian Server which provides http interface for communication between Server  (API Bridge) & Client (Flash Lite/WRT App). In short, it is a http server which enrich its clients (Flash Lite/WRT app) with different services like accessing camera & taking photos , uploading files , accessing call logs etc.

How a single API Bridge works for both Flash Lite & WRT ?

As we already discussed that API Bridge is actually a local http server. It provide services to all those clients which can send them http requests (ofcourse, only those requests which API Bridge accepts) .  Therefore , it will works for both Flash Lite & WRT .

How to get started with API Bridge for Flash Lite?

Just follow these steps :

1- Unlike Platform Services API, you have to install API Bridge sis package on your phone first . You can find the sis package inside the zip file provided here :

API Bridge

Just send the swf files to your phone and test them .If they are working fine then ur API Bridge is successfully installed.

2- Install the APIBridge sis package in your phone.

3- After installing APIBridge , now u r ready to go to test API Bridge samples. You can find API Bridge samples here :

APIBridge_FlashLiteCode.zip

4- For creating your own contents with Flash Lite API Bridge,  u need Action Script classes which can be found in the above zip file i.e inside a folder with name “si” .Just copy paste the “si” folder in Flash Library path or in the folder where u r saving ur fla file.

5- Just read this article for more details and a clear view of API Bridge :

http://wiki.forum.nokia.com/index.php/Flash_Lite_API_Bridge_Interface

How to distribute a Flash Lite content which uses API Bridge Services ?

Two ways to distribute these contents :

1 – I want to use Flash Lite Stub using Symbian C++ i.e Kuneri Lite, Online FN Packager , Adobe FL Packager etc

It is a very famous way of distributing Flash Lite contents (also known as swf to sis) . Lets follow steps to explain :

1 – Provide swf file to any of these tools and they give u sis file in return.

2 – Now, u can simply edit the sis file , embeds the API Bridge sis (which can be found inside this zip file  API Bridge ) and self signed it again (because once u modified sis u need to resign ur sis file) .

3 – To acheive step 2 , one can use SISContent , it is GUI application which makes packaging related tasks EASY.

4 – Open your sis file (obtained from any packaing tool) in SISContent . Click Tools>Edit . Click on Contents Icon > Add > Embed Package  & select API Bridge sis (keep the check mark on the statement “Install only when package doesnt exists)  and press ok.Now, Click Edit > sign > key pairs > add your own self signed certificate and sign ur sis . Now, goto file and save this modified sis.

Note : If u dont know how to make ur own self signed certificates .Just read the second last paragraph of this article :

How_to_sign_a_.Sis_file_with_Self-Sign_Certificate

BTW, it is very easy, you just need a makekeys.exe and u have to give command as described in the page .

5- Now , you are ready to distribute .

2 – I want to use Flash Lite Content Embeds into a WRT.

To distibute ur swf using WRT , just read this article :

How_to_Package_A_Flash_Lite_Application_that_uses_the_APIBridge

What is the default port of  API Bridge ?

Its Default Port is 9080 and u can find the port by looking at the text file placed in C:\\inovait\\apibridge\\port.txt (after installing API Bridge SIS).You can try a simple test to check it i.e use this actionscript in swf :

loadVariables(“http://127.0.0.1:9080/newfileservice?fileType=Image”, _root);

and u  will see camera application launched in phto shoot mode . However, u cannot change API Bridge port by editing the text file . :)

Where to read more :

http://wiki.forum.nokia.com/index.php/Flash_Lite_API_Bridge_Interface By Robert Burdick

- http://dalerankine.com/index.php/2009/11/new-nokia-apibridge-for-extending-flash-lite-applications-on-s60/ By Dale Rankine

- http://dalerankine.com/index.php/2009/12/new-training-video-accessing-the-camera-using-nokia-api-bridge/ By Dale Rankine

Wish u easy Flash Programming ……..

Best Regards,

Sajid Ali Anjum (SajiSoft)

SajiFS Launcher – Launch Flash Lite Contents in Full Screen

I got many emails regarding the issue that HOW TO LAUCH ANY SWF FILE IN FULL SCREEN FROM END USER SIDE? so, i just write this application in my free time for them. This application seems to be simple to end user and developers but it evolves some magic tricks :P which let u play swf files in full screen without editing the source of the swf file.As my previous projects, this is also an hybrid application between symbian c++ & flash lite. Take a look at further details :

Description :
FS Launcher is an end-user as well as developer freeware solution to play/test PC mouse based flash games in full screen with a close button without modifying the source of the game. It can launch the swf files in two resolution i.e streched & normal. It is developed using Symbian C++ & Flash Lite.
Preview :


Compatibility :
- Symbian 5th Edition phones only (FL 3.0)
How to get started with FS Launcher:
- Install the provided fslauncher sis file .
- Save your swf files to C:\data\others or e:\others (default direcotories for saving swf files)
- Open FS Launcher , browse saved swf files and play them.
Features :
- supports potrait and landscape mode.
- provide 2 resolutions for launching swf files i.e streched & normal.
- Symbian C++ and Flash Lite powered.
- Can browse only C:\data\others\ + subdirectories and E:\others\ + subdirectories.
- Easy to install and play with.
- Can launch many of Flash 8 PC games successfully.

Download :

- Just go to my website to download sis file of this application.

- You can try swf files available at this site .

Best Regards,

Sajid Ali Anjum (SajiSoft)

Issue – Flash Lite stub does not close on pressing red key (FIXED)

Issue

In few software versions of Nokia 5800, when u run a stub application developed using swfpack.com  (or may be other packaging tools) then it wont get closed on pressing red key. However, there is a work around posted by Risalmin in Forum Nokia .

Fix

Fix of this issue is quite easy i.e listen to red key event in Flash Lite and excecute the fscommand2 for quiting app. Use this AS code , to acheive the task  :

var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if(Key.getCode()=="endcall"){
fscommand2("Quit");
}
}
Key.addListener(keyListener);

 

Best Regards,

Sajid Ali Anjum (SajiSoft)

SWFxME 1.0 – Extend Flash Lite Using J2ME

I was working on a open source project from last 4 months.Today , i released this project under name “SWFxME “.It is designed for the developers who want to give more power to their applications using a hybrid application (Flash Lite + JavaME) .Here are few details :

SWFxME:
SWFxME is an open source project developed to extend Flash Lite with J2ME via HTTP server (written in J2ME code) and to provide more power to the developer by making a hybrid application.
The developers who want to know the difference between Jarpa and SWFxME? Then Jarpa is an XML Socket Server whereas SWFxME is a HTTP Server .Hence, SWFxME is more compatible (i.e from Flash Lite 1.1 to onwards) .

Compatibility :
The minimum requirements for SWFxME :
1 – Flash Lite 1.1
2 – MIDP 2.0
3 – JSR-75 (File Connection API) Support
It should have to work with a phone having these 3 characteristics provided that the platform doesnt
have any restrictions to write files, launching files or listening to a local port.

Built-In Functions :
Current version has 2 built-in functions :
1 – Write File
2 – List Directory

Samples , Documentaion & Source :
Every Thing is available on SWFxME Project Page

Tested :
Currently tested with S60 phones (E50, N78 & 5800) but i love to know about other phones like (S40 and SE etc)

Screenshots of the sample :

As this is the first release, i want other developers to test it on their devices and provide feedback .So, the next releases are much more compatible and samples for different platforms will be available .

Best Regards,

Sajid Ali Anjum

SajiOS v5 For S60 v3

SajiOS is one of my famous project as i worked on it alot. More then 10000+ downloads at the time of this post. Total time it take from first release to fifth release is about 8 months and i learned alot while programming this project.

                    SajiOS is a powerful shell designed for the people who are bored of one type of interface. It provides a number of features , Some ov them are as under :

- On first time run , it asks your username , usericon and password .Now, you

can protect SajiOS by your own password + set your own username & user

icon.

- Log-In Screen Added.

- Themes Feature Added. Now , you can custominize sajiOS with different

themes .I try to make when i gt free and upload it on my site

& try to post here too. BTW 3 themes included by default .

- A vista style sidebar is created with alpha transperancy + clock + calendar + media player + notification alerts for unread msgs , profile and misscalls..

- You Can Add Your Own Icons and Wallpapers..You can add 12 icons in SajiOS Fl 2 version .26+ common icons are included..

- You Can Make Calls by SajiOS Phone Pad..Just press * key at desktop and Phone Pad Appears..

- Icon manager is created . So , one can easily add icons on the desktop , submenu apps and startmenu shortcuts. As icon manager automatically detects installed apps and No need to remember the paths any more .

- Media Player In the sidebar with file manager to open files .

- A more flexible SajiOS control panel is added to change wallpaper/themes and different seetings.

- KeyPad lock feature added. Now, you can lock your keypad by holding * key in SajiOS .

- You can switch b/w profile silent/general by holding # key.

More features to reveal urself .

How to Install ??

Goto www.sajisoft.net.ms for installation files..

Hope u like it..

Note : The application is freeware but not open source yet (May be open source in future to help developers ).

Best Regards,

Sajid Ali Anjum (a.k.a SajiSoft)

Posted in SajiOS. 2 Comments »

Sajid Ali Anjum (a.k.a SajiSoft) starts blogging… :)

At last, i make my mind to start writing blogs myself and share my knowledge with others. I will try to share all my new experiences and the projects i develop during my mobile programming journey. Keep me alive on my blog by your feedbacks :) . For those , who want to know who i am and what i do ? please, visit the about page of this blog :  About SajiSoft

Best Regards,
Sajid Ali Anjum