Showing posts with label how-to. Show all posts
Showing posts with label how-to. Show all posts

Tuesday, September 26, 2006

Create your own Videos to watch on your Mobile Phone for Free

MyMobileClips is a free service that gives the user the option of converting Google Video / YouTube files to 3gp directly over the net. You can also give it a direct link to any link on the web or upload a video from your computer.
It gives you 2 template sizes Large - 176 x 144 which is for Series60 (S60) devices and a Small - 128 x 96. You type in a password and thats it.

To upload a Google or Youtube Video:
1. You get the url from google video or you tube.
2. You go to the correct upload section
3. Paste the url to the video in the box, and click upload.
4. Check back in a few minutes and your video should be done.

You video link will be available for download 24 hours from conversion.

The videos you upload have a 50MB size limit, but for a free service it works great.

Saturday, September 23, 2006

How to Setup or Host a Web Server on your Nokia Mobile Phone


You can use the web server to retrieve content off the internet for use in your applications. If you are a developer and don't have a server this is a pretty handy solution for you.

Via biskero.org

Sunday, September 03, 2006

How to Setup SIP – VoIP on Nokia E Series



Sipgate
First create a SIPGATE account to get a sip number .
After you have created and confirmed your account Click Here and log in to your SipGate account to configure your Nokia E60/61 for your sipgate account.
This is the easiest way.



Gizmo Projects
First you will need to Create a Gizmo Project account

Here is how to configure your Nokia e61\e60 :

Go to Tools - Settings - Connection -SIP settings - Create the
following profile

Profile Name: sipphone
Service Profile: IETF
Default Access point: (your WLAN AP name)
Public user name: sip:1747xxxxxxx@proxy01.sipphone.com
Use Compression: No
Registration: " When needed "
Use Security: No

Proxy Server: sip: proxy01.sipphone.com
Realm: proxy01.sipphone.com
User Name: 1747xxxxxxx
Password: [You SIPPhone password]
Allow loose routing: Yes
Transport Type: TCP
Port: 5060

Registrar Server: sip:proxy01.sipphone.com
Realm: proxy01.sipphone.com
User Name: 1747xxxxxxx
Password: [Your SIPPhone password]
Transport Type: TCP
Port: 5060

Then go to connection - Internet Tel. Settings -
Create a new profile for "sipphone"(1747xxxxxxx), name it "sipphone"
In Connectivity - Internet tel. - Preferred profile - Choose "sipphone"

Then go back to Connection - SIP settings - sipphone and change the Registration from (when needed) to (Always on) now your phone will register to the
Gizmo network.

*If you don’t know your Sip number that starts with 1747 xxxxxx open the Gizmo Project program on your p.c click on edit -> profile.



P.B.Xes
Another way to setup VOIP on your Nokia e61 is by using Gizmo Project and P.B.Xes
# Click HERE to find out more.

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.

Saturday, August 19, 2006

Getting the Current Cell Id using Symbian S60

What you need:
Series 60 SDK
Communicator 9200 SDK version 0.9 or higher
etel.h from Communicator 9200 SDK
etelbgsm.h from Communicator 9200 SDK

Instructions:
Copy etel.h and etelbgsm.h to the \Symbian\6.1\Series60\Epoc32\Include directory.

Link your app to gsmbas.lib and etel.lib.

Use this code:

 RBasicGsmPhone phone;
RTelServer server;

User::LeaveIfError( server.Connect() );
// load a phone profile
_LIT(KGsmModuleName, "phonetsy.tsy");
User::LeaveIfError( server.LoadPhoneModule( KGsmModuleName ) );

// initialize the phone object
RTelServer::TPhoneInfo info;
User::LeaveIfError( server.GetPhoneInfo( 0, info ) );
User::LeaveIfError( phone.Open( server, info.iName ) );

MBasicGsmPhoneNetwork::TCurrentNetworkInfo netinfo;
User::LeaveIfError( phone.GetCurrentNetworkInfo( netinfo ) );

Now you should be able to access the fields of
MBasicGsmPhoneNetwork::TCurrentNetworkInfo
which are
.iCellId
.iLocationAreaCode
.iNetworkInfo.iShortName

Once you have grabbed the info use this code to clean up:

phone.Close();
server.UnloadPhoneModule( KGsmModuleName );

server.Close();

All the code should work for the 6600 as well. You have the option of
just compiling with the 1.2 SDK or copying the headers to the 2.0 SDK .

Explore the other functions and data available through these objects as well. The headers should provide you with enough information to figure out what they are. Not all of them are completely implemented. According to a Forum Nokia post you can get to the information by:

  • ManufacturerId, Serial No: GetPhoneInfo()
  • BER, battery status: GetX - async version
  • Signal Strength: SignalStrengthNotification()

Use the NotifyChangeOfCurrentNetwork, so that works as well.


Friday, August 04, 2006

Coding full-screen Symbian C++ applications

