Tuesday, 16 April 2013

3 ways to force the WebBrowser control to logout from Facebook

     Decided to write this post because it took me some time to find the answer. Maybe you already know that if you use OAuth Facebook connect inside your Windows Phone application there is one step where you use the WebBrowser control to let the user authenticate on the Facebook server and authorize your app. The "problem" presents itself when you want to link another user because the WebBrowser control has already memorized the old credentials and will automatically use them. What needs to be done is to logout the old user from the WebBrowser without actually telling the user to go on the web page and click logout. I have found 3 easy ways to do that: the first two will work on both Windows Phone 7.x and Windows Phone 8 and are Facebook specific and the third one will only work on Windows Phone 8 (generic method for OAuth providers). The 3 methods can use the WebBrowser control headless (you don't actually have to show the WebBrowser control to the user and don't even have to have the webbrowser attached to a Page):  

Method 1: described by Rene Schulte in this blog post  
The method constructs the logout Uri using your AppId and a SessionKey that is obtained from the AccessToken you got when the user authenticated.

Get the SessionKey:
  private static string ExtractSessionKeyFromAccessToken(string accessToken)  
{
if (!String.IsNullOrEmpty(accessToken))
{
var parts = accessToken.Split('|');
if (parts.Length > 2)
{
return parts[1];
}
}
return String.Empty;
}

Obtain the logout Uri:
  public Uri GetLogoutUri(FacebookCredentials credentials)  
{
var sessionkey = ExtractSessionKeyFromAccessToken(credentials.AccessToken);
var url = String.Format("http://facebook.com/logout.php?app_key={0}&session_key={1}&next={2}", EndpointData.FacebookAppId, sessionkey, EndpointData.FacebookLogoutCallbackUrl);
return new Uri(url);
}

Make the WebBrowser navigate to the logout Uri:
 Browser.Navigate(FacebookService.GetLogoutUri(EndpointData.Settings.Facebook));  

Method 2:
If for some reason you don't have the Facebook AppId available (my case) you can use the WebBrowser to navigate to the Logout page https://www.facebook.com/logout.php and after the page gets loaded you just execute the script document.forms['logout_form']:
 wb.LoadCompleted += wb_LoadCompleted;  
wb.Navigate(new Uri("https://www.facebook.com/logout.php"));
Once the page gets loaded:
 void wb_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e)  
{
wb.LoadCompleted -= wb_LoadCompleted;
if (wb.SaveToString().Contains("logout_form"))
wb.InvokeScript("eval", "document.forms['logout_form'].submit();");
}

Method 3:
This is the easiest one, but will only work on Windows Phone 8: call the new WebBrowser async method ClearCookiesAsync(). This method works for every OAuth provider (Dropbox, Box, Skydrive, Picasa, Flickr, Google Drive... infinite list).

NAMASTE

Monday, 8 April 2013

Verizon's 4G LTE Router offers the ultimate mobile Wi-Fi experience

If you're looking for the ultimate in on-the-go Internet access with the reliability of a good old-fashioned home or business wired service, then a router with wireless capabilities will fill your needs.

The 4G LTE Router from Verizon Wireless takes the concept of a wired router and adds a twist with two antennas to make adaptable for mobile duty. You'll feel right a home with several ports on the back that even include a WAN port for connecting to the Internet via cable or DSL, four ethernet ports for desktop or laptops wired connections, a power button and a power adapter input.

Then it really gets good. For wireless connections when out and about, a Verizon SIM card needs to be in place and the two antennas attached. Plug it in and look for the router in the list of available wireless networks. You should be in business now and the only thing left to do is to add a password to protect your device from WI-Fi prowlers.

This device differs from a regular mobile hotspot in that you have access to ethernet ports for wired connections, even though you're using a wireless Internet signal. That feature alone makes the Verizon router worth a look to consider the $99.99 cost after a $50 mail-in rebate with a new two-year customer agreement.

If you find yourself on vacation, a business trip or suddenly out in the boondocks, but you need to go online, this device will get you there at download speeds of 5 to 12 Mbps and average upload speeds of 2 to 5 Mbps.

A 4G wireless router is the way to go for mobile online needs or an office away from the office.

Thursday, 4 April 2013

HTC First - Facebook dedicated smartphone

Few weeks of rumors and speculations and here we have - new HTC device, called HTC First and created together with (and for!) Facebook. It's surely not a flagship model, but also not a low-end device.

Actually it has quite nice specifications:

  • Platform: Android 4.1
  • Processor: Qualcomm® MSM8930AA 1.4Ghz, dual-core
  • Memory: 16 GB, 1 GB RAM
  • GSM 850/900/1800/1900/2100, HSDPA 21/5.76, LTE 4/17
  • Display: 4.3-inch, HD 720p
  • Battery: 2000mAh (non-removable)
  • Main camera: 5 MP camera with auto focus, LED flash, BSI sensor, f/2.0 aperture, 28mm lens, 1080p video recording
  • Front camera: 1.6 MP camera
  • Dimensions: 4.96 x 2.56 x 0.35 (in) (LxWxT)
  • Weight: 4.37 oz

