Nov 30
Digg
Stumbleupon
Technorati
Delicious

Python on Symbian: Mobile app development made easy

We are pleased to announce the release of a new book - “Python on Symbian: Mobile app development made easy”! The book is available to purchase on Amazon.com and an online version of the book is available here.

Python on Symbian book cover

To put is simply and somewhat cliché, it’s a book written by the community, for the community. We have worked on it from summer 2009 until late October 2010.

Who is this book for?

If you want to develop powerful mobile apps with the minimum effort and learning curve, this is the book for you!
It’s intended for readers of all levels of experience, from beginners to advanced users of Python on Symbian. We don’t assume any knowledge of Python and we cover (almost) everything from basic Python concepts, such as variables, functions and classes, to advanced concepts like platform services and advanced network programming.

What is covered in the book?

It covers pretty much every domain you can use Python on Symbian (aka PyS60) in. We’ve done our best to explain how everything works so that anyone, no matter their experience (or lack thereof) as a programmer can learn how to develop mobile applications quickly and in a fun manner. By that I mean that there is even a chapter about the Python language which teaches you everything you need to know, from the very basics to advanced tricks. After that the reader is taught what tools to use and how to use them, and is taken through a different area in each chapter (from PIM to multimedia to location, everything is here). The material refers to Python on Symbian 2.0, but most of it also applies to earlier versions (1.4.x and such). We point out where it doesn’t.

Throughout the book you’ll find illustrations, screenshots and example code. It’s a book to boost your knowledge of mobile phone programming and make it fun!

The book has been added to the Forum Nokia list, which is a great honour for us, the people who worked on this project. We learned a whole lot while writing the book and it also proved to be a fun experience. We really hope we’ve managed to convey that fun and knowledge in a way that will make this book useful for people interested in Python.

More news about this project will likely come in the near future.

Ackowledgements

We would like to thank everyone associated with the project -
Co-authors: Marcelo Barros de Almeida, Mike Jipping and Hamish Willee
Technical reviewers - Aapo Rista, Christophe Berger, Herb Jellinek, Jouni Miettunen, Marcel Caraciolo and Rafael Szuminski
Editors -  Jo Stichbury, Satu Dahl and Tim Williams
Designers - Annabel Cooke and Anna Alfut

We would also like to acknowledge the help from Forum Nokia, Symbian Foundation, Jürgen Scheible, Mark Wilcox, TS Vijayan and PyS60 team during the project.

- On behalf of Bogdan Galiceanu and Pankaj Nathani


Author: Bogdan Galiceanu
Sep 08
Digg
Stumbleupon
Technorati
Delicious

OAuth, PyS60 and Twitter: now working !

Since August 31th Twitter is not supporting the old user/password authentication scheme anymore and I had to study how to use OAuth for authenticating Wordmobi users.

Basically, after registering your application at Twitter site you receive a key and a secret. Using these information, a special authentication URL is created and users need to type it in the browser and login using their twitter credentials. After logging in, a PIN number is generated by Twitter. Finally, an authentication token is generated using this PIN number and the key of your application. Further accesses may be performed only using this token and your application key.

There are other ways to use OAuth but the proposed method (PIN based) is suitable for PyS60 applications. In the current demo, a temporary page is created showing the target link and users need to click on it. Moreover, it is necessary to write down the presented PIN number. After closing the browser, this PIN number can be typed using a query dialog and the authentication token is saved for further accesses.

I just finished my first demo application, it is far from perfect but I would like to share this result with our readers. You need to install Python 2.0 for Symbian, ssl.sis and pips.sis, all included in the standard PyS60 distribution. Do not forget to type your key and secret at the end of demo.py file.

Enjoy ! Source code is here. I used Leah’s Python OAuth.

Redirecting to twitterLogging in TwitterPIN numberTyping PIN number


Author: Marcelo Barros
Aug 26
Digg
Stumbleupon
Technorati
Delicious

PySide applications on Qt Simulator

