Sunday, 30 December 2012

Detect CPU architecture at runtime for Windows 8 Store Apps

  If you are developing an application for the Windows 8 Store it is very important that you test it on an ARM device (Surface RT, Asus VivoTab RT, Dell XPS 10,etc.) before sending it into certification. You will probably have some bad surprises and not everything that was fast&fluid on your development machine will continue to be so on an ARM device (the list scroll performance reminds me of the first version of Windows Phone). So you will have to simplify the layouts, animations and in some cases even rewrite part of your code. Parallel Programming is your friend if you can use it (for Kids' Orchestra I had the big problem that generating 100ms of sound output took more then 100ms so after 2 days of trying to optimize the C# source code I realized that I only had to use the Parallel.For and everything started working). 
   Due to performance differences you might need to split the user experience/code on different architectures (like disabling some animations on ARM). If this is the case it becomes very important to know the processor architecture on which your application runs. One solution would be to create 3 different packages of your applications and use the conditional compilation to differentiate between what happens on each architecture. If you still want to use only one package (Any CPU) it is enough to have a method that returns the processor architecture.
    The bad news is that WinRT framework doesn't have any method/property that returns the processor architecture  (at least I don't know it). The good news is that you can still use GetNativeSystemInfo as it is an api supported for Windows Store apps (it is even supported for Windows Phone 8 apps):


  For Windows Store apps you can use two approaches to call this api:
1. Use P/Invoke -this is the one I opted for;
2. Create a Windows Runtime Component in C++ that you can then call from managed code - this is the approach you will have to use if you need to call this function on Windows Phone 8.

   What I did is to create a public class, which I called CPU, and has one public static property NativeInfo that returns an SystemInfo object:

 public class SystemInfo  
{
public ProcessorArchitecture ProcessorArchitecture;
public ushort ProcessorArchitectureId;
public ProcessorType ProcessorType;
public uint ProcessorTypeId;
public uint NumberOfProcessors;
public ushort ProcessorLevel;
public ushort ProcessorRevision;
public uint AllocationGranularity;
};

and a public method IsProcessorFeaturePresent (invoking also a supported Api for Windows Store applications) which returns if a certain ProcessorFeature feature is supported or not.

I have also created a small sample that will give you a list with your processor details. Here is the result I got on  my Surface:


Hope you will find the class useful. Don't hesitate to contact me if you need further details.

SOURCE CODE:

NAMASTE!

Wednesday, 26 December 2012

C# XAudio2 Sound Playback for Windows Phone

     Let's begin with a small introduction to XAudio2:
     XAudio2 is a low-level audio API. It provides a signal processing and mixing foundation for games that is similar to its predecessors, DirectSound and XAudio. XAudio2 is the replacement for both DirectSound and XAudio.
     XAudio2 abstracts audio generation by separating sound data from "voice", allowing each voice to be filtered by programmable digital signal processing and effects processing functions. Voices can be "submixed" together into a single stream. There is always only one Mastering Voice that outputs the result using WASAPI.

     XAudio2 is primarily intended for developing high performance audio engines for games. For game developers who want to add sound effects and background music to their modern games, XAudio2 offers an audio graph and mixing engine with low-latency and support for dynamic buffers, synchronous sample-accurate playback, and implicit source rate conversion. Compared to WASAPI, XAudio2 requires only a minimum amount of code even for complex audio solutions. Compared to the Media Foundation engine, XAudio2 is a low-level, low-latency C++ API that is designed for use in games.
     XAudio2 cannot be used for background music - for this task you will have to use the IMFMediaEngine. XAudio2 cannot be used for capturing audio - for this task you will have to use WASAPI. Do not use XAudio2 for media playback. For that task you can use MediaElement
    XAudio2 is part of the DirectX api that is included in the new Windows Phone 8 SDK. The Api is shared between Windows 8 and Windows Phone 8 which means that you will be able to fully reuse your source code on both platforms. 

If you want to use XAudio2 for your C#/VB/HTML code you have two options:
1. Use SharpDX . SharpDX is a wrapper of the DirectX Api under .Net platform. Theoretically you can use it to call XAudio2 api directly from your managed code. Practically what happens is that the .Net CLR/GC on ARM seem to block native threads so your audio will shutter/glitch in certain conditions. I had the same problem when I was developing our Windows 8 game Kids' Orchestra and the audio had glitches even on a core i7 processor.
2. The other option, which from my experience works better, is to develop an Windows Phone Runtime Component that will manage the XAudio2 part and expose the needed methods/events to the managed code.

      To better understand how it is done I took the Windows 8 sample XAudio2 audio file playback sample C++ from MSDN and ported to Windows Phone 8 by splitting it in two projects: The C#/Xaml part for the UI and the "audio" project which is a Windows Phone Runtime component developed in C++.
     The porting was pretty easy. I only had to re-code the player class to make it "visible" to the managed code project and added an event that will tell you when a certain Source Voice has finished playing its buffer/sound (we have 7 sounds and each sound has a Source Voice associated to it). If you need further details on how to write a Windows Phone Runtime component in C++ have a look at this  MSDN Post

    This sample only plays Wav files that are resources in the C++ project. You could also dynamically generate sounds in managed code and pass the Wave/buffer data as a byte[] to the runtime component. Inside the native code you will then generate an XAUDIO2_BUFFER and submit it to a Source Voice for playing.

     I have attached the SOURCE CODE for the Windows Phone project. If you have problems with it don't hesitate to contact me.

NAMASTE!

Wednesday, 19 December 2012

Using indexOf method on array in server side JavaScript

Sometime back I was trying to use indexOf method on an Array object in server-side JavaScript (SSJS) code. But it was giving me error that indexOf method is not defined. I also couldn't find this method in help documentation. It was then it struck me that the implementation indexOf method in client side JavaScript itself is a bit fuzzy with Internet Explorer not supporting it. It can be defined using prototype property.

I found a simple solution here which implements the method. Just add the below code snippet to your SSJS code and then you would be able to use indexOf method.


Remember that this would be required for SSJS. For client side JavaScript I would recommend using dojo.indexOf.

Tuesday, 18 December 2012

Charging pattern on HTC One X

My HTC One X has a pattern in which it charges itself.