What is special about this device, is very deep Facebook integration. It has its own Facebook launcher instead of HTC Sense launcher. What else?

  • Cover feed: A constant, fresh stream of photos and updates from your newsfeed, cover feed is always present when you wake up your phone.  It lets you stay up-to-date on your friends’ latest activities in real-time, all the time.  You can swipe through to see more photos and updates, double tap to “like” a post and comment right from cover feed.  To learn more about cover feed, check out this video.
  • Notifications: Notifications from apps and friends appear right on your home screen.  It’s easier to see when you have a missed call, calendar reminder or new message. Open a notification with a double tap or clear them away to see your Cover Feed.  To learn more about notifications, check out this video.
  • Chat Heads: The mobile messenger lets you jump in and out of conversations while you do other things, like watch a video and browse the web.  Reply right from chat heads, or move them around if you're not ready to respond. Plus you can send and receive texts and Facebook messages from the same spot.  To learn more about chat heads, check out this video.
  • App Launcher:  See your favorite apps and post right to Facebook from the same spot. You choose what’s on your app launcher—press and hold an app then drag it anywhere.
  • Instagram:  HTC First is the only phone that comes with Instagram pre-loaded.

Personally, I'm very curious how this device will work with its custom launcher and what will be customers judgement. I think it has a huge potential. The idea of new custom launcher is more then interesting. Let's take a quick pick how it looks like:





To me, it seems to be very simplified version of Android launcher. It might be a great choice for users who are not expecting their phone to be multimedia all-in-one device, but they want to easily stay in touch with their friends using the most popular social channel. There is also Instagram pre-installed, so sharing your great moments captured with 5 MP back camera will be easy as well. Additionally, it is very likely that the overall system performance in HTC First will be very good. Qualcomm 1.4 GHz dual-core CPU in pair with 1GB of RAM memory will probably bring you smooth user interface experience, considering the fact that device doesn't have pretty heavy HTC Sense on board. So, do you think it is a device for you?

Have any questions or comments? Feel free to share! Also, if you like this article, please use media sharing buttons (Twitter, G+, Facebook) down this post!



Facebook unveils a new home screen for Android devices



It was a big day for Facebook, as Chairman and CEO Mark Zuckerberg, unveiled "Facebook Home," a slick interface for the Android operation system that brings messages, photos and recent stories to the home screen of your Android smartphone.

Smartphone manufacturer HTC also announced the HTC First, the first device to have the Facebook Home interface incorporated into the Android OS. It'll also come pre-loaded with Instagram, which is another popular photo-sharing service owned by Facebook that utilizes a twist of photo filters for cool effects.

The Facebook gurus views the home screen as "the soul of your phone" and offers an alternative with Facebook Home, which does not need to open an app to see all your social media connections.

The ingenuity with Home begins with a virtual button at the bottom of your display that shows your face. A simple swipe up and it shows all your regular apps or you can swipe it away to hide them all.



Then the beauty of the Home interface shines with a feature called "Chat Heads," which allows messages you receive to pop up over any application currently running. A conversation can be held with your Facebook friends on top of – let's say – while using the Internet browser. The chats can be dragged around the screen and when you're done, just tap and they're gone.



Another unique feature of the Home overlay is that some of this social media interaction can go on while the phone is still locked by using called Cover Feed. This feature will allow a steady stream of photos, likes, comments and status updates from your newsfeed.

The new features will be available on April 12 on the HTC First, a 4G LTE device that will come in red, baby blue, white and black. It'll be available exclusively from AT&T for $99.99 and is now available for pre-order.

Several other Android smartphone with the latest version of the Facebook and Messenger apps will also be Home friendly. They include the HTC One, One X, One X Plus, Samsung Galaxy S3, Note 2 and the S4 when it is launched. Android tablets will come on board later, but there is not indication of when Home will play with iOS devices.

Facebook sees their new Home interface as a way to flip the smartphone home-screen experience from being designed around apps to being designed around people.

We'll have to wait and see if their latest creation gets any "Likes" from its one billion users.

Visit us on Facebook | Follow on Twitter | Send an email

Tuesday, 2 April 2013

Smooth scrolling content on Windows Phone

     Gotta say that I am not 100% satisfied about the title of this blog post, but since I haven't found a better one I will use this one (don't get it wrong windows phone has smooth scrolling implemented). This post is focusing on how to smooth scroll the content of a ScrollViewer. If you are using the ScrollViewer you know that it already has the method ScrollToVerticalOffset that can be used to manually scroll the content but this method doesn't have any animation implemented so you will see only a fast redraw of the new content without getting the "feeling" that the content scrolled to the new position. The easiest way to achieve this task would be using a StoryBoard with an Animation on the property VerticalOffset of the ScrollViewer, but VerticalOffset is a read-only property so it cannot be set and therefore cannot be used for animation.
     The solution I found was to build a custom control and add a custom property that can be used as a target for a DoubleAnimation. The attached sample (see the link at the end of the post) is using a ListBox as the content of my Custom Control but you can use anything else inside the control (a better approach for the ListBox would be to create a custom control derived directly from ListBox and use the built-in ScrollViewer). 
      Let's start from the XAML part of the User Control:

  <ScrollViewer x:Name="scroller">  
