Showing posts with label developer. Show all posts
Showing posts with label developer. Show all posts

Friday, November 28, 2008

Python Library for Japanese Mobile Devices

geomobilejp 0.1.0 is a Python library for handling GPS information of Japanese mobile devices, such as DoCoMo's iArea.

Requirements:

Perl

Friday, September 29, 2006

New S60 and UIQ Application Site


Symtopia.com is a new site that from Simon Judge which lists S60 3rd Edition and UIQ 3.0 (Symbian 9.1) applications. All applications are native C++ with no Java listings.
If you are a developer you can have your application listed on the website with an easy one click Add Link button located on the site.
There are a whole lot of freeware applications all searchable by category.

In Simon's words these are the main reasons he put up Symtopia:

Here are my general impressions having visited the various developer web sites, forums and existing (mainly Handango-based) directories…

The 80/20 principle seems to apply. There are a few developers producing large numbers of titles. Prior to Symbian 9.1 there were many more developers each producing fewer titles. Maybe the developers producing the large number of titles were those who previously made a good profit pre- Symbian 9.1.

There is approximately three times as many S60 applications as UIQ applications. This might be explained by the fact that UIQ 3.0 devices and SDKs trailed S60 by about a month. However, I still can’t envisage the number of UIQ 3.0 reaching the same as S60 (now) in a months time.

There’s evidence of developers stalling during development (e.g. FExplorer, Papyrus, Blackballer) due to complexities of platform security.

There are some instances of end-users automatically assuming older (pre-Symbian 9.1) software will run on Symbian 9.1 devices leading to consumer frustration.

Wednesday, September 20, 2006

Flash Lite takes on Java and C++


Flash Lite adoption is growing at a very rapid rate. It is most probably because it is so easy to code for and there are so many Flash designers/developers out there today that have now found a new media outlet - mobile phone users.
So watch out Symbian (C++) and Java Micro Edition (JavaME,J2ME) you have a new contender in the arena.

Friday, September 08, 2006

Running EXE file on the S60 2nd Edition


Use this code for the 2nd edition. Note that the first half of the if statement is just so that the code works on the emulator. This is because the emulator uses a Dynamic Link Library (DLL), therefore we need to employ library functions. However the overall outcome is the same.


TRequestStatus start;
TServerStart starter(start);

#ifdef __WINS__ // On the Windows emulator the process is a DLL
RLibrary lib;
lib.Load(KBinaryName, BinaryUid);
TLibraryFunction export1 = lib.Lookup(1);
TThreadFunction threadFunction = reinterpret_cast (export1());
TName name(KBinaryName);
// Randomness ensures a unique thread name
name.AppendNum(Math::Random(), EHex);

// Now create the server thread
const TInt KMinHeapSize=0x1000;
const TInt KMaxHeapSize=0x1000000;
RThread thread;
thread.Create(name, threadFunction, KDefaultStackSize,
&starter, &lib, NULL,KMinHeapSize, KMaxHeapSize, EOwnerProcess);
lib.Close();
#else // Phone hardware
RProcess process;
process.Create(KBinaryName,starter.AsCommand(), BinaryUid);
#endif

Running EXE file on S60 3rd Edition

This code only works on S60 3rd Edition.
You can use it to invoke an executable from with your application. Make sure you cleanup after yourself and don't leave any rouge applications running in the background.


RProcess server;
server.Create(KServerName, KNullDesC);

CApaCommandLine* commandLine = CApaCommandLine::NewL();
commandLine->SetExecutableNameL(KExecutableName);
commandLine->SetProcessEnvironmentL(server);

RApaLsSession ApaSession;
ApaSession.Connect();
ApaSession.StartApp(*commandLine);
ApaSession.Close();

delete commandLine;

Sunday, September 03, 2006

Flash Lite and Nokia S60 3rd edition Applications


A new easy way to create Flash Lite applications with hardly having any coding knowledge. Take a look at this article posted on AllAboutSymbian. It explains the proces in detail and shows you how to self-sign a Symbian Nokia S60 3rd edition application in the process. An easy alternative and a must read for Flash Lite Developers.

Monday, August 28, 2006

SIS Info tool for Symbian 9.1 SIS files

A new python utility to get information from a Symbian 3rd edition SIS file accoding to the new format (.sisx).

Wednesday, August 16, 2006

Linux phone by Trolltech in September




Troltech is promising to ship out what they call the "Greenphone" a GSM/GPRS mobile phone in September this year with a user modifiable Linux OS.
The phone will allow the users to re-flash the phone firmware via a mini-USB cable port.

The phone will be available with the software development kit.

A great new phone with all the benefits of the Linux operating
system.
Start porting your applications to run on Linux and Qtopia Phone Edition !

Tuesday, August 08, 2006