There are different methods for making full-screen applications.

1. Cover the system panes
This simple method is used when the application has a traditional view architecture where the view is not a full-screen view. To make the view full screen, call the CCoeControl::SetExtentToWholeScreen() method in the MyView::ConstructL method before the ActivateL() call.

void CHelloWorldPlusAppView::ConstructL(const TRect& aRect)

{

// Create a window for this application view

CreateWindowL();

// Set the window size

SetRect(aRect);

// This view is a full-screen view.

SetExtentToWholeScreen();

// Activate the window, which makes it ready to be drawn

ActivateL();

}

SetExtentToWholeScreen() is not recommended when the application is skinned (from S60 2nd Edition onwards). However, full-screen applications do not want the skin feature anyway, so this should not be a problem.

2. Hiding
The status pane and softkeys can be hidden. The status pane can be hidden from the AppUi with the command

#include
#include
StatusPane()->MakeVisible(EFalse);

Softkeys can be hidden from the AppUi with the
Cba()->MakeVisible(EFalse); command, which activates the “null” softkeys. The default softkeys have no effect after that. To activate the default option menu and the Back key immediately after the keys are pressed, manually handle the key presses. This can be done in the HandleKeyEventL() method as follows:

TKeyResponse CHelloWorldPlusAppUi::HandleKeyEventL( const TKeyEvent& aKeyEvent,TEventCode TEventCode aType)
{

// Left or right softkey pressed
if (aType==EEventKeyDown && (aKeyEvent.iScanCode == EStdKeyDevice0 || aKeyEvent.iScanCode == EStdKeyDevice1))
{
Cba()->MakeVisible(ETrue);
}
else
{
Cba()->MakeVisible(EFalse);
}
}

return EKeyWasNotConsumed;

}

After that, you can use whole screen when drawing.

Thursday, July 27, 2006

Signing Error Messages Series 60 (S60) 3rd Edition

If you have been reading discussions at Forum Nokia Developer Discussion Board recently, you may notice there are many questions about signing in S60 3rd Edition. It seems the new security feature in Symbian 9 has led to frustration for some developers.

I would like to share what kind of error messages I have seen when installing signed/unsigned application in S60 3rd Edition phones. There is a hint that explains what may cause a particular message. I may not be able to cover all error messages because I may not have seen all of them.

Read also a nice blog posting from S60 team, Signing applications for S60 3rd Edition.

Message: Certificate error. Contact the application supplier.


Hint: You may have tried installing unsigned application. Note that signing is mandatory S60 3rd Edition. You can use self-signed certificate or developer certificate from Symbian Signed to sign your application.

Message: Unable to install. Constrained by the certificate.


Hint: This message pops up when you attempt to install developer certificate in the unsupported device. The developer certificate from Symbian Signed can only be used in a limited number of devices. Remember that you have to send your IMEIs to Symbian Signed when requesting certificate. You cannot use the certificate in other devices that is not in your IMEIs list.

Message: Required application access not granted


Hint: Check that your certificate can be used to sign all capabilities needed by your application. For example, if you use self-signed certificate, you can only sign basic set capabilities, i.e. NetworkServices, ReadUserData, WriteUserData, LocalServices and UserEnvironment. If your application requires one of the extended capabilities, for example SwEvent, you cannot sign it with self-signed certificate. In this case, apply for developer certificates from Symbian Signed.


Message: Unable to install a protected application from an untrusted supplier


Hint: If you use self-signed certificate, make sure that your application uses unprotected UID, i.e. 0xA0000000 - 0xAFFFFFFF. If you use protected UID (0×20000000 - 0×2FFFFFFF) or legacy UID (0×10000000 - 0×1FFFFFFF), you will get this message.

Message: Unable to install



Hint: This message may come up when your installation file (.sis/.sisx) copies files to other application’s private folder, i.e. \private\uid. Note that Symbian 9 introduces data caging concept, it means you don’t have access to other application’s private folder.

Nokia N91 - Adding Album Art to Your Music

I've recently come across some topics and questions regarding the display of Album Art in the N91 Music Player. Depending on where you get your music from the album art isn't attached to a file... unless of course its downloaded from iTunes, but that won't help us here.

I haven't found a more simple method but I will share my solution. First of all, I get my music from AllTunes.com (the guys at AAS rave about this). I usually just copy the image of the album and save it to my laptop. Once I've downloaded the album using Nokia's Music Manager I can now add my album art.



As you can see from the above images the process really isn't as hard as you think. Start by first finding your album image and then sending it to the phone. Store it in your gallery.

Next, open your Music Player and select the artist. Select the Album or Artist that you wish to add the album art to. Select options and go to Album Art. Select options again and go to change. This will then take you to your gallery where your image is stored. Select the image and viola' your done!

This is the method that I use but by all means, if there is an easier way please feel free to share.


Via [Darla Mack]

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.