<ContentPresenter Content="{Binding ContentArea, ElementName=userControl}"/>
</ScrollViewer>

    So we have a ScrollViewer which inside has a ContentPreseter that has its content binded to the control's property ContentArea. Now let us have a look at the .cs code.

 public static readonly DependencyProperty VerticalOffsetProperty = DependencyProperty.Register("VerticalOffset",  
typeof(double), typeof(SmoothScroller), new PropertyMetadata(VerticalOffsetPropertyChanged));
public double VerticalOffset
{
get { return (double)this.GetValue(VerticalOffsetProperty); }
set { this.SetValue(VerticalOffsetProperty, value); }
}
private static void VerticalOffsetPropertyChanged(object sender, DependencyPropertyChangedEventArgs args)
{
SmoothScroller cThis = sender as SmoothScroller;
cThis.scroller.ScrollToVerticalOffset((double)args.NewValue);
}
public static readonly DependencyProperty ContentAreaProperty = DependencyProperty.Register("ContentArea", typeof(object), typeof(SmoothScroller), null);
public object ContentArea
{
get { return (object)GetValue(ContentAreaProperty); }
set { SetValue(ContentAreaProperty, value); }
}

     The property that we will use for animation is the VerticalOffset that uses the method VerticalOffsetPropertyChanged to scroll to a vertical offset inside the control's scroller. The property VerticalOffset can be animated and we will use it to smooth scroll the ListBox content.
     Here is the content of the MainPage.xaml

  <uc:SmoothScroller x:Name="smoothScroller">  
