February 13th, 2006

Controlling focus with ActionScript

You can use the Selection ActionScript object to get and set the current keypad focus, or to benotified when an object receives or loses keypad focus. This is useful, for example, if you want to automatically set the focus to a specific button when your application first loads. Or you may want to be notified when a specific object on the screen has received (or lost) keypad focus so that you can update the screen accordingly.
For example, the following code uses the Selection.setFocus() method to set focus to the button instance named login_btn:Selection.setFocus(login_btn);
The Selection.onSetFocus event listener lets you determine when the keypad focus has changed. You can use this event listener, for example, to create a custom focus manager for input text fields, rather than use the default focus rectangle. The following procedure shows how to create a custom focus manager that changes the border color of the TextField object with focus. A completed version of this application named custom_input_focus.fla is located in the /Sample and Tutorials/Samples/Flash Lite 2.0/ folder in the Flash Professional 8 installation folder on your computer.
Read more … »

February 12th, 2006

J2ME Heap

Java applications use two kinds of heap memory, plain Java heap and LAM (Large Array Memory). The LAM is shared with other processes on the phone. Standard Java objects and vectors of Java objects are always located on the Java heap. Arrays of primitive types () however may be put in the LAM if the plain Java heap is low on memory. Small arrays have a larger chance of ending up in the plain Java heap, while large arrays more often are stored in the LAM. Images are also sometimes placed in LAM.
Read more … »

February 6th, 2006

Writing Portable BREW Code in C or C++

If you’re comfortable developing in C++, you should definitely use C++ instead of C for your BREW application if you’re targeting Java. The reason is simple: the support C++ provides for object-oriented development lets you organize your application in a manner very similar to how your Java application is organized. By designing your application in C++, you can create classes that map to your Java classes, eliminating the need to translate a procedural application in C to a class-based Java application or to use object-oriented programming tricks in C (see the next section) to simplify your move to Java.

When developing code in C++ that you anticipate moving to Java, you should remember that Java doesn’t have support for multiple inheritance, operator overloading or templates, so you simply should avoid using these features. You should also heed the suggestions in the next section for crafting portable C code, because these rules apply equally to C++.
Read more … »

February 6th, 2006

8 Megapixel camera phone

Samsung SPH-V8200 - 8 Megapixel WCDMA camera phone

Cellular phone with camera or camera with cellular phone?

8-Megapixel mobile phone
This question I has wondered after presentation of new Samsung SPH-V8200 camera phone.

Samsung have surprised us earlier with the 5-megapixel camera phone (Samsung SCH-S250) and the 7-megapixel camera phone (Samsung SCH-V770) . These phones some months are on sale in the Korean market.

But phone, which was demonstrated by Samsung president Lee Ki-tae, forces to think about the future of mobile phones.
Read more … »

February 5th, 2006

Making 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; see figure). 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 <eikbtgpc .h>
#include <avkon .rsg>
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.

« Previous Entries | Next Entries »