In the above screenshot of my battery usage you can see that from 10% battery level to 60% battery level my phone charges at a constant rate. But from 60% up till around 75% this rate dramatically drops and it takes much longer to charge. Then picks up again until around 90% and afterwards it charges very quickly. I don't know why does this happen and what is its significance. I contacted HTC support but there response was not satisfactory either.

So if you notice the same pattern while charging or a different one do post it in the comments.

Monday, 17 December 2012

Some business customers invited to test new BlackBerry 10 platform

If you're lucky, you may be one of the 120 select customers from 64 Fortune 500 companies to beta test the BlackBerry 10 smartphone, which is set to make a worldwide debut on the 30th of January. The new BlackBerry Hub experience is waiting for your reactions.

The by-invitation-only program starts today and includes participants from financial, government, insurance healthcare, manufacturing and media. It is design to give early adopters a real-life experience on the new BlackBerry 10 platform from Research in Motion, who introduced the BlackBerry in 1999.

“Beginning today, RIM will be visiting some of our enterprise and government ‘early adopters’ and getting them started with the BlackBerry 10 platform,” said Robin Bienfait, Chief Information Officer, Research In Motion. “At RIM, we’ve seen the power of our new enterprise mobility management solution first-hand, and we are thrilled to share BlackBerry 10 directly with these leading organizations.”



The testers will be able to use the key features of the new platform, such as BlackBerry Balance, the BlackBerry Hub, a new messenger and explore the dedicated BlackBerry app store, which is expected to contain around 100,000 apps ready at launch.

According to RIM, getting the new devices in the hands of its best and largest enterprise customers was an important step, as the launch draws closer.

The new BlackBerry 10 devices are expected to have Near Field Communication, or NFC capability, as "BlackBerry Tag" was announced by RIM in January in a BlackBerry OS 7.1. update. This technology will allow content sharing with a simple tap between two NFC-enabled BlackBerry smartphones.

RIM is also counting heavily on the new devices having the Federal Information Processing Standard in place, which also known as FIPS 140-2, a requirement for highly sensitive information. RIM says this certification will help government agencies deploy the BlackBerry 10 smartphones from the day of launch.

According to the BlackBerry Blog, a touchscreen model is expected to be shown at launch, but physical keyboard lovers shouldn't be worried, as a QWERTY model should be coming soon after the Jan. 30 unveiling.

The new devices will be based on an operating system built around features from QNX Software Systems, an automotive industry software maker, who BlackBerry acquired from Harman International Industries in April 2010. In September 2010, the BlackBerry Playbook was announced, along with a new QNX operating system.

We'll learn more about pricing, carriers and availability at the January launch.

Video: BlackBerry Fans Visit RIM HQ to Sneak a Peek at BlackBerry 10

Tips: 10 ways to use BlackBerry Bridge with your BlackBerry Playbook

Visit us on Facebook | Follow on Twitter | Send an email | View Photo Galleries

Saturday, 8 December 2012

New features in HTC One X after Jelly Bean update

Some time back I updated my HTC One X to Jelly Bean (JB) using OTA update. The update takes your Android version to 4.1.1 and Sense to 4+.


Its been almost a 2 weeks with this update and the most noticeable improvement I can see is of battery usage. My phone lasts 1-2 hours more than it used to before. Well done HTC! There also some additions (and deletions) which I am going to describe here. Now I not an Android expert so I don't know all the new features in JB itself, so you may find a feature new in JB listed here. Also you won't find Google Now and Google Play Music here as I know they are new to JB and not HTC One X.
Continue reading »

Monday, 3 December 2012

Smart watches connecting to smartphones could be next big thing

I have been feeling a little like Dick Tracy lately, as I walked around with a Sony SmartWatch on my arm. There is a certain cool factor about this device, which was on loan from Verizon Wireless.

The SmartWatch functions as an extension of your Andriod smartphone or tablet and will allow you to read text messages and view social network updates, as well as check the time and date. The latter should be a "duh" moment; of course it'll give you the time and date.

I was up and running in no time, which allowed me to leave the Android smartphone in my pocket for most tasks.

The SmartWatch makes a Bluetooth connection to Android devices. After downloading a SmartWatch Liveware manager app from the Google play store, you're off and running with Facebook and Twitter updates, the weather, text messages and other features that have smart watch apps available. After digging around in the Android app store, I discovered SmartWatch apps for eBay, Web Cams, games, and get this – a Bubble Level.

I got most of these apps and features to work with the SmartWatch, but keeping a connection to the Android phone is kind of flaky. You can't let them get too far apart, as in the next room, or the Bluetooth connection will be lost.

I also found that swiping the face of the SmartWatch to control the menus and features was a little hit and miss. I would prefer hard button for some of these functions, as the face of the watch is too small for big fingers to be swipe and pinch. The SmartWatch has a single button to bring up the time and date.

Some users found the charging cable tricky to navigate, as it plugs into the underside of the watch, but depend on clamping friction from the watch back against the band to hold it securely. But once you do it a couple of time, it becomes a fairly easy maneuver.

The SmartWatch is compatible with most Android smartphones and tablets. A long list on Verizon's website includes the Droids, HTC, LG, Motorola and Samsung devices. As expected, the Sony Xperia Play is also compatible.

The Sony SmartWatch is listed at $149 from Verizon Wireless and is only available for Android devices at this time. But other manufacturers are also working on iOS compatibility, along with their Android software.

The Citizen Watch Company is taking a different approach with their $495 Eco-Drive Proximity wristwatch. According to this well-known giant in wristwatches, their smart-watch timepiece will connect to the iPhone 4S and iPhone 5 through Bluetooth and features automatic adjustments for time zones, a lost iPhone search feature and email alerts with discrete vibration.

To use the smart watch features on the Citizen Proximity watch, you'll need the Proximity app in the Apple App Store. But early adopters are reporting Bluetooth connectivity problems in their reviews.



This technology is still in the early stages and I'll say the best is yet to come. As we look ahead to 2013, we can expect smart watches from MetaWatch, Martian Watches and Pebble. All of these firms have watches that are about to hit the market or are on the drawing board. These devices will be able to answers phone calls and the social networks integration will get better.