Nokia E70 RAM usage Table - S60 3rd Edition - Multitasking Considerations


In addition to this list any J2ME application requires Java which will add an additional 6MB plus the applications resourses.



S60 3rd Edition Application Minimum RAM usage
(including helper
processes)
Calendar 0.2MB
Contacts0.3MB
Zip manager0.4MB
Handy Safe
(3rd party secure,
synced database)
0.4MB
Log0.5MB
Clock 0.5MB
Notes 0.6MB
File manager0.9MB
Messaging1.1MB
Magi-Lines
(3rd party strategy puzzle)
1.2MB
Document (Eseries)1.5MB
Camera (on E70)1.5MB
WorldMate
(3rd party time
/weather/
currency tool)
1.8MB
Music Player1.9MB
Sheet (Eseries)1.9MB
Gallery2.0MB
Everything below is probably on the 'Exit after using it' list!
RealPlayer2.3MB
Flash Player2.3MB
Mobipocket Reader
(3rd party ebook reader)
2.6MB
Camera (on N93)3.5MB
Services3.8MB
Wayfinder
(3rd party
sat-nav solution)
5.5MB
Opera Mini
(3rd party
Java-based browser)
7.7MB
Web7.5MB to 10MB,
depending on
the pages being
viewed
Navicore
(3rd party
sat-nav solution)
9.5MB

Wednesday, July 19, 2006

Flash Lite 1.1 : Mobile Application Development Courses


If you are interested in Flash Lite 1.1 courses to learn Flash Lite 1.1 and to be able to become a Certified Flash Lite 1.1 (here preparation docs) developer here is the curriculum for the official course from Adobe: “ Flash Lite 1.1: Mobile Application Development provides students the knowledge and hands-on practice they need to produce and deliver high-quality animations, interfaces, games and applications specifically designed to take advantage of mobile device capabilities.”

Also Moket is holding two course sessions, here more details:

  • BRISBANE - July 25-27
  • MELBOURNE - August 22-24

“Are you a mobile developer and interested in learning how to create mobile content in Flash Lite 1.1? Moket has Certified Adobe Instructors who are able to deliver the Flash Lite 1.1 for Mobile Application Development courseware training throughout Australia.”

Monday, July 17, 2006

UrlEncoder for J2ME

A poor mans UrlEncoder for MIDP(J2ME) which can easily be extended by adding
more items to switch statement in the urlEncode method.

/*
* (C) Serkan Azmi. 2001
* All rights reserved
* The material(s) may be used and/or copied only with the written permission
* of Serkan Azmi. or in accordance with the terms and
* conditions stipulated in any agreement/contract under which
* the material(s) have been supplied.
*/




public class UrlParamEncoder {

String szUrlParam = null;

public UrlParamEncoder() {
}

private void prepAdd() {
if (szUrlParam == null) {
szUrlParam = new String();
}
else {
szUrlParam += "&";
}
}

public void addParam(String szName, String szValue) {
prepAdd();
szUrlParam += urlEncode(szName) + "=" + urlEncode(szValue);
}

public void addParam(String szName, int nValue) {
prepAdd();
szUrlParam += urlEncode(szName) + "=" + urlEncode(Integer.toString(nValue));
}

public void addParam(String szName, long lValue) {
prepAdd();
szUrlParam += urlEncode(szName) + "=" + urlEncode(Long.toString(lValue));
}

public void addParam(String szName, boolean bValue) {
prepAdd();
Boolean boolValue = new Boolean(bValue);
szUrlParam += urlEncode(szName) + "=" + urlEncode(boolValue.toString());
}

private String urlEncode(String s) {
StringBuffer sb = new StringBuffer();

for (int i = 0; i <>
switch (s.charAt(i)) {
case ' ':
sb.append("%20");
break;
case '+':
sb.append("%2b");
break;
case '\'':
sb.append("%27");
break;
case '<':
sb.append("%3c");
break;
case '>':
sb.append("%3e");
break;
case '#':
sb.append("%23");
break;
case '%':
sb.append("%25");
break;
case '{':
sb.append("%7b");
break;
case '}':
sb.append("%7d");
break;
case '\\':
sb.append("%5c");
break;
case '^':
sb.append("%5e");
break;
case '~':
sb.append("%73");
break;
case '[':
sb.append("%5b");
break;
case ']':
sb.append("%5d");
break;
default:
sb.append(s.charAt(i));
break;
}
}
return sb.toString();
}

public String toString() {
return szUrlParam;
}

}

Sunday, July 16, 2006

Most Important 12 Sony Ericsson UIQ 3 development tips

