Super Swipe Feature from BB10

Good bye sand clock! And greeting for BB10, a new baby born OS for future Blackberry embryo. As tons news from internet what inside in BB10, actually there's also tons features needed to improve this OS. But before they continue to make a really mature model in upcoming versions, let end-user learn and decide how they experience for the UI as what I called as super swipe device in baby OS - the BB10.

The important thing that user need to compromised is the UI swipe tips and trick, since there's no back button or common navigation found on it as others devices. So here I made this short guidance for user that new to BB10 device; Z10, Q10, A5 or any of touchscreen BlackBerry device which using BB10 or later as it OS.

The Home Screen
This is how you'll move around the home screen on your BB10 device. You can get to your messages in the BlackBerry hub by swiping from left to right.



Get back to all your apps by swiping from right to left. Swipe left or right to find apps on the home screen. Or by simply choosing screen number from bottom  of the display.



To get out of any app, touch the bottom edge of the glass and slide your finger up.



Swiping up will bring you to your recent apps on the home screen. That's how to navigate you BB10 device.

Going Home
The most important gesture for your BB10 device is waking up and unlock it by touching the bottom edge of the glass and sliding your finger up.



The same gesture will get you out of an app. Touch the bottom edge of the glass and slide your finger up.



Remember: Sliding up from bottom edge of the glass will take you to the home screen again.

Showing Options
These will show you how to access the top menu on your BB10 device. While on the home screen, you can get to device settings by touching the top edge of the glass and sliding your finger down.



While in an app, the same action will show you options specifig to that app.



Remember: Sliding down from the top edge of the glass can reveal more.

Notifications
Here's an easy way to peek at your notifications and jump to your messages on the BlackBerry Hub. You can check your notifications by touching the bottom edge of the glass and slowly sliding your finger up.



Or jump straight to the BlackBerry Hub. Touch the bottom edge of the glass then slide up and to the right.



Now you know how to check your notifications and messages.

Virtual Keyboard
The tips on how to use the keyboard is the power of BB10 devices. When you start typing, a prediction will appear above the next letter of the word. To select that word, simply swipe your finger up from that letter.



Swiping down on the keyboard will display number and symbols.



To delete a word, swipe across the keyboard from right to left.



To hide the keyboard, press and hold the space-bar.



You can also swipe down on the keyboard with two fingers to hide it.



Another Trick
To restart BlackBerry Hub, simply swipe from the right top edge of the glass and diagonally slide to the left until the center of the screen and do it for 5 times.



Others trick is the same with others touchscreen device, such as internet browser, pictures app or PDF reader. If they apply to that app, you can use content gestures to let you directly manipulate content just like zooming in or out, peeking or scrolling.

Anyway, Good bye sand clock!

Labels: , , , ,

  Post a Comment Bookmark and Share

Elevating User Account Control with Delphi

If you have medium size of Delphi based application that required some privileges access to Windows OS particularly, then you might face problem with User Account Control (UAC). User Account Control (UAC) is a technology and security infrastructure introduced since Microsoft's Windows Vista. It aims to improve the security of Windows by limiting application software to standard user privileges until an administrator authorizes an increase or elevation. However without privileges access, application that need access to system folder or database might impact to failure.

This time lesson will share you 2 alternatives how the application "playing" with UAC. The first option order user to elevating the authorization manually by executing application using Run As Administrator from right click context menu of the EXE binary. While last option inject an embedding code to elevating user automatically. Both alternatives options came with the same scenario, a login form with Login button enabled if user has full privileges access, and so on in contrary. Let the learn begin, and here the detail explanation:

1. Detecting Elevation Level with ElevationType
We know that UAC only affect with OS greater than Windows XP, so you need also to detect what kind of OS version where the application currently running on. In order so, put below function on the code:

function osver: string;
begin
result := 'Unknown (Windows ' + IntToStr(Win32MajorVersion) + '.' + IntToStr(Win32MinorVersion) + ')';
case Win32MajorVersion of
        4:
                case Win32MinorVersion of
                        0: result := 'W95';
                        10: result := 'W98';
                        90: result := 'WME';
                end;
        5:
                case Win32MinorVersion of
                        0: result := 'W2K';
                        1: result := 'WXP';
                end;
        6:
                case Win32MinorVersion of
                        0: result := 'WVista';
                        1: result := 'W7';
                end;
end;
end;

Then, you can put elevation user account detector on form onShow event just like code below :

procedure TForm1.FormShow(Sender: TObject);
const
TokenElevationType = 18;
TokenElevation     = 20;
TokenElevationTypeDefault = 1;
TokenElevationTypeFull    = 2;
TokenElevationTypeLimited = 3;

var
token: Cardinal;
ElevationType: Integer;
Elevation: DWord;
dwSize: Cardinal;
RunAsAdministrator:boolean;
level: string;
begin
SB.Panels[0].Text:='OS type: ' + osver;

// Run As Administrator Validator
RunAsAdministrator:=false;
if OpenProcessToken(GetCurrentProcess, TOKEN_QUERY, token) then
        try
        if GetTokenInformation(token, TTokenInformationClass(TokenElevationType), @ElevationType, SizeOf(ElevationType), dwSize) then
                case ElevationType of
                        TokenElevationTypeDefault:  RunAsAdministrator:=false;
                        TokenElevationTypeFull:     RunAsAdministrator:=true;
                        TokenElevationTypeLimited:  RunAsAdministrator:=false;
                else
                        RunAsAdministrator:=false;
                end
        else if (osver='W95') or (osver='W98') or (osver='WXP') then RunAsAdministrator:=true;

        if GetTokenInformation(token, TTokenInformationClass(TokenElevation), @Elevation, SizeOf(Elevation), dwSize) then
                begin
                if Elevation = 0 then RunAsAdministrator:=false
                else RunAsAdministrator:=true;
                end
        else if (osver='W95') or (osver='W98') or (osver='WXP') then RunAsAdministrator:=true;

        finally
        CloseHandle(token);
        end;