I'll predict that smart watches will be the next big thing and we won't have to reach for the smartphones as often to check emails or answer a call.

More: Apple smartwatch may be in the works

Visit us on Facebook | Follow on Twitter | Send an email | View Photo Galleries

Sunday, 2 December 2012

Making internet pass-through work after updating HTC One X to Jelly Bean

Update 22 Jan 2013: "HTC Sync" seems to have been discontinued so the download links given below will not work. "HTC Sync" is different from "HTC Sync Manager". For exact difference read on.

I recently upgraded my HTC One X to Jelly Bean via OTA update. After updating I was unable to use internet pass-through which used to work flawlessly before and I already had HTC Sync installed on my PC. I uninstalled, installed, uninstalled again and installed again to make it work. But it simply refused. It gave me error of "Either you do not have the latest version of HTC Sync installed on your PC, or another phone is already using Internet pass-through on your PC." on my phone.


From this discussion on XDA Developers forum I found that there is something called as HTC Sync Manager. This is different from HTC Sync which I had installed on my machine. I don't know why HTC did this but its really confusing. Here's how these two software look.
Continue reading »

Thursday, 29 November 2012

Bluetooth Service's UUIDs

If you are developing on Windows Phone 8 and trying to communicate with a Bluetooth device using a StreamSocket these UUID's might come in handy:


ServiceDiscoveryServerServiceClassID= '{00001000-0000-1000-8000-00805F9B34FB}';
BrowseGroupDescriptorServiceClassID = '{00001001-0000-1000-8000-00805F9B34FB}';
PublicBrowseGroupServiceClass = '{00001002-0000-1000-8000-00805F9B34FB}';
SerialPortServiceClass = '{00001101-0000-1000-8000-00805F9B34FB}';
LANAccessUsingPPPServiceClass = '{00001102-0000-1000-8000-00805F9B34FB}';
DialupNetworkingServiceClas = '{00001103-0000-1000-8000-00805F9B34FB}';
IrMCSyncServiceClass = '{00001104-0000-1000-8000-00805F9B34FB}';
OBEXObjectPushServiceClass= '{00001105-0000-1000-8000-00805F9B34FB}';
OBEXFileTransferServiceClass = '{00001106-0000-1000-8000-00805F9B34FB}';
IrMCSyncCommandServiceClass= '{00001107-0000-1000-8000-00805F9B34FB}';
HeadsetServiceClass = '{00001108-0000-1000-8000-00805F9B34FB}';
CordlessTelephonyServiceClass = '{00001109-0000-1000-8000-00805F9B34FB}';
AudioSourceServiceClass = '{0000110A-0000-1000-8000-00805F9B34FB}';
AudioSinkServiceClass= '{0000110B-0000-1000-8000-00805F9B34FB}';
AVRemoteControlTargetServiceClass = '{0000110C-0000-1000-8000-00805F9B34FB}';
AdvancedAudioDistributionServiceClass = '{0000110D-0000-1000-8000-00805F9B34FB}';
AVRemoteControlServiceClass= '{0000110E-0000-1000-8000-00805F9B34FB}';
VideoConferencingServiceClass = '{0000110F-0000-1000-8000-00805F9B34FB}';
IntercomServiceClass = '{00001110-0000-1000-8000-00805F9B34FB}';
FaxServiceClass = '{00001111-0000-1000-8000-00805F9B34FB}';
HeadsetAudioGatewayServiceClass= '{00001112-0000-1000-8000-00805F9B34FB}';  
WAPServiceClass = '{00001113-0000-1000-8000-00805F9B34FB}';
WAPClientServiceClass = '{00001114-0000-1000-8000-00805F9B34FB}';
PANUServiceClass = '{00001115-0000-1000-8000-00805F9B34FB}';
NAPServiceClass = '{00001116-0000-1000-8000-00805F9B34FB}';
GNServiceClass = '{00001117-0000-1000-8000-00805F9B34FB}';
DirectPrintingServiceClass = '{00001118-0000-1000-8000-00805F9B34FB}';
ReferencePrintingServiceClass = '{00001119-0000-1000-8000-00805F9B34FB}';
ImagingServiceClass= '{0000111A-0000-1000-8000-00805F9B34FB}';
ImagingResponderServiceClass = '{0000111B-0000-1000-8000-00805F9B34FB}';
ImagingAutomaticArchiveServiceClass = '{0000111C-0000-1000-8000-00805F9B34FB}';
ImagingReferenceObjectsServiceClass = '{0000111D-0000-1000-8000-00805F9B34FB}';
HandsfreeServiceClass = '{0000111E-0000-1000-8000-00805F9B34FB}';
HandsfreeAudioGatewayServiceClass = '{0000111F-0000-1000-8000-00805F9B34FB}';
DirectPrintingReferenceObjectsServiceClass = '{00001120-0000-1000-8000-00805F9B34FB}';
ReflectedUIServiceClass = '{00001121-0000-1000-8000-00805F9B34FB}';
BasicPringingServiceClass = '{00001122-0000-1000-8000-00805F9B34FB}';
PrintingStatusServiceClass= '{00001123-0000-1000-8000-00805F9B34FB}';
HumanInterfaceDeviceServiceClass = '{00001124-0000-1000-8000-00805F9B34FB}';
HardcopyCableReplacementServiceClass = '{00001125-0000-1000-8000-00805F9B34FB}';
HCRPrintServiceClas = '{00001126-0000-1000-8000-00805F9B34FB}';
HCRScanServiceClass= '{00001127-0000-1000-8000-00805F9B34FB}';
CommonISDNAccessServiceClass = '{00001128-0000-1000-8000-00805F9B34FB}';
VideoConferencingGWServiceClass = '{00001129-0000-1000-8000-00805F9B34FB}';
UDIMTServiceClass = '{0000112A-0000-1000-8000-00805F9B34FB}';
UDITAServiceClass = '{0000112B-0000-1000-8000-00805F9B34FB}';
AudioVideoServiceClass = '{0000112C-0000-1000-8000-00805F9B34FB}';
SIMAccessServiceClass = '{0000112D-0000-1000-8000-00805F9B34FB}';
PnPInformationServiceClass= '{00001200-0000-1000-8000-00805F9B34FB}';
GenericNetworkingServiceClass = '{00001201-0000-1000-8000-00805F9B34FB}';
GenericFileTransferServiceClass = '{00001202-0000-1000-8000-00805F9B34FB}';
GenericAudioServiceClass= '{00001203-0000-1000-8000-00805F9B34FB}';
GenericTelephonyServiceClass = '{00001204-0000-1000-8000-00805F9B34FB}';