Friday, July 14, 2006

File Explorer Tricks for Series60 phones


* How to reset the operator logo :

1) go to the following dir :

c:\system\apps\phone\oplogo

1) delete any file in this directory

3) restart the phone

* to make a screenshot on a Nokia 3650, 6600 :

1) use the pencil key + '0'
2) the screenshot is saved in C:\NOKIA\IMAGES\FE_img\

* to make a screenshot on a SX1 :

1) use the shift key + '0'
2) the screenshot is saved in C:\NOKIA\IMAGES\FE_img\

* remember, there are some shortcuts :

: copy
: show path (scroll with joystick left/right)
: PageUp
: cut
:
*not yet used*
: top of the list
: paste
:
*not yet used*
: PageDown
: Mark / Unmark a file
: go to root
: file properties
: delete a file

* running exe files :

With version 1.13,in the directory of FExplorer a console exe file : EXETEST.EXE (you can run it), the purpose is only to test if FExplorer can run EXE files on your phone.

* restoring the last path in views :

After leaving the 'about box', 'settings' or the 'editor' view, if FExplorer return to the root directory, check that the 'save last path' in the settings is 'ON', not only this settings is used when leaving FExplorer but i's also used in all the differents 'views' (06/03/2005).

* how to switch between the text/hex viewer :

Simply, go to the settings and choose the viewer type : text or hex (06/05/2005).

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);
}

}

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(); }
}

Sunday, July 09, 2006

Learn Carbide - the easy way

Carbide tools from Nokia make it easy to create great mobile applications, and two new screencasts make it easy to start using the Carbide tools. Each screencast shows how a particular tool works, and includes clear narration to aid the learning process. Screencast viewers can pause the presentation, skip ahead, or repeat any section as often as they desire. Each screencast is packaged as a self-contained downloadable file, so that a developer can view it anywhere — even in a location without Internet access.

Download the screencast for Carbide.c++

Download the screencast for Carbide.j

Friday, July 07, 2006

J2ME Polish



J2ME Polish is suite of tools for creating "polished" J2ME applications. Each tool meets a definite need of J2ME developers: Build-tools with an integrated device-database, a powerful GUI, a framework for building localized applications, a game-engine, a logging framework and a collection of utilities.

It's free, open source has online documentation and tutorial. Also has a book published on the toolkit.

Monday, July 03, 2006

Nokia Mobile Phone Hidden Features

These codes will work on most Nokia Mobile Phones to activate/deactivate advanced hidden functions that you can’t change through the phone menu

Code Function
*3370# Activate Enhanced Full Rate Codec (EFR) - Your phone uses the best sound quality but talk time is reduced my approx. 5%
#3370# Deactivate Enhanced Full Rate Codec (EFR)
*#4720# Activate Half Rate Codec - Your phone uses a lower quality sound but you should gain approx 30% more Talk Time
*#4720# Deactivate Half Rate Codec

#pw+1234567890+1# Provider Lock Status. (use the “*” button to obtain the “p,w” and “+” symbols)
#pw+1234567890+2# Network Lock Status. (use the “*” button to obtain the “p,w” and “+” symbols)
#pw+1234567890+3# Country Lock Status. (use the “*” button to obtain the “p,w” and “+” symbols)
#pw+1234567890+4# SIM Card Lock Status. (use the “*” button to obtain the “p,w” and “+” symbols)
12345 This is the default security code

*#21# Allows you to check the number that “All Calls” are diverted to
*#30# Lets you see the private number
*#43# Allows you to check the “Call Waiting” status of your phone.
*#61# Allows you to check the number that “On No Reply” calls are diverted to
*#62# Allows you to check the number that “Divert If Unreachable (no service)” calls are diverted to
*#67# Allows you to check the number that “On Busy Calls” are diverted to

*#0000# Displays your phones software version, 1st Line : Software Version, 2nd Line : Software Release Date, 3rd Line : Compression Type
*#9999# Phones software version if *#0000# does not work
*#06# For checking the International Mobile Equipment Identity (IMEI Number)

*#67705646# Removes operator logo on 3310 & 3330
*#73# Reset phone timers and game scores
*#746025625# Displays the SIM Clock status, if your phone supports this power saving feature “SIM Clock Stop Allowed", it means you will get the best standby time possible
*#94870345123456789# Deactivate the PWM-Mem
press and hold # Lets you switch between lines

*#7760# Manufacturers code
*#7780# Restore factory settings
*#8110# Software version for the nokia 8110
*#92702689# Displays - 1.Serial Number, 2.Date Made, 3.Purchase Date, 4.Date of last repair (0000 for no repairs), 5.Transfer User Data. To exit this mode you need to switch your phone off then on again

**21*number# Turn on “All Calls” diverting to the phone number entered
**61*number# Turn on “No Reply” diverting to the phone number entered
**67*number# Turn on “On Busy” diverting to the phone number entered