level:='(Administrator)';
btnLogin.Enabled:=true;
if not RunAsAdministrator then
        begin
        level:='(NOT Administrator)';
        btnLogin.Enabled:=false;
        end;
SB.Panels[0].Text:=SB.Panels[0].Text + ' ' + level;
end;

That's all. Try to execute the application in Windows 7, here's what I've got:



The Login button disabled since the application not executed with Run As Administrator context menu.



But, if the application running from Run As Administrator, the Login button now enabled!



Note that above code will not impact on Windows XP, since OS assumed that user running it as Administrator account even it executed from context menu or not.



2. Elevate Execution Level by Manifest file
Create a .manifest file :



Save it as .manifest. Continue to create a .rc file and named it as .rc.



Ah... don't forget to save the .manifest and .rc file in the same folder with the application source code. Then, continue to open command prompt, switch to directory where brcc32.exe (Borland Resource Compiler) exist and gives below syntax:



After the syntax succesfully compiled, it will automatically created a .res and .rec.



Back to the application source code and move to Project Manager window, right click to Project Files and point to View Source menu.



On .DPR menu, gives a line syntax after $R compiler directive just like picture below:



Finished! You may test the application and see what the different between options no #1 and #2.



Have a great fuckin' day!

Labels: ,

  Post a Comment Bookmark and Share

(Free) Distributed System Proof-of-Concept

I recently completed and implementing the system design of an application. The system design is web based, but the direction shifted to win32 desktop-based application in the second half of the design phase. This isn't ideal, but it's still fine, as system design phase mainly focuses on functional module design, database design and capturing business requirements from a more technical view.

Lots of facts happened while I running the system, but only several major things that I could tell you right now. It seems to be an early warning for you if you have the same project type as me, such as :

1. Database synchronization
This internal application has local database containing tens of tables that should synchronized to the web system when it ready. Now you need to learn, when and how the database will transported down or up - or even control what's down to user database. Beware that weak system design will make synchronization potentially ruined.

2. User Sign On
User control is more important to the system wide globally that affect both desktop and web after all. Notice when and how is user accepted or rejected from the system.

3. Application Distribution
At this moment, the biggest benefit everyone agrees, is that web-application does not require client side deployment. But how you control desktop based application deployment and versioning problem more effective?

However, we're focussed at last point, the software distribution it self. Since this particular system is unique, but I think I made this one succesfully. Starting from theory lesson, ends up with the conceptual practice, finally I named it as SISPIu Distribution Management. And here's the story...

Theory
Software distribution is the process of delivering software to the end user. It may take the form of a binary distribution, with an executable or installer which can be downloaded from the network or wide area Internet.



At least, there are four features of software distribution system. One of it, is, remote installation, which it will perform automatic installation and execution of software as well as wizard utility to make a distribution package. Other than that is monitoring status of distribution, it provided with compression technique to minimize size of files being distribute and it will be function to remotely some operations (reboot PC and remote execution if it necessary). Additional Features that included is real time monitoring of software distribution process. Enable or disable limit administrative function to Normal User and standardize Desktop
Environment are the roles of policy control.

Basic Principal of SISPIu Distribution Management
For the sake of completeness, I’ve included basic principal Guidelines below. It's slightly designed to suit the needs, there are:
  1. Local installation contains package and updater module. While the updater module functioned as package transporter, the package it self should meet versioning number rule below.
  2. A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative integers. X is the year age of software (starting with 1), Y is the month age of software after X, and Z is the day of software released. Each element can bound numerically and depends on when the package deployed. For instance: 1.0.0 (initial deployment) -> 1.9.5 -> 1.10.9 -> 1.11.24. Patch version is not considerably needed, but you able to add it. Hence, there's no 0 number here (except for initial version). Nor major or minor version. This is what I called as simplify the version number, as we'll know directly how long that two version released or how old the application stand?
  3. Once a versioned package has been released, the contents of that version MUST NOT be modified. Any modifications must be released as a new version. All packages (old and new version) must stored in the same server directory and accessible through defined IP number and port, which that both number (also username and password if required) are embedded to the package.
  4. The package should contains versioning checker and validation module, also server URL and access account. Once a versioned package detected as a newest than existing package version, call the updater module and shut the current running package.
  5. After download successfully the new package, updater module should execute new package and shut down it self.
That's all, but anyway, sorry, I can't share code for this concept :)

Conclusion
I rely on various web applications to do tasks, projects and life. But I still believe the future of computing isn't entirely web-based. It's necessary to have the desktop as the pivotal point, because the power of the desktop is important for a rich user experience - and will be, for a very long time to come.

That is why software distribution become my critical point since what we require then are smart, webified, internet deployable desktop applications - that can reliably store data, serve it robustly, and interact with both remote and local databases. Also uninterrupted experience during version updates.

What is your thought? Do you have a successful story or failure to share?

Labels: ,

  Post a Comment Bookmark and Share