Monday, 26 November 2012

Nokia 206 brings new technology, design to classic feature phone



The feature phone is not dead. Nokia is bringing new life to these guys from "back in the day" with their announcement of the Nokia 206 today. So long live the alphanumeric keyboard.

This classic design has a 2.4-inch display and comes in single and dual-SIM versions. The camera is nothing to brag about at 1.3 megapixels and it also has video capture. But the camera is optimized for sharing pictures - let's say on Facebook - at around 700KB. The downsizing is done automatically.

But here is something to brag about. Nokia is claiming 20 hours of talk time in battery life for the single-SIM version, with a 47-day standby mode. That's over month without recharging. The dual-SIM model has a lower 25-day standby time.

As for memory, there is 10 megabytes of user memory, along with a slot that accept a 32-gigabyte SD card.

Nokia did manage to incorporate some nifty technology into the feature phone platform. Their "Slam" technology allows the sharing of items over Bluetooth, but you don't have to pair the phones. Their "Xpress Browser" allows Web browsing using cloud-based servers, which helps to limit excessive data charges and saves the user money.

When the Nokia 206 is available before the end of the year, there will be a choice of five colors - white, cyan, magenta, yellow and black. It'll cost around $62 without carrier subsidies and will be offered in markets outside the United States.

The one thing I can say about the newest feature phone from Nokia is that it's very snazzy.

Visit us on Facebook | Follow on Twitter | Send an email | View Photo Galleries

Tuesday, 20 November 2012

Adding caption to image in form

When you add an image on to your form in Lotus Notes you can specify a caption for that image. In the image properties you will find this option along with where do you want to position this caption.


I usually use this technique to put text on fancy button images. So with just one image resource I can have multiple buttons with each having different text on it. You can even change the font by clicking on the image and then setting font properties in toolbar.



Some limitations of this technique are that the caption cannot be computed and it does not work on web.

Sunday, 18 November 2012

Samsung Galaxy S III, Motorola Photon Q near perfection



I have been in smartphone wonderland for the past few weeks. C Spire Wireless took me there with the Samsung Galaxy S III and the Motorola Photon Q. Both of these devices are on C Spire's 4G LTE network.

I could stop right here and say these smartphones are what dreams are made of, but you need to know the details. With one in each pocket , I found myself reaching for either the Galaxy S III or the Photon Q, depending on what I was doing.

Galaxy S III close to perfect

To keep it simple, the Galaxy S III is just plain nice. The spacious 4.8-inch Super AMOLED display makes other devices seem small, including my iPhone 5, which did grow in height from the previous iPhone models.

This fine example of a smartphone runs Android 4.0.4, also know as Ice Cream Sandwich. It has been working out and shaping up since the Galaxy S II appeared about a year ago.

The Galaxy S III can be packed with 32 gigabytes of memory, compared with 16GB for the S II, and has beefed up to a dual-core 1.5 gigahertz processor, compared with a 1.2 GHz dual-core processor in the earlier version. If you need more storage space, the Galaxy S III can accept a 64GB SD Card, where the Galaxy S II was maxed out at 32GB.

The rear camera remains at 8 megapixels, just like its earlier sibling, but the front camera specifications is down slightly from 2.9 to 1.9 MP. But that shouldn't affect the Galaxy S III Burst Shot feature, which allows 20 continuous shots in a few seconds.

The Galaxy S III is full of cool technology, such as the S Beam feature for transferring photos, video and other documents just by placing it against the back of another Galaxy phone. Even cooler than that is the Smart Stay technology, with keeps the screen from dimming as long as you are staring at the display.

One of my most-watched area of emerging technology is Near Field Communication, or NFC, and the Galaxy S III has it on board, unlike the iPhone 5. By using Samsung's programmable NFC TecTiles stickers and the free TecTile app, this phone can perform all sorts of actions when it comes close to a sticker.

It's as simple as programming a sticker to change a setting, set an alarm or open your social media page. Just place the sticker in a convenient place and a tap will perform the action. You can have some hi-tech moments with the Galaxy S III by getting a package of five TecTile NFC stickers for $14.99.

The Galaxy S III also supports motion gestures to make a call by bringing the phone to your ear or scrolling quickly to the top of a list by tapping twice on the top menu bar.

This device is about as close to perfect as you can get in a smartphone.

The Motorola Photon Q means business

Some smartphones just feels good in your hands and you expect to have a good experience. That's the feeling the Motorola Photon Q gives the user.

This was C Spire's first 4G LTE device when it arrived on the shelves in September featuring a 1.5 GHz dual-core processor, a 4.3-inch touchscreen and 8GB of memory. I'll bet customers were not disappointed.

The first thing you'll notice is the extra ounces in weight that comes from the slide-out QWERTY keyboard. If you do a lot of text messages and accuracy is of utmost importance, the QWERTY keyboard is spacious with five rows of keys that includes a dedicated numbers row.

The keys are outlined with LED lights in low-light situations, which makes them easy to see and gives a nice glow to the keypad. My typing accuracy increased on the Photon Q's keyboard when compared with similar efforts on digital keyboards.

Because the Photon Q seems geared toward the enterprise user, it has business-ready security and encryption for protecting emails, contacts and appointments.

Just like the Galaxy S III, the Photon Q also joins a growing list of smartphones with NFC support to share links, apps using the Android Beam feature.

Android devices gaining market dominance

The Galaxy S III and Photon Q for $199.99 under contracts are good examples of why recent research reports show that the Android platform now owns 72.4% of the smartphone market. While Apple's iOS holds second place, the iPhone is simply being outnumbered by compelling Android devices. It's yet to be seen if the recent Windows Phone 8 platform and the new BlackBerry 10 debut in January will slow down the Android march to dominance. Samsung, Motorola and HTC are strong contenders as Android gathers market share.