When developing UIQ 3 C++ applications for Sony Ericsson UIQ 3 phones, the following should be considered:

  • Always favor CQikXXX classes over CEikXXX classes. Derive your AppUi from CQikAppUi (Qikon) rather than CEikAppUi .
  • Ensure that your application is “theme aware”. Use logical colors to draw application controls and propagate color scheme change messages through your application.
  • Make sure that application icons in three different sizes are defined for display on the device.
  • Prefer the Symbian exception handling before the standard C++ language exception handling.
  • Do not block a ViewActivatedL - any potentially long running action chained off a view activation should be done async. Otherwise the system may kill your application for being too sluggish.
  • Be conservative in stack usage, including the implementation of recursive algorithms.
  • Follow the UIQ 3 style guidelines.
  • Have some way to call Exit from your application in debug builds. In the emulator, this will cause a panic if there is any memory leakage. It’s much better to find memory leaks during development in the emulator, than at the end of development, when testing in the phone is done.
  • Do not run timers continuously in the background because it seriously affects battery life.
  • Make your code device independent when possible. Do not “hard code” screen sizes, colour depths, font sizes, and so on, instead use Symbian OS APIs to get details of device characteristics and capa-bilities so that your application will run on the widest possible ranges of devices including any future Symbian/UIQ based Sony Ericsson phones.
  • Avoid using local TBuf objects. They consume valuable stack space, which is extremely limited on a symbian device, and behave very differently compared to in the emulator. If you need more than a few hundred bytes allocated to a TBuf , then use a HBuf which is allocated on the Heap instead. Always remember to destroy the HBuf after it is finished with. The reasons for stack exhaustion are almost impossible to trace on the real target, they appear as random, unexplained crashes.
  • Since applications can be installed either in phone memory or on Memory Stick, avoid using absolute paths for file locations in your code.

Series 40 3rd Edition Feature Pack 1 SDK Released


The Series 40 Platform 3rd Edition Feature Pack 1 SDK is now available for download. This latest version supports the Scalable 2D Vector Graphics API for J2ME™ (JSR-226), the J2ME™ Web Services Specification (JSR-172), and Macromedia Flash Lite 1.1 from Adobe, which lets developers further enhance the end-user experience with compelling and rich applications.

New uses for Symbian API's


This useful application will let you record incoming and outgoing phone calls! CallRecorder can start recording automatically or ask whether to record a conversation or not - this will depend on the rules you set.

Saturday, July 15, 2006

Java to be Open Source

Sun's new CEO Jonathan Schwartz ended years of speculation last month when he announced that the company plans to open source Java. Tony Baer reports from Sun's annual JavaOne conference in San Francisco.

The waiting is over: Sun Microsystems will open source Java, but it has not figured out how to do it yet.
During the opening keynote of JavaOne 2006, Sun's incoming CEO Jonathan Schwartz wasted little time in cutting to the chase about the question on everybody's minds: Will Sun open source Java?

Schwartz passed the ball to Rich Green, who rejoined Sun just 10 days earlier to retake his old role as head of Sun's software business. "It's not a question of whether, it's a question of how," said Green.

Thursday, July 13, 2006

J2ME Image Loader Source Code