<uc:SmoothScroller.ContentArea>
<ListBox x:Name="lstItems" ItemsSource="{Binding Items}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemTemplate="{StaticResource DataTemplate}" >
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</uc:SmoothScroller.ContentArea>
</uc:SmoothScroller>

     So we have the SmoothScroller control which inside its ContentArea has a ListBox (the ListBox has it's scrollviewer disabled). What the sample does is it is changing the selected item every second (incrementing the selectedindex) and scrolls the content so that the newly SelectedItem is centered in the ScrollViewer. Here is the code used for scrolling:

  void dt_Tick(object sender, EventArgs e)  
{
((ListBox)smoothScroller.ContentArea).SelectedIndex = idx;
var container = ((ListBox)smoothScroller.ContentArea).ItemContainerGenerator.ContainerFromIndex(idx) as FrameworkElement;
var transform = container.TransformToVisual(smoothScroller.scroller);
var elementLocation = transform.Transform(new Point(0, 0));
double newVerticalOffset = elementLocation.Y + smoothScroller.scroller.VerticalOffset - smoothScroller.scroller.ActualHeight / 2 ;
//Animate transition
DoubleAnimation verticalAnimation = new DoubleAnimation();
verticalAnimation.From = smoothScroller.scroller.VerticalOffset;
verticalAnimation.To = newVerticalOffset;
verticalAnimation.Duration = new Duration(TimeSpan.FromMilliseconds(500));
var sb = new Storyboard();
sb.Children.Add(verticalAnimation);
Storyboard.SetTarget(verticalAnimation, smoothScroller);
Storyboard.SetTargetProperty(verticalAnimation, new PropertyPath(SmoothScroller.VerticalOffsetProperty));
sb.Begin();
idx++;
if (idx >= 56)
dt.Stop();
}

     Pretty basic: select the new index in the ListBox, calculate the new VerticalOffset so that the newly selected item is centered in our scrollviewer and create and start a 500ms animation for the SmoothScroller.VerticalOffsetProperty. Anyway I am sure that you will better understand how it works when you will try the sample code.
     The sample is far from perfect (before starting a new animation I should check if the old one finished, should not automatically scroll when the user is manipulating the list,...).
     Here is a screenshot from the sample:

As usual let me know if you need help. The code works on both Windows Phone 7.1 and Windows Phone 8 SDK.

SOURCE CODE


HTC One variants [update]

Image taken from smart.com.ph


In my article here I was writing about HTC One GSM/LTE (UL) and GSM (U) versions. The question if ROM based on UL firmware can be flashed on U device is still valid, but now we have some more details about these variants.
It turns out, that UL version of HTC One (having both GSM & LTE radio) will be available mostly in the Europe and North America. Model ID (MID) of this version is PN0710000.

U version (GSM radio only) is going mostly to Asian markets. Model ID (MID) of this version is PN0711000. There is also WL variant, which will be the Sprint version of HTC One. I don't know MID number of this version yet.

In the past we had similar situation with slightly different MIDs numbers of the same device. HTC Sensation had PG5813000 and Sensation XE had PG5813001. Both devices can use the same custom ROMs. HTC Desire HD has PD9810000, while Telus variant had PD9814000 and HTC Inspire 4G (U.S. version of HTC Desire HD) had PD9812000. Again, one custom ROM can be flashed on all 3 devices.
There are also some more details that leads to the conclusion, that most probably users with HTC One variant will be able to use their device with no issues after flashing custom ROM based on UL RUU. This is surely a very good news for both users and custom ROM developers. However, this will probably not enable LTE modem on U devices. So if you want to use LTE and your carrier supports this technology, make sure you will buy HTC One UL.

Have any questions or comments? Feel free to share! Also, if you like this article, please use media sharing buttons (Twitter, G+, Facebook) down this post!



Friday, 29 March 2013

Is a smartphone the next milestone for social media giant Facebook?

The big question is whether Facebook, the king of social media, will unveil a smartphone during an April 4 shindig? Will it also be powered by Android, the king of mobile operating systems.

The invitations have been sent out and all eyes are on Facebook's headquarters in Menlo Park, Calif., where attendees will find 1 Hacker Way and get inside by 10 a.m. PST to see Facebook's "New Home on Android" announcement.

From the day Facebook was founded in 2004, they have reached one milestone after another, such as adding photo uploading in 2005, launching music listening applications in 2011 and taking the big, big step of going public in the fall of 2012.

A lot of fans must have been thrilled with their growth, as Facebook reached one billion users in September. That a lot of updates, photos albums, music apps, messages, likes and just overall spending a bunch of time on Facebook.

If a Facebook-branded smartphone does come true, I wonder how Facebook will make it unique from all the other iPhones, Androids, Windows 8 and BlackBerry devices.

I imagine the smartphone market is pretty saturated now, because everyone I know already has a mobile phone of some flavor, whether smartphone or feature phone. Then we have those contract things that make us pretty loyal to one particular carrier for a couple of years.

But who is to say there is not room in the market for a Facebook device, or to speculate further, a HTC device running Android that been tweaked by the Facebook team.

So I say bring it on. We'll be checking our Facebook pages for new friends and updates while watching to see if the social media giant can deliver something really special, whether it's a phone or something else.

Visit us on Facebook | Follow on Twitter | Video: Parade of Smartphones

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

Saturday, 23 March 2013

Virtual SD card on Android


Since Android Honeycomb, Google changed the way to manage internal memory on Android devices. Before Honeycomb, every user had one separate partition on his device called userdata (/data), where he could install applications and where all user settings were stored (home screens, applications data, contacts, and all the rest you loose after doing so called "full wipe" on your device). Apart of userdata partition, all Android devices had microSD card slot to save pictures, movies, backups etc.. Now it looks completely different, but let's start from the beginning. There are several approaches to this subject, I'll present here all those I am aware of.


  • userdata partition + microSD card

This is the mentioned above pre-Honeycomb approach. There is userdata partition, where you can install all your applications and you also have a possibility to insert microSD card. Nothing more to explain. Only devices running Android Gingerbread and older versions have such configuration, so it's getting less and less popular.


  • userdata partition + virtual SD card on userdata partition

This is the new approach presented for the first time in Honeycomb. Instead of having /data partition together with expandable microSD card slot of any capacity, Google decided for something different. Instead, /data partition became very large (16/32/64 GB) and inside you can find /data/media folder that contains all the files you can see as your SD card content. How does it work? Without too much technical explanations, there is so called fuse tool which emulates media folder inside userdata partition as a separate storage device. As a result, after connecting smartphone to the PC you can browse the content of /data/media location, so if it was a microSD card. The biggest downside of such approach is a high risk of loosing all your virtual SD card content in case of any serious /data partition failure. Also, such partition can't be formatted with mkfs.ext4 without loosing content of virtual SD card, because you can't format device partition just partially. You can use e2fsck tool to check for potential errors, but sometimes partition format is the only way out. How does "full wipe" work then? Well, it's a little bit complicated. First of all, you can't format mounted (in use) partition. You need to unmount it first. Once unmounted userdata partition, you can't flash any ZIP file from inside recovery, because ZIPs files are stored on virtual SD card (/data/media) and remember that userdata partition is currently unmounted, because we want to format it. There is a workaround for it - you can run mkfs.ext4 from inside /cache partition or you can use command prompt. Now, what if you need to remove the whole content of your userdata partition, but you want to keep virtual SD card content at the same time? There is a workaround for this as well, but instead of formatting entire partition, you need to remove all files excluding /data/media location. Example:

#!/tmp/bash
# Remove content of /data partition excluding data/media files
cd /data
FILES=(*)
for i in *; do
if [ "$i" != "media" ]
then rm -R "$i"
fi
done


This way you can sort of wipe userdata, but it doesn't format the partition, so you can't fix broken file-system with it.  Why this point is the longest one? Because it took me quite a few words to explain the relation between virtual SD card and media folder on userdata partition (/data/media). So basically, what you read here applies to every configuration with virtual SD card emulated on userdata partition.


  • userdata partition + virtual SD card on a separate partition

This approach is not very popular, and it's a shame because it seems to be much more practical rather than the previous one. Instead of emulating SD card from userdata partition, there is a separate, large partition with vFAT file-system. That means you can format your userdata partition anytime you want without loosing content of your virtual SD card, or from inside custom ROM, because userdata can be freely unmounted. The only device I've seen so far with this approach was HTC One X.


  • userdata partition + virtual SD card on userdata partition + microSD card

This seems to be the most desirable solution for many Android users. It works similar to approach described in the second point, so everything I wrote about /data/media is valid here as well. However, every user have the ability to insert extra microSD card inside his device, so he can easily backup virtual SD card to microSD card or format userdata partition without loosing all pictures etc. (if previously stored on microSD card). This is the most common configuration for Samsung devices. But having removable microSD card is not only an advantage. First of all, any kind of microSD card (even SDHC) will be always slower than internal eMMC memory. It depends on many factors like card speed (class 2, 4, 6, 8 or even 10), on-board controller, I/O scheduler and more. Secondly, microSD card damage risk is higher then damage risk of internal eMMC memory. Out of question is the benefit to expand the memory with 64 GB microSD card, but it's definitely the minority of power users, who are buying large capacity cards. For the vast majority of users, internal memory with 32 GB capacity is more then enough to store their favorite music or pictures.


  • userdata partition + virtual SD card on a separate partition + microSD card

This approach is theoretically possible, but personally I've never seen device with such combination. For me, this is the best combination. You have possibility to use external microSD card and virtual SD card is not a part of userdata partition, but it has it's own, separate vFat partition. Such configuration gives you control over all your data and possibility to manage it however you want.

Do you have any questions or want to share some opinion? Please leave a comment below! Also, if you like this article, please use media sharing buttons (Twitter, G+, Facebook) down this post!



Friday, 22 March 2013

Verizon Wireless rolls out integrated messaging on multiple devices

If you're like me, you dig in your pocket for your smartphone numerous times each day to check your text messages. Or maybe it's on your desk while you're working on the PC and you reach for it each time your hear a beep.

This little routine is getting easier with Verizon Wireless's new messaging service announced on Thursday that'll allow messages to appear simultaneously on your Android smartphone, an Android or iOS tablet and the PC.

The messages on mobile devices will use an app available in the Google Play and Apple App Store, while the messages routed to the PC can be accessed through the Web browser after logging into a "My Verizon" account. Verizon will use their cloud storage to keep messages for 90 days.

A video explains how the whole humdinger of technology works. Our digital lives just got simpler and more efficient.

Visit us on Facebook | Follow on Twitter | Send an email

How to add songs to the emulator's MediaLibrary

    One of the new features of the Windows Phone 8 SDK is the ability to save(add) songs to the phone's MediaLibrary. This is a really nice when you add songs to the MediaLibrary any other music application that you have installed on your phone can play the songs that your application has saved.. The SaveSong method is found in the MediaLibraryExtensions class. Here are the parameters of this method:

[ExtensionAttribute]

public static Song SaveSong (
MediaLibrary library,
Uri filename,
SongMetadata songMetadata,
SaveSongOperation operation
)
    The method requires the ID_CAP_MEDIALIB_AUDIO capability and will return a reference to the newly saved song. One of the things that the documentation forgot to mention is that the filename Uri has to be an Uri to a file on the IsolatedStorage. You cannot give a direct Uri to an asset file (this I think because using the SaveSongParameter you can choose if you want to copy or move the file to the MediaLibrary) as you will get InvalidOperationException. If you want to add a song deployed as an asset you will first have to copy the file to the IsolatedStorage and then save it to the MediaLibrary.

    To copy the file to the IsolatedStorage you can use the:
 var resource = Application.GetResourceStream(new Uri(@"Assets/Songs/"+fileName, UriKind.Relative));  
resource.Stream.CopyTo(fileStream, 4096);


or you can use the WinRT Api to read the asset file:
  songUri=new Uri("ms-appx:///Assets/Songs/"+fileName,UriKind.Absolute);  
var file=await Windows.Storage.StorageFile.GetFileFromApplicationUriAsync(songUri);
 
    One interesting parameter is the SongMetadata. This enables you to "mess" with the metadata that will be saved to the MediaLibrary. If this parameter is null then the function will automatically import the file's metadata. If you still want to verify/import just some of the files metadata you can use the PCL ID3.NET and read the metadata of the file you have on the Isolated Storage. The portble dll is Id3.dll. You just have to pass the Stream to the Mp3Stream method:

 Id3.Mp3Stream mp3 = new Id3.Mp3Stream(resource.Stream);  
if (mp3.HasTags)
{
}


NAMASTE

Removable battery - do we really need it?

With every release of a new smartphone the same question is asked - will it have removable battery? If you believe that removable batteries are a "must have" nowadays, please keep reading. I hope you'll change your mind!

First of all - there is a solution. Battery banks seems to be a great alternative for removable batteries. You can check my review of HTC Battery Bank here. It works with every device equipped with micro-USB port. Now let's compare both solutions.
Capacity
Samsung Galaxy S3 has a removable battery with capacity of 2100mAh. Typical battery bank has a capacity of 6000mAh. This means, that Galaxy S3 can be charged almost 3 times with such battery bank! If you are going to use your smartphone heavily the whole day, only one backup battery might be not enough for you. With battery bank you can start your day with more then 8000mAh on board (battery inside device + battery bank).

Conclusion: 2300mAh vs. 6000mAh
Winner: battery bank


Size
Typical smartphone battery dimensions are around 6,3 x 5,0 x 0,5. Battery bank I was tested is of course bigger - 9,7 x 4,2 x 2,2. Is it really a disadvantage? I don't think so. It's small enough to be inserted into a pocket of your jeans or jacket. I think there are even smaller battery banks available on the market, so the size shouldn't be a problem here. Also, removable batteries are indeed smaller, but keep in mind their capacity is twice/triply lower.

Conclusion: 6,3 x 5,0 x 0,5 vs 9,7 x 4,2 x 2,2
Winner: removable battery

Charging
Battery bank can be charged regardless of device battery. It has its own USB cable and charging port, so you can charge both devices -  smartphone and battery bank at the same time. What about removable batteries? Well, if you don't have a removable battery charger (which costs extra money of course!) you will have to charge battery inside your device first, then switch batteries and charge the backup battery. The risk of braking battery cover latches is quite big, especially when it comes to plastic, which has its own lifetime and bending abilities. It seems that battery bank in this case is much more convenient and comfortable.

Conclusion: charging inside the device vs. independent charging
Winner: battery bank

Price
Original backup battery price is about $30. Yes, I know you can find non-original replacements for $10 as well, but let's compare only original parts. Typical battery bank costs is around $40 - $80 ($75 for HTC Battery Bank). However these prices vary from place to place and may be slightly different in your country, keep that in mind. Comparing 1:1 it's easy to see that external batteries are indeed cheaper. But to make the comparison fair, we need to establish the price/capacity relationship. 1mAh from 2300mAh backup battery ($30) is a cost of about $0,0130, while 1mAh from 6000mAh battery bank ($75) costs about $0,0125.

Conclusion: $0,0130 vs. $0,0125
Winner: battery bank

Design
When speaking about the design I mostly think about device design. However, battery banks looks definitely better and more aesthetic than regular removable batteries. Having a removable battery back cover doesn't allow uni-body construction, like HTC One has. Design is a matter of taste, but personally I prefer uni-body construction over having a plastic back cover. But again - it's a matter of taste, so no winner here.

Conclusion: plastic back cover vs. uni-body construction
Winner: draw

Usability
Practical approach is also important. Driving a car or sitting in a crowded bus might be a situation when your device is out of power. Now imagine you need to: 1) take out your battery backup, 2) turn off the device, 3) remove the back cover, 4) replace the battery, 5) close the back cover, 6) turn on the device, 7) hide your primary battery. So... 7 steps including the inevitability of turning off the device. With battery bank you just need to take it out and plug into the device. That's it. No need to turn on/off or disassemble your device. Keep in mind that battery bank doesn't work only as external battery, it is mainly a battery charger, so after some time you can hide it back.

Conclusion: 7 steps to change battery vs. take out and plug in
Winner: battery bank

Compatibility
External batteries are not compatible between devices. You can't use Samsung Galaxy Note II battery in Samsung Galaxy S3. You can't use HTC Sensation battery in HTC One S. If you buy backup battery for your particular device, you'll probably sell it together with the device or give it as free bonus one day. Battery bank is compatible with every device equipped with micro-USB port and can be your life-companion for years. However, you should be aware that battery bank might not be able to charge your tablet.

Conclusion: lack of compatibility with other devices vs. compatibility with all micro-USB smartphones
Winner: battery bank

Device lifetime (added 23-03-2013)
Due to many comments under this article I decided to agree with one point that was very often mentioned by users preferring removable battery. However, I think it needs some bigger explanation. It is a fact, that having non removable battery results in lack of possibility to exchange it for new one, once the old battery can't give your device enough power anymore. But is it really a problem? I took the warranty statements from my HTC One X+ and I found nothing about limited warranty for battery (like Samsung have - only 6 months). This means, that once battery is non removable, it doesn't have shorter warranty. So in my case battery is under 24-months warranty service. I think that is a positive aspect for the consumer, right? In some cases it might be also 12-months, but it depends on particular law regulations in each country.

Conclusion: removable battery with 6-months warranty vs. non-removable battery with 12/24-months warranty - both solutions have some advantages
Winner: draw

Possibility to reset the device (added 25-03-2013)
One more category added. Very often I hear that possibility to remove the battery is the only way to reset the device once it's not reacting anymore and system just hanged. This is not true. Every device have ability to reset the system using hardware keys. In most cases it's a combination of 3 buttons: power + volume up + volume down. You need to hold these buttons for about 5-20 seconds, depends on the device. Even if your device has a removable battery, it is better to use above combination to avoid breaking the plastic back cover latches.

Conclusion: you can reset your device no matter if it has removable battery or not
Winner: draw


So what's the score? Battery bank won in 5 comparisons, external battery in 1 comparison and there were also 3 draws. For me, personally, battery banks are better replacement for external batteries. It gives you bigger capacity for the same prize, extended usability and it looks better.

Do you have a different point of view or some experience with one of the approaches presented above? Please leave a comment below! Also, if you like this article, please use media sharing buttons (Twitter, G+, Facebook) down this post!



Monday, 18 March 2013

C Spire's new 4G LTE mobile hotspot packing power, speed

The mobile hotspot devices just keep getting better and better. It was only in November that I wrote about a wireless USB modem and said it was good and very handy to have around. Earlier in May, another review of a mobile hotspot also left me with a favorable impression of reliable Wi-Fi signals from these small devices.

This latest 4G LTE, or Fourth Generation Long Term Evolution, Mobile Hotspot from C Spire Wireless is even better. The design has changed from a flip-like device that plugged into an electrical outlet via a USB port to a digital device that can be placed on a desk or simply stays in your pocket or purse.

This new hotspot, manufactured by Franklin Wireless, looks like a smartphone without a keypad, with a round LCD digital display that shows your signal strength, battery status, the number of connections, any alerts or messages, and most important of all in my mind, whether or not you're connected to a 4G LTE or 3G network. Another indicator shows when you are roaming.