Both of these devices run on C Spire's 4G LTE network, which is available in 31 Mississippi markets, with plans to add another 6 by year end. The high-speed 4G network is now the standard and almost a must-have for downloading apps, music, books and other data-intensive functions and services.

If you're looking for smartphones near perfection, look no further than the Galaxy S III and Photon Q. I also like the iPhone 5, minus a few software glitches. I can vouch for these and we'll see how Windows Phone 8 devices are received and keep our fingers crossed for the BlackBerry 10 platform.

These devices should hold you for a while, or at least until the Samsung Galaxy S4 comes along.

Visit us on Facebook | Follow on Twitter | Send an email | View Photo Galleries

Click to become a LifeFlicksTech member

Thursday, 15 November 2012

BlackBerry 10 launch set for Jan. 30; new smartphones unveiled


The BlackBerry 10 interface will include a new feature that will divide the screen into a "Personal" and "Work" display of apps and data.

The BlackBerry 10 launch is scheduled for Jan. 30, where Research in Motion, the smartphone's maker, will unveil the first two BlackBerry 10 Smartphones that will run on the new platform.

This is what a lot of BlackBerry fans have been patiently waiting for, as the iPhone, Android devices and now Windows Phone 8 devices, chip away at the loyalty of RIM’s customers.

The two devices expected to be announced have been rumored to be a touchscreen and a QWERTY keyboard model. The latter will soothe the fears of a lot of diehard BlackBerry fans, since the famous BlackBerry keyboards have been one of the reason for the device's popularity over the years.

According to RIM, the BlackBerry 10 will “create a truly unique mobile computing experience that constantly adapts to your needs” using an approach called BlackBerry Flow that will be unlike any other smartphone in the market.

Other new key features likely to found on the new platform include a new keyboard that will “learn how you write and adapt to how you type” and a feature to balance your personal and business apps and data.

The launch will happen simultaneously in multiple countries. More details will available at the event.

More: BlackBerry 10 to debut new apps

Visit us on Facebook | Follow on Twitter | Send an email | View Photo Galleries

Wednesday, 14 November 2012

Drag out file links from download control to save just like in Gmail

Google adds a lot of interesting features in it products. One of them is dragging a file link in your Gmail on to your desktop (or a folder) to download it. This article on CSS Ninja explains exactly how it is done.

We can also put this feature in our download control so that each file link can be dragged on to your folder to start download without going through save dialog.

Step 1: Identifying the file links in a download control

This is actually pretty simple. XPages by default sets the class name of the file links in download control to xspLinkFileDownload. So all you need to do is to use a simple dojo.query to find all those link and loop through them.

Step 2: Adding attributes to anchor tag

Now you need to set two attributes in the anchor tags of file links - draggable and ondragstart. The draggable attribute needs to be set to true, that's all.

Setting ondragstart requires a bit more details. You need to call event.dataTransfer.setData("DownloadURL", "application/octet-stream:<FILE NAME>:<FILE DOWNLOAD URL>"). Note that while specifying <FILE DOWNLOAD URL> make sure its the complete path start from http://. These attributes can be set using dojo.attr.

So your final JavaScript code looks something like this:


One limitation here is that this only works for Google Chrome. I have put this script block on XSnippets here. Just copy it from there and put it into your XPage.

Monday, 5 November 2012

Franklin Wireless 4G modem a champ with providing Wi-Fi signal

Finally, I can say that I was able to access the Internet at the grandparents house, a low-tech enclave best known as a weekend getaway, along with a dose of tranquility. As relaxing as it is, there is no available Wi-Fi signal within range of the comfortable couches in the family room.

So the lack of being connected to the world was bothering us until I discovered the Franklin Wireless USB Modem from C Spire Wireless. Let’s bump it up a bit and make that a “4G LTE Smart” modem available on what C Spire calls the first “personalizing wireless services” experience.

This device is about the size of a pack of gum and comes with a round USB charger, which plugs into any electrical outlet. The wireless modem plugs into the charger. The entire setup is as simple as a doughnut.

In less than a minute, at least two of the three indicator lights will indicate a Wi-Fi signal with a red glow and, in my case, a 4G signal as a blue glow. Any 3G signal will show as a green glow.

Surrounded by a family tree of photos of past generations from my wife’s family, it was time to bring a heavy presence of technology to the old homestead.

As Featured On EzineArticlesFirst up was a MacBook Pro that connected to the “C Spire 4G LTE Hotspot 3315” in the available Wi-Fi list with no problems. Then an iPhone 5 connected and was off and running on C Spire’s 4G network. The iPad was next in line, followed by an iPhone 4S. Again, no problems connecting.

Since we were having a good time, I decided to go for five devices, which is the maximum number of connections for the Franklin Wireless hotspot modem.

Next on the runway was a Nook Color, my dependable e-reader that I thought might be the curve ball that the Franklin Wireless 4G modem would miss.

But it was another home run for the hotspot modem as my wife and I moved from device to device – enjoying a high-speed Internet connections at the grandparents place that we had wished for in past visits.

The Franklin Wireless modem is super easy to use. The hardest part was inserting the C Spire USIM card, as the sliding cover on the modem can be a little fussy.

The device is designed to turn on automatically when connected to a USB power source using the AC-to-USB adapter or a cigarette lighter USB charger or and external USB battery pack.

You’ll also need to keep in mind that no Wi-Wi password is set by default for the wireless modem and your precious signal will be open to everyone to enjoy. A password can be set by access the Web interface.

The hotspot modem is listed as working with Windows XP through Windows 7 and Mac OS X. Windows XP users will need to install a Remote NDIS driver. I don’t have information on Windows 8 compatibility at this time.

I like this device and if you’re thinking about buying, it’s available online at cspire.com for $29.99 with a two-year contract. Of course, you’ll have to choose a data plan to fit your needs.

The Franklin Wireless Modem will be handy whenever you’re without a Wi-Fi signal. If you’re in C Spire’s coverage area, just look for a power outlet and you’re in business.

Visit us on Facebook | Follow on Twitter | Send an email | View Photo Galleries

Click to become a LifeFlicksTech member

Thursday, 25 October 2012

