Updates from September, 2008 Toggle Comment Threads | Keyboard Shortcuts

  • pit 9:45 am on September 10, 2008 Permalink | Reply
    Tags: alessandro pace, , croozeus, felipe andrade, , forum nokia widget contribution competition, , janus, , , kunerilite tutorial, , pasi manninen, project capuchin, pys60   

    Back to work with: Capuchin, Jarpa, Widgets, KuneriLite, Janus, Croozeus.. just to start! 

    I’m finally back to work after some holidays (from some days already… but first work days right after holidays are always full of tasks, don’t you think?)

    Anyway, I came back just in time to find a lot of cool news!

    Jappit

    First of all, the database of this blog was not working anymore, and so, if someone of you has tried to post comments, would have most probably failed. Anyway, after a night of passion, it is newly working like a charm!

    For those of you who missed it (ahem…) Adobe held an interesting eSeminar about Project Capuchin, and the recording is available here: Project Capuchin Adobe eSeminar.

    Meanwhile, Felipe Andrade released an LBS enabled MIDlet that makes use of Jarpa to allow Java ME and Flash Lite to intercommunicate.

    On Forum Nokia, the Wiki was revamped with a new homepage layout, and with some cool introductions. One of them is the Featured Articles section, that will highlight an interesting Wiki article each week. And with great pleasure I noticed that 2 articles I’ve written were featured in past weeks:

    Also, a new contest was launched, this time regarding Widget Development, and full rules are available here: Forum Nokia Widget Contribution competition.

    You should know that I’m also a great fan of KuneriLite and its team, and so I can not avoid to feature Pasi Manninen tutorial on how to Take, play and send video file from Flash Lite to server: superb!

    Talking about FlashLite and Symbian, Leonardo Risuleo released his Janus Symbian Engine, the custom made extension that will help you improve Flash Lite functionalities, as open source! I definitely think this is great, and that there should be more high-quality open-source projects like this in mobile environment. In this sense, mobile is yet far from web development.

    Also, Croozeus is doing a great work with his website dedicated to S60 Python developers, and he recently completed the first 5 applications (with full source code). Also, if you want to fully understand and learn PyS60, you should not miss out his talks!

    And, latest fresh news, Alessandro Pace (a.k.a. Biskero) was yesterday declared Forum Nokia Chamption of the Month: congratulations goes to him for this award as for its incredible effort and results in the FlashLite community!

    That’s a (really) rapid summary of what I’ve missed on these holidays (but I’ve not missed this one!), and a lot of other things are still around… maybe should I work more? :)

     
    • Coker 3:37 pm on March 8, 2009 Permalink

      Hello,

      Please does Kunerilite work on Series 40 phones? Also what alternatives do we have for Sony Ericsson?

      Thanks

  • pit 1:39 pm on June 23, 2008 Permalink | Reply
    Tags: , , , sliding animations,   

    How to add sliding transitions between Canvas in J2ME 

    Today we’ll see a simple way to add sliding transition between Canvas in a Java ME application. Just take a look at it in the emulator page to see how it performs: Canvas sliding transitions in action!

    j2me canvas sliding transition screenshot

    The source code

    FxBaseCanvas

    First of all, we know that Canvas paint() method is protected, so, to access it from the class we’ll build, we must extend its visibility by extending Canvas class itself. We’ll do it by defining our FxBaseClass in this simple way:

    import javax.microedition.lcdui.Canvas;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.Canvas;
    import javax.microedition.lcdui.Graphics;
     
    public class FxBaseCanvas extends Canvas
    {
    	public void paint(Graphics g)
    	{
    	}
    }

    CanvasSlideFx

    Now, we start building our CanvasSlideFx class, that will extend Canvas itself. We start defining some useful properties:

    // time related properties
    long startTime = 0;
    long duration = 0;
     
    // current state of the transition
    boolean running = false;
     
    // direction of sliding
    int direction = LEFT;
     
    // the previous and next Canvas instances
    FxBaseCanvas fromCanvas = null;
    FxBaseCanvas toCanvas = null;
     
    // the current Display object
    Display display = null;
     
    // properties used to correctly place the 2 Canvas
    int deltaX = 0;
    int deltaY = 0;

    Now, we define our class constructor, that will initialize coordinate properties according to the specified transition direction. The detailed argument list is:

    • The current Display object, that will be used to retrieve the current displayed Canvas, and to set the next one
    • The destination Canvas, that will extend the previously defined FxBaseCanvas class
    • The transition direction (one of Canvas.UP, RIGHT, DOWN or LEFT)
    • The transition duration, in milliseconds
    public CanvasSlideFx(Display display, FxBaseCanvas toCanvas, int direction, long duration)
    {
    	this.display = display;
    	this.fromCanvas = (FxBaseCanvas)display.getCurrent();
    	this.toCanvas = toCanvas;
    	this.direction = direction;
    	this.duration = duration;
     
    	switch(direction)
    	{
    	case UP:
    		deltaY = - getHeight(); break;
    	case RIGHT:
    		deltaX = getWidth(); break;
    	case DOWN:
    		deltaY = getHeight(); break;
    	case LEFT:
    		deltaX = - getWidth(); break;
    	}
    }

    Now, we define a startTransition() method, that will actually start the animation. To implement the animation itself, we let our class implement Runnable.

    void startTransition()
    {
    	this.startTime = System.currentTimeMillis();
     
    	running = true;
     
    	new Thread(this).start();
    }

    And here’s the run() method implementation, that we must implement from Runnable interface. As long as the animation is running, we will repaint our animated Canvas, with a given interval of 50 milliseconds (but you can freely change this). When it finishes (so, running is false), we will exit the main loop and set the current Displayable to our toCanvas.

    public void run()
    {
    	try
    	{
    		while(running)
    		{
    			repaint();
     
    			synchronized(this)
    			{
    				wait(50L);
    			}
    		}
    	}
    	catch(Exception e)
    	{
    		e.printStackTrace();
    	}
    	display.setCurrent(toCanvas);
    }

    Finally, we have our paint() method, that will actually paint our transition. It will do this by painting both the source and the destination Canvas, translating them according to the transition direction, and to the elapsed time.

    protected void paint(Graphics g)
    {
    	if(!running)
    		startTransition();
     
    	long diff = System.currentTimeMillis() - startTime;
     
    	if(diff >= duration)
    	{
    		running = false;
     
    		diff = duration;
    	}
     
    	int perc = (int)(100 * diff / duration);
     
    	int dx = deltaX * perc / 100;
    	int dy = deltaY * perc / 100;
     
    	g.translate(dx, dy);
     
    	fromCanvas.paint(g);
     
    	g.translate(- deltaX, - deltaY);
     
    	toCanvas.paint(g);
     
    	g.translate(deltaX - dx, deltaY - dy);
    }

    How to use it?

    Now we’ll see how to integrate the CanvasSlideFx within an existing code that already uses Canvas.
    So, let’s assume that our application currently has, somewhere in its code, these lines:

    MyCanvas firstCanvas = new MyCanvas();
     
    Display.getDisplay(myMidlet).setCurrent(firstCanvas);
    ...
    //and somewhere else
    MyOtherCanvas secondCanvas = new MyOtherCanvas();
     
    Display.getDisplay(myMidlet).setCurrent(secondCanvas);

    where MyCanvas and MyOtherCanvas will likely extend Canvas.

    Now here are the required steps to integrate transitions in our code:

    1. First of all, we must make MyCanvas and MyOtherCanvas extend FxBaseCanvas instead of directly Canvas. So, we’ll have:
      public class MyCanvas extend FxBaseCanvas ...
    2. Then, let’s say we want to animate the transition between firstCanvas and secondCanvas, we will remove the code:
      Display.getDisplay(myMidlet).setCurrent(secondCanvas);

      and replace it with:

      CanvasSlideFx fxCanvas = new CanvasSlideFx(
      	Display.getDisplay(myMidlet),
      	secondCanvas,
      	Canvas.LEFT,
      	500L
      );
       
      Display.getDisplay(myMidlet).setCurrent(fxCanvas);
    3. and we’ve done it! :)

    Resources and download

    You can download the code explained in this article with the following links:

     
  • pit 2:20 pm on May 20, 2008 Permalink | Reply
    Tags: , integration, , mobile development   

    Random thoughts after 2 months on KuneriLite 

    Yesterday I’ve finished 2 projects developed using FlashLite 3.0 in conjunction with KuneriLite. Now, it’s time for some considerations.

    About FlashLite

    FlashLite Gallery screenshot

    My opinion: FlashLite is far from being a mature platform for mobile development. Why?

    No access to native phone functionalities.

    This means no GPS, no data storage (apart from text), no video/audio capture, and much more. Since one of mobile apps strengths is in its integration with the device itself, this sounds like a big limitation (but someway it’s something like first J2ME years). This could be due to a different perspective and target users/developers, but having a powerful platform like Flash being limited to casual games or screensavers looks a bit odd to me.

    Odd, senseless behavior.

    What happens if you try to load more that 5 resources together? They won’t load, simple.

    Or want to quit your application? You can, but at conditions: user must press some key for quit to work and, even if he does, there’s the chance that the app simply won’t close.

    And if a network or local resource, for example loaded via LoadVars, is not available? You’ll have a terrible popup telling the user that he has a “Problem with content: -6″, or other similar, anti-usability things.

    Security encounters insanity.

    Since FlashLite 3.0, there was a nice introduction, with the new player Security settings. About this there are good articles from Ugur and chall3ng3r that point out this has caused problems in having, for example, an application loading both local and remote resources. Fortunately, there are workarounds that allow to overcome some of the limitations involved in this (like using the notorious “Trusted” folder), but we’re still far from painless development :)

    Good news under the sun.

    Bill Perry from Adobe posted back, few days after the posts from Ugur and chall3ng3r, with the news that Adobe is working to solve some of the issues pointed out, and this is absolutely a welcome kind of feedback from Adobe team!

    About KuneriLite

    KuneriLite Wizard screenshot

    Install, plug, use.

    When you must merge 2 technologies to overcome their own limitations, it’s already a pain. So, when you do it, you want simple, immediate tools, that would make your work easier, not harder. With KuneriLite you have exacly this: an easy-to-use, understand and test tool. You have an intuitive Wizard that will allow you to create, setup and SIS package all your apps, and an emulator for easy testing and debugging. This IS what we want!

    Support matters!

    Briefly said: KuneriLite team is fantastic! Having worked with their product for more than 2 months, I can say to be more than happy for their help and support. You can find all the infos you want on their forums an Wiki pages.

    Yes, but what?

    Ok, maybe you don’t know what KuneriLite is, so here’s a brief introduction: KuneriLite is a tool that allows you to access Symbian native functionalities from your FlashLite application. They (your FlashLite app and KuneriLite) will interact via simple HTTP requests, and results are returned in the classical form of key/value pairs. So said, integration with your app will be quite straightforward.

    Past, present and future.

    Mobile Development is currently undergoing a lot of changes, merging and shuffles.

    FlashLite seems to be trying to find his way by merging with other technologies, from Java (see Jarpa) to Python (FlyerFramework) to Symbian C++ (KuneriLite, Janus, and others) and, why not, Web Runtime. Far from having a definite solution, there’s a lot to see and experiment.

    And we’re here to do it :)

     
  • pit 12:00 pm on April 28, 2008 Permalink | Reply
    Tags: , , ,   

    New KuneriLite version with cool improvements 

    KuneriLite is a great tool to extend FlashLite functionalities adding support for native features like local filesystem read/write, camera recording, accelerometer capabilities and much more. All these without the need to have any Symbian knowledge.

    Practically, you interact with KuneriLite engine via localhost calls. For example, if you want to get recursive folder listing starting from current application base path, you can simply do:

    loadVariables("http://127.0.0.1:1001/Basic/file?
    klCommand=dir&klPath=\\&klArgs=/s", targetMc);

    Their tool comes with an integrated wizard and an emulator, to be used with Symbian S60 3rd edition SDK Maintenance Release, to allow full development without the need of a real device.

    KuneriLite logo

    Now they’ve just released 0.9.6.1 version, that fixes issues with Flash Lite 3 and add new cool features, as you can read on their blog, and it’s more than ever worth a try!

     
    • Ugur 2:30 pm on April 28, 2008 Permalink

      Thanks for the post Pit! Great to hear you like it :)

  • pit 4:11 pm on April 16, 2008 Permalink | Reply
    Tags: , , , ,   

    AnimaLogic: S60 Web Runtime game 

    I’ve got some fun with my friend Fabio in creating a first game for Nokia Web Runtime.

    Since Web Runtime allows building mobile applications with classic web technologies, we’ve used nothing more that html, css and plain-old-good javascript… isn’t it great? :D

    Animalogic Web Runtime game

    It’s a very first alpha release with not too much functionalities (local hi-scores and a single game mode), but feel free to take a try :)

    The main interface was done using classical <a> elements to represent the menu options, but this has 2 important drawbacks, as you can see:

    • links (like also input fields and other focusable elements) when focused are surrounded by a thick border: not really beautiful..
    • managing of focus itself, between different screens, is not easy, so it happens that focus sometimes disappears, or starts from the last menu options, or other odd things.

    Next release will try to solve those and other issues… meanwhile, we’ll be happy of any kind of feedback about it :)

    Download Web Runtime AnimaLogic

     
    • Java Mobile Gaming 9:38 am on April 24, 2008 Permalink

      I found your site on faves.com bookmarking site.. I like it ..gave it a fave for you..ill be checking back later

  • pit 9:37 am on April 9, 2008 Permalink | Reply
    Tags: advert, , paint   

    KuneriLite: Nokia N95 advert with Microsoft Paint, cool! 

    KuneriLite is a superb tool to build rich applications on Symbian S60 phones using FlashLite, allowing to access native phone funcionalities that would be otherwise unaccessible. I’m currently developing some apps with it, and I’ll post more on this later.

    By now, just take a look at how cool is this advert made by KuneriLite team, using Microsoft Paint.. I think it’s terrific!

    It’s absolutely worth a Digg!

    Edit: you can use also this new Digg link

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel