Showing posts with label windows phone 8. Show all posts
Showing posts with label windows phone 8. Show all posts

Monday, 20 January 2014

Olympic apps are ready to perform for the Sochi 2014 games

If I had a wallet full of one-hundred dollars bills and some time off, I would try and make my way to the Sochi 2014 Paralympic Winter Games in Russia.

But since I'll be around 6,000 miles away, I'll have to rely on technology and all the apps that will keep me up to date on what's going on. The Olympic officials say around 1,650 of the world's best athletes from over 45 countries will compete in five Paralympic sports.

A quick search of the apps stores will bring up a slew of Sochi 2014 apps that are free, although a few will cost from around $1 to $4.

The Olympic organizing committee also has developed their own free Sochi 2014 Guide app for iOS, Android and Windows Phone devices. It'll provide up-to-date information on the events. These apps are for the fans, while the American athletes will get their very own special app.

The AT&T Mobile Application Development group is developing a custom-built application for members of Team USA. The app will be launched by the United States Olympic Committee to help the athletes and coaches communicate and navigate the Olympic and Paralympic events in Sochi.

The app will provide calendar updates, logistics, maps and other information, such as reference guides, athlete handbook, polices and procedures.

By making the Olympic app available, the USOC hopes to avoid distractions for Team USA and allow them to focus on the competition.

In addition to the app, the USOC will used a separate app for managing voice and data usage on smartphones, which are being provided to Team USA athletes, coaches and delegates through a partnership with AT&T and Samsung.

The networking services for the winter games will be provided the NBCUniversal and AT&T, with the idea that people watching the events will do so from multiple devices, including smartphones, tablets, computers and traditional television sets.

So it looks like everything in place on their end. The only thing left to do on our end is to grab a mobile device and download some apps by Feb. 7, which is the start of the winter games. Then you can put you feet up and enjoy all the flips, jumps and sliding until Feb. 23.

Let the games begin.

Visit us on Facebook | Follow on Twitter | LifeFlicks' National and World news

Sunday, 1 December 2013

Waze app provides real-time traffic alerts from community drivers



As I got into my car for my daily commute to work, my latest iPhone app tells me there are 25 other drivers nearby ready to assist me with real-time traffic reports and commuting information.

The commuting information is from Waze, a traffic and navigation app that I have been testing over the past few weeks. I can truly say that it works and also has very impressive GPS capabilities.

The technology behind the Waze app is based on a community of other drivers with the Waze app, or "Wazers" as they like to call themselves. The beauty of the concept is that these drivers are local to your area and drive some of the same routes that you would take every day.

Once in your car, just fire up the Waze app, type in your destination and leave the app open. You'll notice right away that your location is accurately displayed and a little icon tracks your route on a three-dimensional map, or 2D if you prefer. As you drive along, you might notice alerts on traffic jams or simply slow traffic, accidents, road hazards and other information – all in real time. These alerts are coming from other "Wazers" traveling the same route and have submitted alerts along the way.

On my particular route to work, I was alerted of a "car on the shoulder" a few miles down the road. Sure enough, a few minutes later I came upon a stalled vehicle on the right shoulder of the interstate. Amazing.

If you see a need to report the location of an accident or other road hazard alert to share with other drivers, just tap the "report" icon and choose from several options, such as a Traffic Jam, Police, Accident, Hazard or Closure. After choosing which side of the street or interstate, you'll simply choose "submit" and the apps marks the location of where the report button was first pressed. For a traffic jam report, there are "Moderate, Heavy and Standstill" options. A photo can be taken to share with the report.

During another four-hour trip on a major interstate, I came upon slow traffic and knew something was wrong ahead. I fired up the Waze app to discover an accident had been reported a few mile ahead by a fellow Wazer.

The GPS features of the Waze app is amazingly accurate, with the location of my vehicle dead-on in relation to the map on the display. The icon for my vehicle passed through intersections on the map display as I did in real time. When stopped at a red light a few vehicles back from the intersection, that's where my location was on the Waze map. The GPS technology of the Waze app is very impressive, with functions similar to a genuine GPS unit, complete with day and night modes for the display.

As you drive along with Waze, the map automatically zooms in and out, based on the detail being shown on your smartphone display. All gas stations and public landmarks are displayed, such as parks, rivers, lakes and dreams.

Some of the additional features of the Waze app include adding your home and work addresses, as well as Facebook integration to interact and coordinate your trips with your Facebook friends. A tap of the "Gas" icon displays a list of gas stations and fuel prices nearby.

According to the company, Waze is being used by around 50 million people and I would imagine this is growing, as each time I log in, the number of Wazers nearby seemed to have grown. A team of seven developers from Silicon Valley, Israel, the United Kingdom and other locations are responsible for this innovative use of crowd-sourcing with traffic reports and other commuting information.

Waze is free at this time and is available for the iPhone, iPad, Android and Windows Phone devices, with the latest version being 3.7.6, which added a voice-based search for finding addresses and places. Maybe a version for the BlackBerry platform is on the drawing board.

In the latest twist of Waze marketing, Comedian Kevin Hart is lending his voice for turn-by-turn navigation in the app.

I'm sold on the technology of the Waze app and its community-based traffic reporting. I won't leave home without it.

Visit us on Facebook | Follow on Twitter

Saturday, 31 August 2013

Add side menus to an Windows Phone application (similar to the Facebook app)

     It is been a while since my last post, but I have a good reason (on the 20th of July - so tired that the first time I've mistaken the date by one month -  my son Mattia was born and between work and my duties and no sleep there is not much time left for writing on my blog even if I have a lot of posts that I want to do).  
     I will get right to the subject (the title is not one of the best chosen). A few days ago I was talking with my friend Alessandro Scardova about the possibility of implementing side menus inside an Windows Phone application (similar to the ones in the Facebook application). Even if not 100%"Modern UI" design it is a good approach for applications that have multiple options that need to be accessed quickly (also the approach can be applied cross-platform). So I took it as a challange and tried to implement it.
     My initial thought was that I might be able to implement it using an templated panorama or pivot, but after some tests I was not able to get the desired behaviour:


  • when we start the application we will have the selected ViewPort selected
  • swiping left or right we can open/close the side menus
  • also using the buttons on the upper left and on the right corners we can also close and open the side menus
  • the side menus have a width smaller than 480 this way, when opened, we can still see a part of main viewport (including the upper button)
  • when opening the menus the ApplicationBar is not visible
     The solution I have implemented (doesn't use MVVM pattern) it is more a proof of concept on how to implement the functionality. The approach is pretty simple. We have the whole view that we move inside a canvas using manipulations and animations. Initially I thought that I can use only  grid without the canvas and animate the margin of the grid but, as Windows Phone doesn't have ThicknessAnimation, my animations for opening and closing the menus were not very smooth. Also I've tried implementing the swipe behaviour using the Touch.FrameReported event but the results I got were not very good.

     So how does my implementation work:
  • I have a canvas/grid that has a width of 1320 and the height stretches to the whole available height that contains my whole view
  • The view is inserted in a canvas with initial Canvas.Left position set to -420 this way we see the main view port (component)
  • The "stable" positions inside the canvas are:  0: left menu opened, -420: main view and -840:right menu opened
  • When pressing the buttons we will use a resource Storyboard with a  DoubleAnimation to set the the Canvas.Left position inside the canvas to 0,-420 or -840:
  <Canvas.Resources>  
<Storyboard x:Name="moveAnimation">
<DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="(Canvas.Left)" Storyboard.TargetName="LayoutRoot" d:IsOptimized="True" />
</Storyboard>
</Canvas.Resources>

Use the animation to open/close the menus:
  void MoveViewWindow(double left)  
{
_viewMoved = true;
if (left==-420)
ApplicationBar.IsVisible = true;
else
ApplicationBar.IsVisible = false;
((Storyboard)canvas.Resources["moveAnimation"]).SkipToFill();
((DoubleAnimation)((Storyboard)canvas.Resources["moveAnimation"]).Children[0]).To = left;
((Storyboard)canvas.Resources["moveAnimation"]).Begin();
}

  • To implement the swipe I use the ManipulationStarted, ManipulationDelta and ManipulationEnded on the canvas container. On delta we set the Canvas.Left value directly (no need for animations) between a maximum of 0 and a minimum of -840.
  private void canvas_ManipulationDelta(object sender, ManipulationDeltaEventArgs e)  
{
if (e.DeltaManipulation.Translation.X != 0)
Canvas.SetLeft(LayoutRoot, Math.Min(Math.Max(-840, Canvas.GetLeft(LayoutRoot) + e.DeltaManipulation.Translation.X), 0));
}

  • when swiping we also memorize the initial Canvas.Left position. If substracting the final Canvas.Left and the initial one the absolute value is lower then 100 (not a long swipe) we bounce back to the initial position. Otherwise we move to the next position.
  private void canvas_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)  
{
var left = Canvas.GetLeft(LayoutRoot);
if (_viewMoved)
return;
if (Math.Abs(initialPosition - left) < 100)
{
//bouncing back
MoveViewWindow(initialPosition);
return;
}
//change of state
if (initialPosition - left > 0)
{
//slide to the left
if (initialPosition > -420)
MoveViewWindow(-420);
else
MoveViewWindow(-840);
}
else
{
//slide to the right
if (initialPosition< -420)
MoveViewWindow(-420);
else
MoveViewWindow(0);
}
}


  • _viewMoved is used to see if the view was already moved by another event since our manipulation started (like a button was pressed)
   Here are some screenshots from the sample that you can download and play with:

   Hope you will find it useful.

Here is the SOURCE CODE

NAMASTE!

Sunday, 18 August 2013

BlackBerry Q10 is a lot of innovation looking for longtime BB fans

I have been enjoying the company of the BlackBerry Q10 for the past couple of weeks. Some might think this smartphone is too little and too late. I think it's a lot of innovation and I hope it's not too late.

My soft spot for the BlackBerry platform goes all the way back to the trackball or roller ball, and the scroll-wheel days. These devices set the standards for security and email management and were considered the "must have" mobile phone during its heyday, especially for enterprise customers. Now fast forward a decade and the BlackBerry is fighting for survival among the iPhones, Samsung Galaxies, Motorola Droids and a host of other newcomers.

But the latest BlackBerry, the Q10, with the QWERTY physical keyboard for us that remember the good old days, is quite a smartphone and I wouldn't count BlackBerry out just yet. The Q10 is running the new BlackBerry 10 operating system, which is supposed to propel the BlackBerry devices into the future of smartphone innovation.

Straight out of the box from Verizon Wireless, this devices has a feeling of quality, with a textured back, rounded, smooth edges and an extremely tight fit. You can't help but notice the keyboard occupying the lower one third of the Q10's 4.7 inches in height. Then you're left with a 3.1-inch display, which is small by today's smartphones standards, but gets the job the done.

I guess having a 1.5 gigahertz dual-core processor is fine for now, but if BlackBerry is going to compete with its most fierce competitors, such as Apple, Samsung, HTC and LG, it will need to move into the quad-core territory.

I can stand behind the Q10's 8 megapixel camera though, especially in low-light situations. I shot some gorgeous photos just before sundown, with some of them in dark shadows. The colors were vibrant, life-like and impressive for a smartphone camera.

When I was setting up all my various social media and email accounts on the Q10, I was surprised to see integration for Evernote, a popular online note management application, become a part of the BlackBerry's Remember app. Now that falls into the very useful and cool category. As a heavy Evernote user, I like it and was thrilled to see this feature integrated into the Q10.

Here is one of the reasons I still think the BlackBerry has a fighting chance. When I look at the iPhone home screen, I see 24 icons with various red numbers in rounded-corner boxes. When I look at the Q10's home screen, I see my next appointment, which in was in 41 minutes on this particular day, along with "new' email and voice mail notifications. The synergy between all the calendars, social media accounts, task keepers, messages and multiple email services is nothing short of amazing. The Q10 became my go-to device to see what's happening next in my schedule.

I also like the shortcuts built into the device. From the home screen, you can just type "text" to begin sending a message, or "c" to call someone, or "T" to jump to the top of any page.

I did find it odd that Web pages don't rotate when you rotate the device, but fell in love with the "Reader" feature, where information comes up in plain-text view with no other distractions. You'll find this little nifty feature under the menu while visiting Web pages that contain articles to read.

I also don't know if the BlackBerry platform will ever catch up with Apple and Android in the number of apps available, and now even Windows Phone 8, who has also passed the 100,000 mark and iOS and Android marches toward one million. But I do know there are some good ones available for BlackBerry and one of the first apps I tried out for the Q10 is the famous BlackBerry "Password Keeper." It's as rock solid as ever and still sets the standard for password apps.

With all the talk from the BlackBerry corporate board about finding a buyer, exploring joint ventures or going into a partnership, it's hard to imagine to what's next for BlackBerry and their smartphones. The PlayBook tablet bit the dust a couple of months ago and might not resurface under the BlackBerry 10 operating system.

I think the BlackBerry will be around for years to come and will remain competitive. The Q10 is available from Verizon Wireless for around $200 under contract.

But here's one last effort to bring some traction the BlackBerry and especially the Q10. It's kind of a "Back to the Future" approach, which is to bring back the trackball in the land of touchscreens, much like the BlackBerry Bold 9930. I find it difficult to place and move the cursor around when editing text on this BlackBerry. Sometimes, you need to back up when writing a sentence to make a correction or insert a word and there are no arrows keys on the Q10's keyboard to move left, right, up and down.

I found the physical keyboard on the Q10 to be comfortable and precise. I made less typing mistakes than with a touchscreen device. The Q10's touchscreen above the keyboard was wonderful for swooshing from screen to screen, launching apps and getting into the Hub.

If I had only had a trackball, I would have had the best of all worlds — a touchscreen, physical keyboard and a quick, precise method to manage the cursor without having to go to the touchscreen.

Then the BackBerry Q10 could lead the way back into the game as the powerhouse among the business users, just like in the old days. Now that's something to think about.

Visit us on Facebook | Follow on Twitter

Wednesday, 14 August 2013

Samsung ATIV S Neo is Sprint's 2nd Windows Phone 8 smartphone

The Samsung ATIV S Neo is coming to Sprint on Friday. This will be Sprint's second Windows Phone 8 smartphone of the year, with the HTC 8XT being the first WP8 device earlier this summer.

The ATIV S Neo will be sporting a 4.8-inch display with a 1.4 gigahertz dual-core processor under the hood, which falls short when compared with some of the other high-powered quad-core smartphones, such as the 1.9 GHz Samsung Galaxy S4 or the LG Optimus G Pro at 1.7 GHz of processing power. You can also add 1 gigabyte of RAM and 16 GB if internal storage to the balance sheet.

The battery is a respectable 2,000 mAh lithium-ion, but there are other devices out there with larger capacity. The good news is that the ATIV S Neo features ATIV Beam for sharing photos, music and video with other WP8 devices using the NFC technology.

For snapshots, Sprint's WP8 baby has a eight-megapixel camera with LED flash and a 1.9 MP camera for video chats and self-portraits.

Despite a few shortcomings, the ATIV S Neo still might worth a test drive for WP8 fans. It'll only cost you $150 under contract if you want to take it home.

Visit us on Facebook | Follow on Twitter

Monday, 27 May 2013

Samsung London event offers a hint to new Galaxy and ATIV devices

Samsung chose Memorial Day, when our minds are not on hot tech news, to roll out a teaser for an event on Thursday, June 20, in London.

The hints in their poster point to maybe new Galaxy and ATIV devices, which means Android and Windows 8 flavored announcements. Then we have images of some pretty thin devices that might could be a tablet, laptop and something that resembles a camera lens.

Samsung announced Windows 8 devices just under a year ago at a conference in Berlin, Germany, which included a two notebooks and a smartphone, called the ATIV S. Since the launch of these devices, the ATIV S has suffered several delays and has not gained much traction among carriers in the United States.

The Samsung ATIV smart PC is currently available from AT&T, while the Samsung ATIV Odyssey smartphone is available from Verizon Wireless.

Maybe the London event will bring new features to these devices. So circle June 20 on your calendar for the latest tech news from the Samsung camp.

Visit us on Facebook | Follow on Twitter

Sunday, 24 March 2013

Small tip on XAudio2 for Windows Phone

     While debugging one of my Windows Phone applications on the device I've noticed that after the debug session the battery of the device drained faster than usual (so I always restarted the device after using it for debugging). Initially I thought it was the Bluetooth driver but I saw that if I stop the XAudio2 engine when my application gets suspended and re-enable it when the application resumes my battery drains "normally". This should be a best practice as your application doesn't really need the engine when it gets suspended. So:


NAMASTE

Tuesday, 8 January 2013

The 2013 CES is a haven for gadgets and technology enthusiasts

Members of the media enjoy a sneak peak of what's to come at this year's CES event.

The 2013 International Consumer Electronics Show is underway and Las Vegas is the place to be this week for gadget lovers.

The keynote addresses will kick things off today, with Kazuhiro Tsuga, president of Panasonic Corp. leading the way. Tsunga was to share to his vision for the future and elaborate on how Panasonic is engineering a better world for us all.

We'll also hear from Gary Shapiro, president and CEO of CEA, and Lowell McAdam, chairmen and CEO of Verizon.

As we know from previous years, Apple Inc. will not be in the house and Microsoft was on tap on a keynote appearance, but I hear that Chairman Steve Ballmer worked in a few comments on the new Windows RT and Windows Phone 8 devices.

It didn't take long for gadget news to start filtering out from the convention booths at the Las Vegas Convention Center/Hilton and The Venetian.

Huawei, a leading global information and communications technology company, has already primed the pump, with their announcement of the world's largest smartphone. It's called the Ascent Mate and sports a whooping 6.1-inch display, a 1.5 GHz quad-core display and a 4050 mAh battery under the hood. We'll learn more about this trend-setter in the coming months.

The Near Field Communication technology is also on the move, with early announcements coming Samsung on NFC Bluetooth speakers and Asus rolling out their 10.1-inch VivoTab Windows 8 tablet.

Sprint is also using CES to announce their Microsoft Windows Phone 8 plans. They'll have two WP8 devices coming this summer — one from Samsung and another from HTC. So get ready for Live Tiles and SkyDrive features from the guys in yellow.

Let's also not forget the auto makers, as Ford and USA Today have teamed up for an app and Ford SYNC integration to allow drivers to just tell their car to listen to sport stories or the latest news. I imagine we can expect similar technology from other auto manufacturers.

The fitness craze is continuing to spark innovation with the announcement of the Fitbit Flex, a Bluetooth wristband that help track the progress of your workouts to help meet your goals. According to the company, it'll also monitor your sleep quality.

Another early mover out of the gate is Coby Electronics Corporation, with their LED TVs, Bluetooth speakers, headphones and earbuds. This New York company has been making consumer electronics products since 1991 and continue to carve out a place in the industry.

This is just the first day of CES and the best is yet to come. It's going to be a good week for technology.

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

Click to become a LifeFlicksTech member

Wednesday, 2 January 2013

Saving the Windows Phone 8 Emulator State

    Saving the emulator state between runs was one of the feature needed for the Windows Phone emulator, but till now it is not officially supported. It even makes more sense now when the Windows Phone 8 emulator is a full working operating system and not a trimmed one like Windows Phone 7/7.5 was. You could configure an email account, personalize the start screen, install some applications, install certificates or even save the state of an application that requires a lot of data to synchronize before the actual debugging and have everything ready the next time you start the emulator.
   Today I was trying to run the Windows Phone 8 emulator on a Parallels 8 machine using this post because I hate Windows 8 performance in Bootcamp (the disk access is crappy and the UEFI mode still needs drivers for sound, video and a way to enable Hyper-V). I observed that the first time you run an Windows Phone emulator it took more than 40 seconds to start. The reason is that the SDK creates a new Virtual Machine in Hyper-V and saves a "clean" snapshot of it.

       On every subsequent run of that emulator the XDE automatically starts the virtual machine and immediately applies the snapshot (or starts the virtual machine from the snapshot directly). What caught my attention was the name of the snapshot for each virtual machine: 
  1. Emulator 720P - snapshot.720x1280.1024
  2. Emulator WVGA 512MB - snapshot.480x800.512
  3. Emulator WVGA - snapshot.480x800.1024
  4. Emulator WXGA - snapshot.768x1280.1024
     I tried and messed up the names and observed that XDE, if it doesn't see a certain Snapshot, it starts the Virtual Machine and creates a new snapshot with the required name. So in order to save the state it would be enough to alter/change the snapshot XDE uses to start the virtual machine. 
      First we need to start the emulator we want to personalize (in this post i will mess up the 512 WVGA emulator). This can be done in two ways:
  1. From Visual Studio by running a program on that emulator or from Application Deployment (the emulator is easy to personalize because you can zoom the content and you have the hardware buttons but will require a subsequent reset of the Virtual Machine from Hyper-V) 
  2. From Hyper-V manager by starting the Emulator WVGA 512MB virtual machine and applying the saved snapshot for a fast start. After the machine starts you will have to connect to it:

    Once connected to the emulator/virtual machine you can personalize/modify the way you want it to be. If you connected using Hyper-V these keyboard shortcuts will prove helpful (they also work in the emulator):


  • F1 - the same as pressing the back button
  • F2 – the same as pressing the home button
  • PageUp  - enables physical keyboard and minimizes the software keyboard
  • PageDown – disables physical keyboard and maximizes the software keyboard
  • F9 - volume up
  • F10 - volume down
  • F7 – invoke camera
  • F3 – invoke Bing search
If you want/need to install some xap's you can use Application Deployment with the Emulator. 
When you've reached the desired state go to the Hyper-V manager, select the Virtual machine that you are personalizing and hit Snapshot. This will create a new Snapshot(save state for the emulator).

If you've started the emulator from Visual Studio or Application Deployment App before you create the snapshot you will have to connect to the Virtual Machine from Hyper-V and from the menu Action select Reset (this will clean the ports used for debugging and the state you will save will be usable for Visual Studio and XDE).

After saving the new state the only thing you have to do is to rename the snapshot with the same name of the parent snapshot and delete the parent by right-clicking on it and select Delete Snapshot (DO NOT select Delete Snapshot Subtree).

You are now ready to go:  Turn Off the virtual machine from Hyper-V and try it from Visual Studio. Everything should work. If it doesn't it means that the state has some ports that Visual Studio uses still opened and in this case you will have to connect to the Virtual Machine from Hyper-V, Reset the machine from Action and save a new Snapshot.


My personalized emulator looks like this:


If you want to get back to an "unaltered" state just delete the snapshot of the corresponding Virtual Machine from Hyper-V Manager.


Hope saving the emulator state will help you in some scenarios.

NAMASTE!

Tuesday, 1 January 2013

GetNativeSystemInfo on Windows Phone 8

  This post is related/continues my previous one. I have written a small sample that shows how to call the GetNativeSystemInfo and IsProcessorFeaturePresent functions on Windows Phone 8 devices using a  C++ runtime component. For the moment I cannot think of a really good use for calling these functions because there are only two processors on the devices currently available. You could detect which of the two processors the device has and also its features. 
    Here is a screenshot of the sample running on my Nokia Lumia 920:



As it is the first day of the new year I Wish you all a great 2013!

SOURCE CODE

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!

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



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

Tuesday, 11 September 2012

The new iPhone arrives today facing tough challengers



Today is the big day for Apple Inc. to show the world the next iPhone, which might be called the iPhone 5.

This device will be the sixth generation of the iPhone since Jan. 9, 2007, when Apple unveiled the original iPhone to revolutionize the mobile landscape.

When the original iPhone arrived, most the mobile handset manufacturers, such as Nokia, Motorola, Samsung, HTC, RIM's BlackBerry and other were using QWERTY or alphanumeric keypads, along with small displays and navigational buttons.

There has been some early attempts at touchscreen technology by Nokia, IBM with the Simon Personal Communicator, Ericsson, HP, Palm and a few others.

But the first-generation iPhone got everything right and brought in a new era of touchscreen displays, icons, digital keypads and something called apps in 2008.

Now today's smartphones are just as smart and innovative as the iPhone and it's going to be tough for Apple to stay ahead of the pack and continue to hit home runs. There are touchscreens galore, apps, voice commands and music stores. The emerging Near Field Communication, or NFC technology, is already included on several recent mobile devices and should be a must-have for the new iPhone.

When the Android platform arrived, Apple's job became tougher and the Windows Phone 8 operating system is getting ready for their shot at iOS. The latest Nokia Lumia and Samsung Ativ announcements using WP8 are not to be taken lightly.

We should know today if Apple still has it what takes to set themselves apart from the competition with the latest iPhone.

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

Click to become a LifeFlicksTech member

Wednesday, 5 September 2012

Nokia Lumia 920, 820 joins Microsoft Windows Phone 8 camp

Nokia and Microsoft launched new Windows 8 smartphones today at a press event in New York. We can say hello to the Lumia 920 and 820 devices.

The two longtime technology powerhouses, who have been in a partnership since February 2011, vowed to use their "complementary strengths and expertise create market-leading mobile products."

The new Lumia 920 smartphone is chock full of new features, such as PureMotion HD+, wireless charging and Nokia's PureView camera technology, first seen on the PureView 41 megapixel phone announced earlier this year. The 920 will have a 8 megapixel camera.

This new device, shown in a new yellow color that Nokia says won' scratch off, is powered by a sizable 2000mAh battery and a Qualcomm 1.5 GHz dual-core Snapdragon S4 processor. It'll also be available in red and gray.

Nokia is bring their notable mapping technology to the Lumia 920 that'll include daily commute drive times, routes and walking directions, indoor maps and Augmented Reality using the City Lens app while exploring your surrounding.

The live tiles in the Windows Phone 8 can be customized to show difference sizes for apps and other information that updates automatically. A new feature is the ability to capture screenshots and share them like regular photos and videos. A pinch and zoom feature is now available.

Probably the most unique feature for the Lumia 920 is the wireless charging and the accessories that support it. A "Fatboy" charging pillow, plates and stands will keep the 920 charged and ready to go. For music lovers, JBL Power Up wireless speakers headphones with Near Field Communication, or NFC, will require just a tap to transfer audio from the phone to speaker.

Nokia also announced that Nokia Music in the United States.

The Nokia Lumia 820 has many of the same features as it's more power sibling, such as NFC, City Lens and Carl Zeiss optics. The 820 is powered by a smaller, 1650mAh battery.

Nokia is banking on Microsoft's Windows 8 operating system to regain the prominence they once held in the mobile phones industry. While a few devices still use Nokia's longtime Symbian operating system, these new devices are hoping Microsoft's unique tiles display will gain traction among consumers who are also being bombarded with Android and iOS smartphone choices.

Samsung also is on-board with Windows Phone 8, as they announced their new Ativ devices last week. But some say they were only prototypes and the real devices are coming soon.

The Lumia 920 and 820 are the latest devices to get behind Microsoft's new mobile platform.

Now it's up to the consumers to give the new OS and the new phones a thumbs up.

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

Click to become a LifeFlicksTech member

Tuesday, 4 September 2012

What MediaLibrary needs/is missing (Windows Phone)


      As we (average developers :) ) still don’t have access to the Windows Phone 8 SDK I decided to write a post on the current MediaLibrary limitations for Windows Phone. I only hope that someone from the team will read this post and maybe there is still time to improve some aspects in the new version. Everything here is my personal  opinion.