public Image getImageFromUrl(String url)
{
InputStream is = null;
HttpConnection hc = null;
Image img = null;
try {
hc = (HttpConnection)Connector.open(url);
// If we've got a connection?
if (hc.getResponseCode() == HttpConnection.HTTP_OK) {
// Open the stream
is = hc.openInputStream();
// How big is the file?
int len = (int)hc.getLength();
// Create a byte array that size
byte[] data = new byte[len];
// Read in the file
int actual = is.read(data);
// Create an image from the raw data
img = Image.createImage(data, 0, len);
}
} catch (Exception e) {
System.out.println("IO Exception+"+e);
} finally {
if (is != null) {
try {
is.close();
}
catch (Exception e) { }
}
if (c != null)
{
try {
c.close();
}
catch (Exception e) { }
}
return img;
}

Wednesday, July 12, 2006

MIDlet About Command Button Example

Here is some code I wrote back in 2002 which will display a copyright character \251 , specified image located in the resoures, checkes for device capabilitities ie. if it is able to render in color or black and white.

You can modify the About class to have parameters for the copyright string and icon variables.

public class X extends javax.microedition.midlet.MIDlet implements CommandListener, Runnable {



...
/** command about */
private Command cmdAbout = null;

...


...
cmdAbout = new Command("About", Command.HELP, 30);
anyForm.addCommand(cmdAbout);
...


public void commandAction(Command cmd, Displayable d) {
...

if (cmd == cmdAbout) {
About.showAbout(display);
}
....


/*
* @(#)About.java
* (C) Copyright Serkan Azmi. 2001
* All rights reserved
* The material(s) may be used and/or copied only with the written permission
* of Serkan Azmi. or in accordance with the terms and
* conditions stipulated in any agreement/contract under which
* the material(s) have been supplied.
*
* Created on 18 September 2001, 08:44
*/

import javax.microedition.lcdui.*;

/**
* Typical about box with a string and an image.
*/

public class About {

private static String copyright =
"\251 Serkan Azmi 2002";

private Displayable previous; // the previous screen to go back to

private About() {}; // no instances

/**
* Put up the About box and when the use click ok return
* to the previous screen.
*/
public static void showAbout(Display display) {

Alert alert = new Alert("About");
alert.setTimeout(Alert.FOREVER);

if (display.numColors() > 2) {
String icon = (display.isColor()) ?
"/icons/NAME_OF_APPLICATION_ICON.png" : "/icons/NAME_OF_APPLICATION_ICON_IN_GREYSCALE.png";

try {
Image image = Image.createImage(icon);
alert.setImage(image);
} catch (java.io.IOException x) {
// just don't append the image.
}
}
Runtime runtime = Runtime.getRuntime();

runtime.gc();
alert.setString(copyright);

display.setCurrent(alert);
}

}

Screen Capture for UIQ (Sony Ericsson P800/P900)


SCap for the SonyEricsson P800/P900 allows you to capture the full screen of a P800/P900 and save it to file. Start screen capture by selecting Start capture from the SCap menu, then use the hotkey to capture the screen. The images are stored in a folder called scap and you can use the P800/P900 Pictures application to view them. SCap can take screenshots in both Flip Open and Flip Closed.

Featurelist:

  • File format: Save screenshots as 24-bits bmp, 8-bits bmp, gif or jpg. For jpg you can configure the image quality (and thus the file size).
  • Location: You can configure screenshots to be stored on either the internal disk or the Memory Stick.
  • Filename: You can specify the base file name of the screenshot image files. SCap will append a unique number to the base filename. For example, the default base file name is screen and the default image type is jpg, so images are called screen.jpg, screen-1.jpg etc.
  • Hotkeys: Select Camera button, Browser button, Power button or Jog dial select as the hotkey.
  • Auto/manual stop: You can configure SCap to either automatically stop the capturing after you've taken a screenshot (and thus release the hotkey to its normal use) or to leave it on until you manually select Stop capture from the SCap menu. This is handy if you want to take several screenshots.
  • Visual feedback: If you enable visual feedback you get a small popup to say SCap is saving the image and a popup to say it is done. You can disable them which is usefull when taken screenshots of games such as EDoom or EMame as these popups will take these games out of their full screen mode.
  • Audible feedback: You may select an audio file to be played after the screen capture is fully completed. Audible and visual feedback are usefull because for example saving a screenshot as gif on the memory stick may take 10 seconds. In that period you cannot take another screenshot.

Free J2ME emulator that runs in a webpage


Do you program Java ME (formerly J2ME)? If so, you might like to know about a free J2ME emulator that you can embed into your web pages.

To use mPowerPlayer start with the URL…

http://webstart.mpowerplayer.com/

All you need to do is append your URL and .jnlpto and that’s it!

For example,

http://ota.mpowers.net/piranha/pna-us.jadbecomes
http://webstart.mpowerplayer.com/ota.mpowers.net/piranha/pna-us.jad.jnlp

Monday, July 10, 2006

MIDlet Splash Screen Example

package display;

import java.io.IOException;

import javax.microedition.lcdui.*;

/**
* A simple splash screen.
*
*/
public class SplashScreen
extends Canvas
implements Runnable {
private Image mImage;
private Display mDisplay;
private Displayable mNextDisplayable;

/**
* Create a new SplashScreen. The constructor
* attempts to load the named image and begins a timeout
* thread. The splash screen can be dismissed with a key
* press, a pointer press, or a timeout (hardcoded at
* three seconds).
*
* @param name the path of the image resource to load
* @param display the application's Display
* @param next the screen to be shown after the splash
*/
public SplashScreen(String name,
Display display, Displayable next) throws IOException {
mImage = Image.createImage(name);
mDisplay = display;
mNextDisplayable = next;
Thread t = new Thread(this);
t.start();
}

/**
* Paints the image centered on the screen.
*/
public void paint(Graphics g) {
int width = getWidth();
int height = getHeight();

g.drawImage(mImage, width / 2, height / 2,
Graphics.HCENTER | Graphics.VCENTER);
}

/**
* Dismisses the splash screen.
*/
public void dismiss() {
if (isShown())
mDisplay.setCurrent(mNextDisplayable);
}

/**
* This method is used internally with a timeout thread.
*/
public void run() {
try { Thread.sleep(3000); }
catch (InterruptedException ie) {}
dismiss();
}

/**
* A key release event causes the dismiss()
* method to be called.
*/
public void keyReleased(int keyCode) { dismiss(); }
/**
* A pointer release event causes the dismiss()
* method to be called.
*/
public void pointerReleased(int x, int y) { dismiss(); }
}