During my time with the device, the 4G LTE blue status light was always showing, backed up by four bars of network connectivity and a signal strength of excellent.

There are three buttons on the side for power, messages and data usage. A removable 1800 mAh battery is rated at five hours of continuous use and 18 hours of standby time. When it's time for charge, just connect the included USB cable to the travel charger and to a mini USB port on the hotspot device.

At only 3.6 ounces, this mobile hotspot does not weigh down your shirt pocket. It's well-designed, user friendly and ready for on-the-go wireless broadband connections.

The maximum number of connections to the hotspot has been bumped up from five to 10, for devices such as laptops, tablets, smartphones and even desktops not using a wired connection. As a matter of fact, it went way beyond the number of devices I have available and I could envisioned the C Spire 4G hotspot being used in a work-group or club-meeting environment. It would be a snap to set up a Wi-Fi security password in the Web user interface that could be shared with others.

This device joins C Spire's other 4G LTE-capable devices that have been available since a mobile broadband network upgrade in September.

I'm thumbs up on this one and it's worth a look at $29.99 under contract in all C Spire retail stores and more information is available on their website. After choosing a data plan, your mobile broadband needs will be in good hands at home, in the office or on the go.

Visit us on Facebook | Follow on Twitter | Send an email

How to debug Windows Phone HTML5 Apps

  Debugging HTML applications is never an easy task and until today I did not know how to approach this for Windows Phone HTML5. The technique I will describe in this post can be applied also for Windows Phone 7.1 applications using Phonegap or Android/iOS applications.
   The "secret" tool for debugging the html content inside our applications is called WEINRE which comes from WEb INspector REmote. Weinre is a debugger for web pages, like FireBug (for FireFox) and Web Inspector (for WebKit-based browsers), except it's designed to work remotely, and in particular, to allow you debug web pages on a mobile device such as a phone. 
    In order to install Winre you will need to download and install NodeJS


    Once you have installed NodeJS restart your machine this way you will be able to run the NodeJS commands from the command prompt. After restart open a command prompt window and run this command:
 npm install weinre -g  
This will install the Weinre package globally. This is what you should see in the Command Prompt window:


    When the installer has finished its work you are ready to run the Weinre server on your PC. Execute this command from the Command Prompt:
 weinre --boundHost -all- --debug -true  
    With these parameters Weinre should also open the firewall port. For more parameters have a look at this page. You can verify if the server started by opening a browser page and loading 127.0.01:8080 (8080 is the default port for Weinre). If you are seeing this page then the server is running:


   Now click on the Debug Client User Interface link where you will be able to see if any client is connected and debug the connected clients.
    Let's create the Windows Phone HTML5 application. Use the SDK template to create a new project, open the page index.html inside the folder Html and add this line to the head section:
 <script src="http://[the server ip]:8080/target/target-script-min.js#anonymous"></script>  
replace [the server ip] with the IP of the PC running the Winre server and run the application. If everything went as we expected in the Debug Client user Interface on the Server we should see one Target connected:
    Once the target Windows Phone page is connected you can inspect and change the DOM in real-time, execute javascripts:

 
 
    In this particular case I've only changed the background of the page but you can do whatever you want. Here you can find further details on how to use the Server User Interface.
    Using the Console panel you can execute arbitrary JavaScript expressions/statements. It also shows the output from various console methods, like console.log().

 

    This is pretty much everything. Simple and veryyyyyy useful if you need to debug your HTML5 windows phone applications.
    As usual don't hesitate to contact me if you have further questions.

NAMASTE

Saturday, 16 March 2013

HTC One - GSM or LTE?



HTC One is a new flagship device from HTC for 2013. With no doubts it is a great device with top hardware and innovating software. I will make a review of One soon, so expect a lot of pictures and in-depth comparison of HTC Sense 4+ and brand new HTC Sense 5.

For now some of you might be wondering about possible variants of this device. I made some research and I think I know how would this work. It is not officially confirmed, however I believe it is quite reliable and trustworthy.
Apart of all carriers branded models (also U.S. AT&T, U.S. Verizon and U.S. Sprint), there will be GSM  and GSM + LTE variants available for most countries. Respectively M7_U for GSM and M7_UL for LTE. Now the question is - when new update will come for U, will it come for UL the same day, or maybe week later? I can't answer that, but I hope both variants will be updated at the same time.
First off all, looking at HTC One software, it's easy to spot that both U and UL variants have the same code-name "m7". Model ID (MID) will be probably slightly different. LTE variant has PN0710000, while GSM should have something like PN0711000 or PN0710001. The beginning of the code will be the same for all One variants - PN07.

Now, let's assume we speak about European version (to avoid confusion with different CIDs or MIDs). It is said that Snapdragon 600 (HTC One SoC) has LTE modem already integrated (just like S4 and S4 Pro). So logically, there shouldn't be 2 different variants of S600 (with or without LTE). And so I believe that. This means that GSM variant of HTC One will have LTE modem as well, but most probably it will be disabled. Is it possible to disable LTE modem? Sure. The fact that specific SoC has LTE modem doesn't mean it's activated.