First, a few words about PySide. It allows developers to call Qt APIs using Python. Sound interesting? It should, especially for those who are not to keen on programming in C++. A great many features are available, even Qt Mobility APIs if you use PySide Mobility.

It turns out that PySide and the Qt Simulator get along well. Anderson Lizardo explains how PySide applications can be run on the Qt Simulator in his blog post. Very interesting stuff.


Author: Bogdan Galiceanu
Aug 26
Digg
Stumbleupon
Technorati
Delicious

Python Workshop/BOF at SEE 2010

The folks at Symban Foundation are calling for Python enthusiastics at SEE 2010!

If there are enough number of people expressing interest in Python, there might be a Python workshop or BOF session at SEE this time.

I’m polling for interest in attending a Birds-of-a-feather session or workshop on Python on Symbian (PyS60) at SEE.

As you may know, we’ll have got a printed version of http://developer.symbian.org/wiki/in…hon_on_Symbian by then, and I think it would be a good opportunity to talk about developer experiences with PyS60, what they like/don’t like, what needs to be done to improve it further as a commercial option. And of course to see who would like to help.

If there is sufficient interest, we could even have a brief workshop covering some aspect of Python on Symbian - something a bit more challenging than helloworld.

Register your interest by posting in this discussion thread.

About SEE (Symbian Exchange and Exposition)

Just as Symbian has broadened its mission to driving innovation throughout the mobile space, we are also redefining the landscape of our annual event to engage and inspire the brightest and most enthusiastic minds in the industry. SEE 2010 is not a tradeshow—it is a place for the wider community to come together, make cross-industry connections, conduct conversation, share ideas, educate each other and realize some of the vast possibilities that exist in the market.

Register for SEE 2010


Author: Pankaj Nathani
Jun 23
Digg
Stumbleupon
Technorati
Delicious

Hot news from Ovi, Nokia

Today Ovi team published an article that talks about its latest offerings,

•    Public beta of Nokia signing Symbian apps for free
•    Availability of Nokia Qt SDK 1.0
•    Availability of Nokia Smart Installer for Symbian
•    Ovi Store intake for Qt apps

You can read more about this news here. I think the first item of this bulletin is the highlight exploiting which developers can obviate the Symbian-signing costs.

________________________________________________________________________________

Also available for download


Author: Manikantan
May 28
Digg
Stumbleupon
Technorati
Delicious

Some Ovi Stats

My publishing title Chompgames, has been doing quite well at the Ovi store. There are totally four applications under Chompgames umbrella.

Bollywoodie is only 1 week old and has got enormous attention at the store. Thanks to the fanatic Indian cinema lovers. It got a total of 1200 downloads the first 2 days and has been (unexpectedly) downloaded most by Turkey, Mexico and Italy and then India. Does this attest that Indian movies have a greater market abroad ? :)

King Khan is an application to follow the Indian superstar ShahRukh Khan from your mobile. You can read news about him and follow his tweets


Author: Manikantan
May 20
Digg
Stumbleupon
Technorati
Delicious

New FN article on longPress touch interaction

This is an article that I have always had in my mind. It is a tutorial on how to use and detect LongPress on touch based phones. In this article, I talk about the design issues, UI considerations and challenges associated with the longPress gesture.

A simple Flash Lite 2.0 code example has also been attached.


Author: Manikantan
May 20
Digg
Stumbleupon
Technorati
Delicious

N8, FL4, Cs5 and the possibilities

The last few months have been very tight schedules for me and left quite a few announcements unrelayed. Nokia launched its first Symbian 3 phone N8. Boasting as the first 12 Megapixel camera embedded, multi-touch supporting device, I think it is one more step forward in bringing greater digital experiences to the hand.

Quite in the same time, Adobe launched CS5 toolkit. This release is viewed as an important leap-ahead in creating homogeneous multi-platform experiences. CS5 facilitates the publishing of Flash content in Flash Player 10.1 versions and in Flash Lite 4. This means AS3 is a viable programming platform for the smartphones. In addition, Device Central CS5 provides ways to emulate physical changes like orientation and provides API to access accelerometer, location etc.