So what is missing from the MediaLibrary?

1.     The Token property exposed on the Picture object

The most important for me. Why? Let’s open Internet Explorer on the emulator and go on a webpage that has a picture in it, tap-n-hold and save it twice. If we use Windows Phone commands to launch the Pictures hub in the emulator and go to the Saved pictures album we will see both pictures (same picture but different items). Now let’s create a new project and see what we can get using the MediaLibrary class. I will use this simple code to debug and stop on the pictures to watch its properties:

MediaLibrary ml = new MediaLibrary();
//MediaPlayer.Queue.ToString(); ;
varalbums = ml.RootPictureAlbum.Albums;
foreach(var album in albums)
if (album.Pictures.Count>0)
foreach(Picture pct in album.Pictures)
{
boolstophere = true;
}


  
We can see both pictures but the BIG problem is that the only way to differentiate between the two of them is the Date property (not very elegant, Handle is not public property). The Token property  makes a lot of sense to tell which picture is which (maybe also a Path member could be added but Token is way better as we already have the method to open a picture from its Token and you won't have to iterate all the MediaLibrary just to get the picture we want).

This property should be fairly easy to add as it already exists internally (when we use the PhotoChooser we will get the token associated with the selected picture and we will be able to open the picture) . 

The token could be extended also to the PictureAlbum class. It doesn’t make much sense to iterate the MediaLibrary to find a specific album if I already know what PictureAlbum I want.

2.     The possibility to create new picture albums

In this moment the Pictures Hub already has built-in albums but it is not possible to create new albums directly from the phone. It is possible to do it from Zune (which will not be used anymore) but it is not a trivial task (at least till you understand how it works). So we are mainly stuck with two “containers”: Camera Roll and Saved Pictures which is not enough for a device that theoretically could hold up more than 1GB of photos. From here the need to have tools to organize your photos better by creating new albums and copying/moving photos between albums. Maybe it is a little late to implement it in the "standard" WP8 UI as we are two months away from the official launch of the first phones on the market but maybe not too late to add the functionality in the development tools so the developers can implement it in their apps. This way a photo app could create its album and then the users will know in which album to look when they want to find pictures modified/created by a certain app.

3.     Access to the videos on the device

Needed since the first version of windows phone but still no sign of it. Videos are an important part of the device media and developers need access to this part of the MediaLibrary to enable applications like video processing, video backup, video creation and more.

4.     Make the Favorites Pictures album work

This functionality already exists in the Windows Phone Mango/Tango but it doesn’t work in the current version of the SDK. I’ve already posted a question on the forum with no answer till now. The count of the Favorites album is always 0.


5.     Enable MediaLibrary access in the background task

Useful for applications that want to backup the pictures from the device automatically. If it’s a problem of security see 6 but if the user already agreed at some point (capabilities, ask permission) it doesn’t make sense to lock the access to the medialibrary from the background tasks.

6.    Security/capabilities

I think the current ID_CAP_MEDIALIB  is too generic. It would be better to have specific CAP for pictures, videos and songs. They are pretty distinctive and a photo editor wouldn't need access to the songs on the device? Also the user should be warned that his photos might contain GPS data in the EXIF header and he should agree to let the application access those informations.

P.S. Almost all of the features requested are already implemented in the iOS development tools.

NAMASTE

Friday, 31 August 2012

Windows Phone 8 inside VMWare

    More than a month ago some Microsoft guy in Asia made a terrible mistake and the LKG25 of Windows Phone 8 SDK leaked to the web. As I am not one of the lucky people that are the development program (as Mary Jo Foley suspected in a tweet and I believe it is true) I was more than happy when I got my hands onto the leaked version. At start I wanted to start blogging about the news that Windows Phone 8 will bring, but then I decided that it wouldn't be fair so I will wait until the official SDK. This post is not intended as a spoiler of any feature from WP8, but more like a proof of concept.
    I am sure many of you read on twitter that the new emulator is a virtual x86 machine and it comes with the virtual hard drive (.vhd file) divided on the screen resolutions.
    The idea came to me today while I was installing a clean virtual machine for development. Till now developing in a virtual machine for Windows Phone and debugging on the emulator with a decent speed/quality was impossible as you would have a virtual machines inside a virtual machine that degrades the performance exponentially. So what if you could have the development environment inside a virtual machine and then the emulator on another virtual machine that runs side by side and communicate on TCP/IP. In this case the performance of the emulator would be good (as it is not a vm inside a vm) and also the speed of the development environment would be acceptable. The virtual machine for the emulator would need 512MB or a maximum of 1GB.
     So the first thing I did is to install a trial version of VMWare Workstation 9 (should work with VMWare Fusion and also Parallels/VirtualBox). Then I have used WinIMAGE to convert the Flash.vhd file to Flash.vmdk which is the format that VMWare uses and created a virtual machine where I've attached the newly created vmdk.


     The good news is that the virtual machine works in VMWare right from the start. Not everything works (more decent is to say that some things work :) ) but hey it runs and I did nothing. The networking is not working but the most annoying part is the mouse pointer which is invisible in the virtual machine so I am blind pressing the mouse and at some point I am able to hit some buttons as you can see in the video :



More important than what this video shows (which is almost nothing) is what it could mean (even if I doubt we will see any of these in the near feature)


  • Theoretically developing for Windows Phone 8 on Windows 7 should be possible and not so hard to achieve (the partition where I installed Vmware Workstation runs Windows 7)

  • With some collaboration between Microsoft and VMWare/Parallels it would be possible to develop on a virtual machine and debug/deploy on the emulator which is another virtual machine. This would be great for Mac users but also for everyone (I might say like me) that likes to keep his development environments clean and separated from each other (I have a VM with VS2008 and Compact Framework, soon VS2010 will pass in a virtual machine too, I don't want to install VS2010 on my Windows 8 partition etc.)


  • The emulator is an x86 virtual machine so it shouldn't be so hard to achieve plug-gable hardware into the emulator (like connect the webcam to the emulator camera, storage card to an USB key or shared folder, NFC hardware - here I might be mistaking but should be a serial connection after all). It would give us a better development environment.

P.S. Seeing that it is a virtual machine I beg the team which is in charge of the emulator to SAVE the emulator/virtual machine state between resets. It is really annoying to always start from 0 and none of the other major mobile platforms has this limitation.


Till next time NAMASTE to you my reader.