Getting resources in database as stream in XPages (SSJS / Java)

Some time back I was trying to get the resources in database (to be precise image resource) in my SSJS / Java code. I tried a lot of options like ClassLoader.getResourceAsStream, MyClass.class.getResourceAsStream but no success. Then today while going through the sample database of Extension Library I ran into a piece of code which got the image resource as stream using a single line of code.


As simple as that. In case of Java you would write like this:


In my tests this worked for getting image resources, file resource and style sheets as streams.

Tuesday, 23 October 2012

iPad Mini arrives to battle other 7-inch tablets for dominance

iPad Mini with 7.9-inch display


Now that the iPad Mini has finally been unveiled, the real question is how it will fare among all the other small tablets on the market.

Apple has given us a mini version of previous iPads, with an A5 dual-core chip, a 7.9-inch display, and a starting price of $329 for the 16 GB version. For the 32 GB and 64 GB models, you’ll need $429 and $529 for the latter.

It also has a 10-hour battery life, LTE network capability, updated Wi-Fi performance, and as expected, the new Lightning connector that made a debut on the iPhone 5 and the new iPods announced on Sept. 12. It’s also around 24 percent less in depth than the most recent iPad.

All of these features will certainly attract some attention, especially Apple fans, but the mini Apple wonder does have a few shortcomings. The resolution, which is 1024 x 768, doesn’t stack up with competing tablets and the A5 dual-core processor is from older hardware, being last used in the iPad 2 and the iPhone 4S

Another area of concern is as the holiday shopping season draws near, the price of tablets might be a factor and the iPad Mini might have to struggle to gain buyers with its $329 starting price.

Kindle Fire HD, Google Nexus 7, Nook HD


The iPad Mini will certainly have plenty of competition on the shelves among the seven to eight-inch devices. It requires little time and thought for the Kindle family of e-readers to pop in your head, for all the good reasons. They are considered cheap at a starting price of $179 for the Kindle Paperwhite, or even cheaper if you look at one of the entry-level Kindles for only $69 or one of the other older models still being sold.

For more bells and whistles in the Kindle family, there is the Kindle Fire at $159 and the Kindle Fire HD for $199. But when has been called “one of the best values in the e-reader market” belongs to the $179 Kindle Paperwhite WiFi + 3G, which has free 3G wireless for downloading books anytime and anywhere.

Then the Android family of devices are next with the Google Nexus 7 leading the pack starting at $199, rumors of getting even cheaper soon. The other choice is the Barnes & Noble Nook HD for $199 and some change.

Another new entry in the tablet market is the Insignia Flex that can be found in Best Buy stores around Nov. 1 with a starting price of $239.

I think we can see a trend that tablet prices should not be too far north of $200 to stay competitive and entice consumer to reach for some cash in retail stores or punch the checkout button online. The iPad Mini is way north of that price.

But we’re talking Apple here, with a sense of upscale and quality among all the iDevices. Just maybe the iPad Mini can continue this mystique and bring cause for us to shell out a few more bucks for the latest creation from folks in Cupertino, Calif.

During the special event where the iPad Mini was announced, the education and business markets were highly pitched, so maybe a part of Apple’s strategy for this new device is for schools and enterprise users.

I’m going to put on my consumer hat and say I’ll consider the new iPad Mini. My current iPad now has a Bluetooth keyboard case, which turns it into an almost-a-laptop for tweeting, updating social networks and even creating an article for this blog while on the go. But it’s kind of clunky to hold and awkward to just read articles.

So I need a smaller e-reader for books, newspapers and magazines, along with my favorite apps for consuming content. This task is now handled by my Nook Color, which does a good job as a content reader. But it’s kind of a standalone device, since I don’t have an Android smartphone to have a synced-up relationship with the Android family of devices and their cloud applications.

With the iPad Mini, I could tap into iCloud and have all iDevices in sync with each other. These would include an iMac, MacBook, iPhones, iPod Touch and of course, the new iPad Mini.

My other requirement is that it’ll slip into the inside pocket of my jacket, which the Nook Color, with its 5-inch width, does just that. But the iPad Mini’s 5.3-inch width might be a tight fit or no fit at all. I’ll see about that.

So I could see an iPad Mini in my future as an e-reader, but the price is going to require me sleeping on the idea more than once.

Visit us on Facebook | Follow on Twitter | Send an email | View Photo Galleries

Click to become a LifeFlicksTech member

Friday, 19 October 2012

Using dijit.form.CheckBox in check box group in XPages

dijit.form.CheckBox adds a fancy styling to the plain check box, which I love. Adding it to a single check box is pretty straight forward. Just set the dojoType property of the check box to dijit.form.CheckBox. But in case of check box group its not that straight forward.

When a check box group is rendered in browser it is rendered inside <fieldset> tag. So setting the dojoType property doesn't give the desired result. You need to set the dojoType property individually on each of the check boxes in the group. Fortunately, all the check boxes share the same name so they can be targeted using simple dojo.query.

Let's say the name of your check box group is "checkBoxGroup", then just add this script block to your XPage:


Make sure you place this script block after your check box group. Needless to say that you need to add dijit.form.CheckBox in your XPages resources as Dojo module.

You can also extend this technique to set dijit.form.RadioButton in radio button group.

Wednesday, 17 October 2012

Windows 8 is coming; upgrading or a new device will need a plan

Windows 8 start screen


Windows 8 will be available for sale on Oct. 26 and can be pre-ordered now. So it’s time to start thinking about your game plan for upgrading your existing computers or pondering what kind of device you’ll want in a new purchase.

But there is some confusion about which version of Windows 8 will work for you and the price you’ll pay, along with a long list of choices for new Windows 8 hardware coming down the pikes.

Windows 8 will be available in several versions — one for tablet devices running ARM processors, which will be called Windows RT, and another for desktop PCs that’ll be known as Windows 8 Pro. A consumer version is also in the works and will just be called Windows 8.

As for the price, it’ll depend on whether you per-order the Windows 8 Pro DVD package now and pay $69.99, or wait until the release date on Oct. 26 and pay $39.99 using the Windows 8 upgrade Assistant online.

If you have purchased a new PC after June 2, the upgrade price from say Windows 7 will be around $15, which is not a bad deal.

The other issue with upgrading your existing Windows operating system to Windows 8 will be the licensing or product key dilemma.

According to Microsoft, If your PC is running Windows 7 Home Basic or Home Premium, your files, programs and settings will easily transfer to Windows 8. But if your PC is running Windows 7 Professional or Ultimate, Windows XP or Windows Vista, you will probably need to re-install some programs.

So in a nutshell, you should be able to install Windows 8 on the same PC hardware that powers Windows Vista and Windows 7. Just make sure you have at least a 1 gigahertz or faster processor, 2 gigabytes of RAM, 20 gigabytes of hard drive space and a video card with DirectX 9 graphics and a WDDM driver.

If you have installed Windows 8 Consumer Preview, you should be fine with an upgrade as long as the Consumer Preview was installed over a previous Windows OS.

But if it was installed on a new hard drive with no previous OS, such as if you built a PC, then you can expect a challenge and will need to purchase a new version of Windows 8 for a license and product key.

As you think about whether to upgrade you existing PC or buy something new, keep in the mind that Windows 8 is optimized for touch screens and you might not get the full experience on a desktop PC.

Anyone using a tablet with Windows 8 RT installed will be able to swipe and swoosh away in the new interface. For a desktop or laptop, you’ll have to get use to taking your hand form the keyboard to reach over and touch the screen for a little magic.

As for other choices running Windows 8, there will be somewhat traditional laptops that convert into tablets and tablets with detachable keyboard. They will have screens that’ll slide and flip or completely detach in order to transform from one device to the next.

In addition to the usual notebook PC manufacturers, such as Acer, Asus, Dell, Lenovo, HP, Samsung, Sony and others, Microsoft also will have a dog in the fight with their Surface tablet. This will put Microsoft in direct competition with the Apple iPad's iOS and many of the other manufacturers that also will have Windows 8 on their devices.

So whether your upgrading or buying for the Windows 8 experience, it’s time to start thinking about your plans.

Visit us on Facebook | Follow on Twitter | Send an email | View Photo Galleries

Click to become a LifeFlicksTech member

Monday, 15 October 2012

Japan's SoftBank in talks to acquire 70% stake in Sprint Nextel

SoftBank Corp.,Masayoshi Son
SoftBank Corp. was founded Sept. 3, 1981, with headquarters in the Higashi-shimbashi area of Minato-ku, Tokyo. Masayoshi Son is chairman and CEO.

A deal is in the works for SoftBank Corp,. a Japanese telecommunications conglomerate, to acquire a 70 percent in Sprint Nextel, the number three mobile company in the United States, behind AT&T and Verizon.

Sprint Nextel
This could be the ship coming in for Sprint, as SoftBank will put $12.1 billion on the table to close the deal and then offer another $8 billion investment for network improvements. SoftBank is touting their expertise in the "next-generation wireless networks" and their experience with deployment of LTE in Japan.

SoftBank Corp.
“This transaction provides an excellent opportunity for SoftBank to leverage its expertise in smartphones and next-generation high speed networks, including LTE, to drive the mobile internet revolution in one of the world’s largest markets," said SoftBank Chairman and CEO, Masayoshi Son. "Our track record of innovation, combined with Sprint’s strong brand and local leadership, provides a constructive beginning toward creating a more competitive American wireless market.”

Sprint could use the help with deployment of 4G LTE. They list 24 markets on their website, which is less than competitors like AT&T, who lay claim to the largest 4G network, covering 275 million people and Verizon's 400-plus LTE markets. But Sprint does have plans to roll out 4G services in 20 additional cities in the coming months.

"Our management team is excited to work with SoftBank to learn from their successful deployment of LTE in Japan as we build out our advanced LTE network, improve the customer experience and continue the turnaround of our operations,” said Sprint CEO, Dan Hesse.

SoftBank will form a new U.S. subsidiary, New Sprint, and if the deal passes regulatory approval in the coming months, SoftBank has plans to sweeten the pot with an additional $17 billion investment.

According to Sprint, their headquarters will continue to be in Overland Park, Kansas and Hesse will continue as CEO of New Sprint and as a board member.

More on Softbank: Video profile.

Visit us on Facebook | Follow on Twitter | Send an email | View Photo Galleries

Click to become a LifeFlicksTech member

Tuesday, 9 October 2012

BlackBerry 10 developers hard at work on apps for new platform



As we wait on the BlackBerry 10 platform to arrive sometime early in 2013, Research In Motion says the developers are hard at work creating apps for the new upcoming devices.

Developers have been issued 5,000 BlackBerry Dev Alpha test devices to put their apps through the paces on various BlackBerry 10 projects. We can expect apps from Cisco, Foursquare, Sencha, Gameloft, HalfBrick Studios, Madfinger Games, Funkol and others when the magic time comes.

The developers are hoping to create BlackBerry 10 apps that will entice customers to take a closer look at the new platform.

“The Weather Network is excited to develop for BlackBerry 10," said Gita Ashar, Director of Mobile and Emerging Technologies for Weather Network. "The innovations in the operating system will provide our existing loyal consumers and new consumers an application that is as stunning as it is informative, helping users to plan for anything.”

The developers will work with BlackBerry WebWorks and will use HTML5 and CSS in building apps for the new BB 10 platform.

I know of several die-hard BlackBerry fans that are among the 80 million users that RIM announced in its latest quarterly report. They are patiently awaiting the new devices that are expected in the first quarter of 2013. One in particular is fearful of losing his BlackBerry contacts if he switches to an Android device or the iPhone.

The delay of the BlackBerry 10 devices could turn into a big headache for RIM. The competitors are full steam ahead with innovative hardware that would leave less opportunity for any excitement in the BlackBerry arena.

The Samsung Galaxy S III had been around since May and doing very well in the marketplace. Now we have the iPhone 5, which is setting sales records, despite mapping software woes and other issues being reported by customers.

Next up will be Microsoft and their partners as they roll out new Windows Phone 8 devices later this month. The Nokia 920 and 820, the HTC 8X and 8S and the upcoming Samsung ATIV S are all on deck with Microsoft's unique tiles-based interface. It'll be interesting to see if the Windows 8 devices gain acceptance with consumers.

From the Android camp, the LG Optimus G is likely to draw some excitement, as the specs are pretty impressive with a 13 megapixel camera on the Sprint Nextel version.

All of these devices are likely to attract some BlackBerry fans that are tired of waiting on something new, although some will tough it out. I have one friend who is thinking about leaving her beloved BlackBerry for the Galaxy S III.

The other nightmare for BlackBerry could be the rumored Samsung Galaxy S 4, which could also arrive in the first quarter of 2013. I would think the folks inside the walls of RIM would certainly want to be ahead of this threat with their new BlackBerry 10 platform, along with some outstanding apps.

Let's hope that when the new BlackBerry 10 platform finally arrives, it will be worth the wait.

Visit us on Facebook | Follow on Twitter | Send an email | View Photo Galleries

Click to become a LifeFlicksTech member

Monday, 8 October 2012

Farseer Physics for Windows Store Apps using Monogame

  Last week I did a session on porting XNA Windows Phone 7.x games to Windows Store apps using MonoGame. I have to thank Dean Ellis from the MonoGame project team for all the help. 
 While XNA is not a framework directly supported by Microsoft for Windows Store apps the current version of MonoGame is compatible with Windows 8 and, the most important thing, the applications pass the WACK. There are already several games available in the Windows Store developed using MonoGame (Armed, Skiddy, Rune Legend and I guess there are more). 
   For the session I ended up using the Simple Animation sample but seeing how easy is to share the code between the platforms (Windows, Windows Phone,PC, MAC, iOS, Android, Playstation, Linux) I started looking for a physics engine. The most used Open Source physics engine seems to be Farseer Physics but it was too late to do the porting for my session. On Sunday I tried the porting and everything went pretty smooth. The only thing I've changed was the serialization/de-serialization of the "World" state. I compiled the engine and also the sample. For the Sample project the Content Project was compiled using Visual Studio 2010 (for the moment Visual Studio 2012 doesn't recognize this type of project) and added the xnb's to a Content folder inside the Visual Studio 2012 solution. 
 You can see the result in this YouTube video:


I've used SnagIt to capture the movie and it influenced the frame rate (when running without capturing the framerate is always at 60 fps). The test device was the Samsung Slate which has a powerful cpu. I would love to know if a WinRT device will be able to run at the . If any of my readers has access to a WinRT device please deploy the sample to the device and let me know if the framerate is as expected. For the sample you will have to use an external keyboard and mouse as the touch screen is not working in this version. I will try to fix it for the next release (the problem seems to be inside the MonoGame framework as I only receive the move event and not the pressed and released from the touch screen).
   
Use this link to download the full project (engine and sample): 

NAMASTE





Friday, 5 October 2012

Error of "Invalid field name" while saving form

While working on a legacy Lotus Notes client based application, I did some modifications on a form but while trying to save it I was getting error message "Invalid field name" and the form simply refused to be saved. I checked all the field names trying to find out any invalid character amongst them, but no luck.

So I went to my faithful old friend — Google. And it took me to this discussion on Notes/Domino 8.5 Forum where a user was having the same issue. He resolved it by removing and adding existing sections. Why it happened, he didn't know.

Continue reading »

Thursday, 4 October 2012

Facebook gets a 'Like' from one billion users; offers 'thanks' to us all

Facebook reaches one billion users
Facebook's announcement of reaching one billion users each month was the biggest "like" of their existence.

This was big enough for CEO Mark Zuckerberg to sign his name at the top of the news release. He wanted to give a big "thank you for giving me and my little team the honor of serving you."

I say "well done" to Zuckerberg for having the vision and innovation to make Facebook what it is today. But the toughest part is probably still yet to come, as Facebook is now a public company and expectations are even higher when you're dealing with financial performance.

This kind of growth is not bad for a company that has only been around since 2004. One of their competitors, Linkedin, officially launched a year earlier in May 2003 and they've only managed to attract around 175 million users.

Another competitor in the social media space, MySpace, also launched in 2003 and I hear they're trying to make a comeback after being acquired by Specific Media in June 2011. Twitter — another social media outfit that I like a lot — unveiled their sign in 2006 in the city with the Golden Gate Bridge. Around six years later, I've seen published numbers of 90 to 175 million registered users who say what they want to say in 140 characters or less. If you're looking at total Twitter accounts, the number is estimated to be even higher at around 500 million.

The youngest of the social media bunch — Google+ — is probably the closest challenger to Facebook with around 250 million users since 2011. According to Facebook, they hit 100 million users in August 2008, which is four years after they started up. If you grab a calculator and start pecking around, Google+'s growth rate is on the fast track, but not likely to catch up with Facebook no time soon.

This kind of success makes you wonder what is it about Facebook that causes us to sign on the first thing in the morning, check out mobile devices throughout the day and switch to a new window on the desktop computer when the boss is not looking. Then we run straight home after work home and get on the home computer to check Facebook again and again until after midnight. One billion people just can't get enough of Facebook.

Facebook released a few demographics along with the bragging rights to "one billion users" that give a little insight into what a typical Facebook users might look like.

The typical age was around 26 in the early years and has progressively gotten younger along the way. All of you Facebook buffs have given out 1.13 trillion "likes' since Facebook added the feature in February 2009. The "like button" was acquired from Facebook's acquisition of social networking site FriendFeed during that same year.

When the ability to upload a photo into Facebook was added in the fall of 2006, we all thought that was just grand and have since uploaded around 265 million photos of people, places and things from Brazil, India, Indonesia, Mexico, the United States and other countries.

So Facebook is certainly on its way to being a fairy tale of a company, if it can figure out the Wall Street part and make enough money to gather 'likes" from investors. Since the initial public offering, or IPO, on May 18 when the stock closed at $38.23, it hasn't seen that kind of a price since and remains down about 40 percent for the year.

But despite the stock woes, having one billion users is quite impressive and Facebook's Zuckerberg says it is simply "the things that connect us."

Although I've been hanging out on Google+ more with all the tech fanatics that seem to gather there, I guess I'll go check my Facebook page now.

Visit us on Facebook | Follow on Twitter | Send an email | View Photo Galleries