The Nokia N8 is the first Nokia devices to be shipped with Flash Lite 4.0 (Read more). And hence, coming to look of it, Flash developers in the Nokia circuit have new waters to test, experiment and develop with.

Thoughts -

  • With all the buzz surrounding Flash Player 10.1 on devices, Adobe has not quite spoken on Flash Lite 4.
  • Since we haven’t seen much on Nokia N8, Flash Lite 4’s performance is still unknown on it.
  • Earlier S60 phones like 5800, N97 etc had troubles accessing the lower device features like Accelerometer and other sensors. Though external packages were available, they were not found to be stable.
  • Will AIR come (at any delayed point in time) for Symbian devices (though very much in the roadmap) ? Since Flash Lite 4 has been ported for the Symbian 3 device, an AIR runtime shouldn’t take a long time is my personal opinion.

I recently published a desi web-app called Bollywoodie that fetches news, gossips and happenings in Bollywood. Also included are tweets from several superstars of Bollywood.


Author: Manikantan
Apr 03
Digg
Stumbleupon
Technorati
Delicious

Simple window manager for PyS60

Some days ago I was asked about a PyS60 application that should support several bodies but without using tabs. The idea was to create a dynamic menu with an option called “Switch to” from which the user could choose the desired body.

After some frustrated experiences I wrote the following code for this special “Window Manager”. It is very compact and Pythonic (at least in my opinion) and I decided to share it with our readers.

"""
Simple window manager for PyS60
Marcelo Barros de Almeida <marcelobarrosalmeida@gmail.com>
License: GPL3
"""
 
from appuifw import *
import e32
import copy
 
class Window(object):
    __lock = e32.Ao_lock()
    __windows = []
 
    def __init__(self,**kargs):
        self.__dict__.update(kargs)
        Window.__windows.append(self)
 
    def run():
        Window.__windows[0].switch()
        Window.__lock.wait()
    run = staticmethod(run)
 
    def switch(self):
        op = []
        for s in Window.__windows:
            if s != self:
                op.append((s.title,s.switch))
        cm = [(u"Switch to",tuple(op))]
        cm.append((u"Exit",Window.exit))                
        app.menu = self.menu + cm
        app.body = self.body
        app.title = self.title
 
    def exit():
        Window.__lock.signal()
    exit = staticmethod(exit)

The core of this window manager is the function switch, responsible to recreate the menu and to list all other bodies (except the current one). Using a static list of bodies and a test based on self, it is simple to do this task. Exit option is added at the end.

Each body is constructed just calling Window with, at least, body, title and menu parameters. It was used a nice trick based on dictionary updating (self.__dict__.update(kargs)) in order to add all parameters to the current object, avoiding additional tests or definitions. Of course you need to be careful when creating new bodies. Moreover, run and exit are static methods since they can be called from any place of your code.

Usage and screenshots:

# Example    
a = Window(title=u"Text editor",
           body=Text(u"Type here"),
           menu=[(u"Text 1",lambda:None),
                 (u"Text 2",lambda:None),
                 (u"Text 3",lambda:None)])
b = Window(title=u"Single list",
           body=Listbox([u"item"]),
           menu=[(u"Slist 1",lambda:None),
                 (u"Slist 2",lambda:None),
                 (u"Slist 3",lambda:None)])
c = Window(title=u"Dual list",
           body=Listbox([(u"item",u"item")]),
           menu=[(u"Dlist 1",lambda:None),
                 (u"Dlist 2",lambda:None),
                 (u"Dlist 3",lambda:None)])
 
Window.run()

screenshot0015

screenshot0016


Author: Marcelo Barros
Mar 31
Digg
Stumbleupon
Technorati
Delicious

Deep Days out on Ovi store

My game, Deep Days from Chompgames is now out on the Ovi Store as a free Flash game. Currently, the game is released in NFL format targeting the S40 phones. You can download the game from the Ovi Store, here.


Author: Manikantan