Will it be possible to activate LTE radio in GSM model? I'm not sure yet, but I think it would. How? You'll need S-OFF device, that's obvious. Since both GSM and LTE models will have the same hardware, having S-OFF you should be able to flash M7_UL software (RUU.exe). Of course you'll have to modify your Model ID (MID) in fastboot before (fastboot oem writemid PN0710000). Is there a risk to totally brick your device? Yes! So don't try it before it is confirmed to be working.

To find any official confirmation of my research I visited Qualcomm site and went to the specification page of new Snapdragons 200, 400, 600 and 800 chipsets. Here is the picture of S600 features:

As you can see, LTE modem is indeed integrated, and so will be present in GSM models as well. Here I repeat again - it will be disabled on GSM units and it won't be possible to switch it on/off in settings just like that. Enabling LTE on such units will be either not possible at all, or it will be possible by flashing M7_UL RUU to S-OFF device. Why this does not apply to HTC One X and its LTE brother, HTC One XL? Because One X is based on quad-core nVidia Tegra 3, while One XL is powered by dual-core Qualcomm Snapdragon S4. Yes, both are running different SoCs, because Tegra 3 doesn't have LTE modem integrated.

How to recognize if HTC One is GSM or LTE version? Looking back at some HTC devices like HTC One SV (C525u) you could noticed "4G LTE" text on the back cover. I wouldn't expect similar text this time, because the back case is not removable.

Do you already own LTE version of HTC One? Consider flashing my custom ROM from this site.

Have any questions or comments? Feel free to share! Also, if you like this article, please use media sharing buttons (Twitter, G+, Facebook) down this post!



Friday, 15 March 2013

HTC Mazaa OS 7.10.8862.144 - live tiles fix

   This is a small update to my previous post on how to update your HTC Mazaa to the latest build of Windows Phone 7.x  http://sviluppomobile.blogspot.it/2013/02/update-htc-mazaa-to-windows-phone-78.html . You can now update to version 7.10.8862.144 of the OS that seems to fix the live tiles issues.

The steps you will have to add:

Step 1:
7.10.8858.136 - 7.10.8860.142

Step2:
7.10.8860.142 - 7.10.8862.144


Thursday, 14 March 2013

Samsung unveils the Galaxy S IV in a show-like performance



Update: The Samsung Galaxy S IV is coming to AT&T, Sprint Nextel, T-Mobile and possibly Verizon Wireless soon. T-Mobile is offering an early-bird "sign up now" option to be notified for updates about the Galaxy S IV.

The long-awaited Samsung Galaxy S IV finally took the stage tonight at Radio City Music Hall in New York City.

While the BlackBerry 10 platform had the spotlight for a while, The S IV will now bask in the limelight with a long list of innovative features. It did not disappoint us.

Right off the bat at the Radio City Music Hall event, Samsung President of Mobile Communications J.K. Shin took the stage and pitched the innovative feature of automatic scrolling and Smart Scroll/Pause using eye tracking, a unique feature among smartphones currently on the market. For example, a video you're watching will pause when you look away.

According to Shin, the Galaxy S IV is slim at 0.31 inches, or 7.9mm, and he refers to it as a "life companion." But it's still not quite as slim as the iPhone 5's 0.30-inch depth. It missed being among the thinnest smartphones by a hair.

But with a five-inch display and weighing in at around 4.6 ounces, 2.7 inches wide and 5.4 inches long, the Galaxy S IV joins other big-screen smartphones, such as the Motorola Droid DNA and the Sony Xperia Z. Only the Samsung Galaxy Note devices have larger displays at well over five inches. It has a 13 megapixel main camera and a 2 megapixel camera on the front. Both cameras can shoot video simultaneously, which might be an industry first and unique to the Galaxy S IV. Under the hood, you'll find a 2600 mAh removable battery that powers Android 4.2.2 Jelly Bean, running alongside two gigabytes of RAM and 16 GB of storage that can be expanded by adding a micro-SD card for up to 64 GB.

A unique photo-mortising feature will allow anyone taking a picture with the rear 13 MP camera to also insert themselves in the picture, which would be taken with the 2 MP front camera. Along the same lines, if someone walks through the background of your photo, they can be erased.

An S Translator feature on the Galaxy S IV will convert languages for travelers or anyone unfamiliar with a foreign language. The Galaxy S IV understands nine languages and supports text-to-speech to speech-to-text. It has translations for French, German, Italian, Chinese and other languages. Over 3,000 common and "useful" sentences also are included in the translation database that are not depended on a wireless connection if you're out in the boondocks.

Just like the BlackBerry 10 platform, the Galaxy S IV has a work space and personal space known as Samsung Knox that will separate business information from personal files.

This new device has a big bag of goodies and tricks. A Group Play music feature allows music sharing among eight devices. Air Gesture lets you navigate the phone without touching the screen. Air Call Accept allows a call to be answered by waving your hand. Adapt Display will adjust screen brightness based on what you're viewing. The build-in Near Field Communication, or NFC, works with HomeSync for cloud storage of all your stuff. Just a tap will keep the Galaxy S IV in sync with all the content.

The Galaxy S IV will come in Black Mist and White Mist colors and is expected to be available this spring on most of the major carriers.

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

Video: The debut of the Samsung Galaxy S IV smartphone

The Samsung Galaxy S IV was unveiled tonight at Radio City Hall in New York City. Watch how the live events unfolded.