Supporting Tablet and Smartphone Resolutions in Android

Decided to spend an evening updating one of my popular (18,000 downloads) Android applications to support the shiny new Honeycomb holo layout and theme.

 

I initially decided to do this as a separate app, as there was different app code as well as the layout.  This was fine, got my app working and uploaded it to the Android marketplace, and used the new side-by-side feature, where you can have different APK’s supporting different devices on the same marketplace listing, and it will “just work(tm)”.  So I created a manifest.xml for my tablet version to only support xlarge screens, the smartphone app supporting everything else.

I used the following in the manifest:

<compatible-screens>
<!– all small size screens –>
<screen android:screenSize=”small” android:screenDensity=”ldpi” />
<screen android:screenSize=”small” android:screenDensity=”mdpi” />
<screen android:screenSize=”small” android:screenDensity=”hdpi” />
<screen android:screenSize=”small” android:screenDensity=”xhdpi” />
<!– all normal size screens –>
<screen android:screenSize=”normal” android:screenDensity=”ldpi” />
<screen android:screenSize=”normal” android:screenDensity=”mdpi” />
<screen android:screenSize=”normal” android:screenDensity=”hdpi” />
<screen android:screenSize=”normal” android:screenDensity=”xhdpi” />
<!– all large size screens –>
<screen android:screenSize=”large” android:screenDensity=”ldpi” />
<screen android:screenSize=”large” android:screenDensity=”mdpi” />
<screen android:screenSize=”large” android:screenDensity=”hdpi” />
<screen android:screenSize=”large” android:screenDensity=”xhdpi” />
</compatible-screens>

 

Everything seemed fine, but when I checked the Android marketplace compatibility report, it was telling me my app was not compatible with alot of devices (for reasons unknown), and there was no logic to the devices that it claimed were OK, those that it claimed were”t  and no relation to reality either (as it claimed HTC Sensation was incompatible, yet a HTC Sensation owner checked for me, and my app was all present and correct).

Anyway back to the drawingboard.  I decided that a single APK was the way to go, and as it turned out, whilst a little wasteful, it worked very well (my app is still only 200kb).  Here is what I did.

  • Took the res, layout and drawable directories in my tablet app and put a  -v11 sufix on the to signify Honeycomb onwards, and then copied them into my smartphone app
  • Added the new activites to a merged Manifest.xml
  • Renamed my original main activites to TabletActivity and PhoneActivity
  • created a new startup activity with the following logic in it.

public class ActivitySelector extends Activity
{
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);

Intent intent;

if (isTablet())
{
intent = new Intent(this, TabletActivity.class);
}
else
{
intent = new Intent(this, PhoneActivity.class);
}

startActivity(intent);
finish();
}

public boolean isTablet()
{
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2)
{
return (getResources().getConfiguration().smallestScreenWidthDp >= 600);
}

return (getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;
}
}

 

This was the main nuts of the change, and aside from some small amout of other refactoring, it was a job done!.  Now my app on the marketplace is showing compatable with pretty much everything Android 1.6+ including Honeycomb tablets, and it should also work for Android 4.0 (Icecream Sandwhich).  There might be better ways to do this, but this is simple and effective and follows the KISS principle.

If anyone bumps into Steve Jobs, tell him that his claims of Android fragmentation are utter bullshit (just like his overpriced products).  Cheers.

Converting Music Collection.

Recently bought an Asus Transformer Android Tablet, which I am very impressed with. However one thing it didn’t support (for reasons unknown) is WMA audio playback. I have been meaning to move away from Microsoft’s proprietary codec for some time (I have a mix of MP3, which is now a very aged code, and WMA which offers great compression, but is proprietary). I decided to convert my collection to AAC, which is ISO standardised and is supported on all my devices.

I used DbPowerAmp Music Converter and Nero’s AAC encoder to convert everything, and it made a VERY good job of it, retaining tags and metadata (including embedded album art), but because conversion between compressed codecs is less than ideal, I re-ripped 30 or so of my favourite CD’s anew.

Anyway, the process of doing all this, it broke all my M3u playlists. However I found this most excellent app, which repairs playlists, EVEN IF THE FILENAME IS DIFFERENT!!!

http://sourceforge.net/projects/listfix/

Very cool indeed. I now have 100% AAC audio collection, that all my devices support, everything is tagged correctly, everything has correct album-art, and all my playlists are re-linked…

Exclusive Proof, The Internet Is Full Of Idiots.

Have a look at everyone wanting Google+ invites, and you will find blogs, twitter and facebook groups offering them up (apparently) in exchange for your email address….

Sometimes words fail me to how stupid people are, and this is one of those times…   Spammers don’t even need to lift a finger anymore, people are willing to dish out their details at the lure of some mythical Google+ invite…

Shocking…

PS.   If you want a Google+ Invite, post your email address below and i’ll pass your request onto Robert Alan Soloway

The Rise Of “Copy and Paste Reporting” And Churnalism.

The internet whilst being a great resource is fatally flawed, namely it allows lazy journalists to simply copy and paste news from other sites to theirs, change a few words and voilla, “news”.  Problem is, nobody bothers to check for factual accuracy anymore.   I spotted a en-masse copy and paste gaffe this week relating to a new PS3 Slim revision that Sony will be introducing soon, I easily found 20 high profile sites all citing a single inaccurate blog entry: http://www.andriasang.com/e/blog/2011/06/20/new_ps3_model/

The error relates to the PS3′s power consumption, which incorrectly states was previously 230w and is now 200W.   Clearly this is utter tripe, the original PS3 from 2006 only drew 185w, the original PS3 Slim consumed 85W or thereabouts and the current PS3 Slim is around 75w.  The blog confuses PSU capability with power consumption (the PSU is capable of delivering 200W/230W, but only actually CONSUMES what the system needs).

Every lazy journalism site that I spotted from Google News, was also guilty of copying the same factual errors from the original article.      So, here in no particular order are the guilty sites.  Shame on all of you.

 

Lots of links!   Finally one that shows a 1st gen PS3 Slim drawing around 85W  (2nd gen PS3 slim dropped this to 75w, so this new revision should be lower still 55w?)

http://news.cnet.com/8301-17938_105-10318727-1.html

So if you can’t trust any of the above sites for reliable news, who can you trust?   Every single one of those sites quote the same Bullshit 200w-230W figure copied and pasted from some random internet blog!!

More on  churnalism and copy and paste reporting:

If you want to read some more laughable incidents of lazy reporting, there are plenty, but this is my favourite: http://www.theregister.co.uk/2007/10/03/wikipedia_obituary_cut_and_paste/

This is also good to spot the lazy scumbags from the real journalists: http://churnalism.com/

I have contacted a couple of the higher profile sites in that list, pointing out their reporting sucks, and that they might want to correct the articles before they embarrass themselves even further, so don’t be surprised if at some point in the future, some of those linked sites show the correct numbers (or like others that were smart enough to spot the gaffe, remove the numbers totally).  I would love to hear from any of the writers of these articles as to why some random blog with random information can suddenly be headline news on sites like Engadget without even a small amount of checking for factual accuracy.

Removing pre-installed applications from Asus Transformer.

  • Root your device.  Now that there is a nvflash, it’s simple.  See here:  http://tabletroms.com/forums/showthread.php?976-Nvflash-Unbricking-and-forever-root!
  • Once you have a rooted system with ClockworkMod installed, power the unit down fully.
  • Connect the Asus Transformer lead to your PC. (and power up your PC! Duh…)
  • Press Volume Down (keep held), Press Power On.
  • When you see white text, press volume up.  This should get you into ClockworkMod menu (if not, are you rooted?  Did your rooting method install clockworkmod?)
  • Select Mounts and Storage Menu
  • Select Mount /system
  • On your PC, if not already installed, Install the Android SDK from here: http://developer.android.com/sdk/index.html
  • Open up a command prompt from the SDK tools directory and type adb shell
  • It should now give you a command prompt (no errors displayed)
  • Type:
    • cd /system/app
    • rm   myapp.apk
    • rm myapp.odex
  • type exit in adb shell.
  • Unmount /system in clockworkmod
  • Reboot and enjoy less crud like Kindle and Layar

 

Product Sales vs Product Quality (and other ranting)

It seems the world is full of morons, everywhere I look, I see posts about how much this has sold, how much that has sold, and the clear implication being that “it must be good, look how many it’s sold”. I’m not sure if the people writing these blogs/news are idiots, and that they truly believe that there is correlation between a products quality and it’s sales figures, or just that it suits their agenda to believe it.

For those people reading still confused, let me spell things out to you.

The worlds best selling car is the Toyota Corolla, does that make it the best car? of course it doesn’t (Sorry Toyota Corolla owners). I would much rather have my Ferarri Enzo, my Porsche Carrera GT, my Audi R6, hell even my VW Passat in preference!…

So the next time you read something about the Xbox selling 10,000 more units last quarter, or the iPad2 selling out after people queuing around the block for it, or other dumb media spin, you might want to bear that in mind… That just because brainwashed idiots are (apparently) queuing up to buy something, does not make it some amazing kit. You only have to look at what Nintendo have does with the Wii marketing to see how stupid the vast majority of consumers are. They managed to create fever pitch sales, basically selling a Gamecube in a new box with PS2-era graphics, by drip-feeding supplies and telling people they if they didn’t buy one they would miss out on getting one (hmm, sounds like a double glazing salesman’s ploy…)

I love technology, and I spend lots on it. I buy the BEST product (for my budget), and it’s usually not the most POPULAR product. It really annoys me that REAL and TANGIBLE product attributes like features, performance, value, build quality all come second fiddle to marketing spin, or what logo it got stuck on it, or if that brand is currently fashionable (I think you can what fruity manufacturer I am referring to).

It’s a shame that sites that used to be really good sources of unbiased news and reviews pander to whoever pays the most in advertising (which is a vicious circle, as those that have the most money to spend are the ones that already have their foot in the door). Sites like Engadget, Ars Technica, Slashgear, Reg Hardware and many more have all destroyed their reputation and basically sold out to the highest bidder.

To the top of my mind, I can’t think of a single tech site that does still have an unbiased source of news and reviews. (if you can think of one, please feel free to leave a comment!)

I think Bill Hicks summed up marketing people nicely:
(caution strong language).

Nokia – What were you thinking?

Today’s news from Nokia’s (ex-Microsoft) CEO that their floundering smartphone business is in need of some serious reworking comes as no suprise (I don’t know ANYONE that has a Nokia smartphone, let alone would consider one).   What is surprising (or not when you know where the CEO came from) is who they are  buddying up with – Microsoft.

Microsoft’s Windows 7 Mobile platform (which shares nothing in common with Windows 7 on the desktop, despite what Microsoft would have you believe from the naming) is a likewise floundering platform.    It’s got less than 1% of the market globally (of course marking scumbags will always choose to report it’s less embarrassing US 2% marketshare), it’s got a feature-set from a bad 2007 iPhone (no copy and paste, no multitasking, poor customization for starters).

So why would Nokia choose this over Android which has already to go and massively expanding ecosystem?  I have no idea.  I was salivating at the prospect of a Android based Nokia smartphone, it would have been truly excellent mixing Nokia’s excellent hardware and Androids excellent software, with perhaps some Nokia sprinkles in the UI Skin department.

We will never see this alas, they sold their soul to the devil, Microsoft will pillage anything Nokia has that was worthwile, and as soon as Microsoft get what they want from this deal, what is left of Nokia will be cast aside.

3 years from now I can see one of two things will have happened.

  • Nokia won’t be around and will have disappeared without trace, like what almost happened to Motorola when they made suicidal business decisions very similar to this one.
  • Shareholders will have revolted and kicked out the Microsoft shill CEO and saved their company by joining OHA

I hope the latter, but I suspect the former.

As Google rightly pointed out, “Two turkeys do not make an eagle”…..   Microsoft and Nokia are nowhere to be seen in the smartphone business, like the last two people at the school disco…

EDIT: Well this is rather unsurprising (not)…  Nokia replaces another top-exec with a Microsoft puppet.

EDIT2: Seems Nokia shareholders are not too keen either.  I wonder how long that share price will continue to plummet?  With Microsoft now seemingly running the show at Nokia, you would have to be an idiot to invest and would be looking at dumping stock as soon as you you could, surely….

PS3, yet again the system of choice for gamers and movie buffs.

Whilst 2011 is already looking to be a killer year for PS3 owners, with killer titles like LBP2, Killzone3, Uncharted3, Last Guardian and loads more, it’s also likely to be the 3rd year in a row where the PS3 has the best rated games of any system…
Nice..  If only somone were to tell some of the braindead (or paid-off) sites like Edge.

2010:

http://features.metacritic.com/features/2011/best-video-games-of-2010/

“For the second straight year, Sony’s PlayStation 3 console had the highest percentage of positively-reviewed games (with Metascores of 75 or higher) of any platform, with 44% in 2010, which actually was slightly ahead of the console’s 2009 figure. The PS3 actually had a larger quantity of good games (102) than any other console as well, and its average Metascore — though down a bit compared to 2009 — was still comfortably ahead those of the 360 and Wii.”

2009:

http://features.metacritic.com/features/2009/the-best-games-of-2009/

“Sony’s Playstation 3 console has edged out Microsoft’s once-dominant Xbox 360 to finish on top in Metacritic’s first annual Game Platform Power Rankings. Sony clearly had a strong year in terms of game quality, with titles for both of its platforms (Playstation 3 and PSP) receiving better reviews on the whole than games for similar platforms. The two Sony platforms also had a fewer percentage of bad releases than any other platforms”

Sony e-Reader PRS-650.

Just picked up one of these.  The VAT-back deal, and the impending VAT price hike drove me to take the plunge, along with Google’s impending e-book EPUB based services for the UK.

I instantly discounted buying the Kindle for several reasons.

  1. Amazon’s locked in format.  Yes you can currently convert stuff, but it’s hassle, and as soon as Amazon have market dominance, you can bet that gets locked down, just as you can bet their current loss-leader pricing on hardware and content will evaporate overnight.
  2. The hardware.  Great screen (same Pearl screen as the latest Sony), but really FUCKING UGLY.  Those buttons what were they thinking?
  3. No touchscreen.
  4. No Library lending of content.

To say I am overwhelmed by how good the Sony is, is a understatement.  It’s very light, incredibly easy to read, the screen clarity is awesome, and the touchscreen needs only a very light gesture to flip pages. (it uses a beam sense technology called zForce licensed from NeoNode Inc, rather than a overlay which reduces the clarity like the PRS-600 suffered from).

After playing with the latest Kindle, the Sony wins hands down (for the main reasons I pointed out above).   Clearly the Kindle DOES have one killer feature, albeit a  gimped one, in that it can browse and purchase content from the device itself, without the need of a PC.   This is great, but it’s unfortunately locked to Amazons store.   If Sony can sort out this area for their next-gen readers, and make it work cross-retailer for anyone that supports EPUB, then they are onto a winner.

My last point in my Kindle cons, the No Library Lending seems to have been missed by almost all reviews (i’m guessing because they don’t bother to check), the Kindle can’t borrow library content on DRM-time locked content.  All the EPUB readers (at least those that support EPUB with Adobe DRM like the Sony), you can borrow e-books FOR FREE from your local library.   It works really well, and I already have rented quite a few titles for free online from my library, it’s pretty simple, you just punch in your library card number, pick your books and it gives you a 14-day DRM license and you just download the EPUB and load it onto the reader.  when the 14 days are up, you can no longer view the book, and the copy goes back on stock at the library end.

This is clearly a killer feature, and something I haven’t seen too many devices supporting EPUB advertising, perhaps they are missing a major trick here?

So why do people use IE8?

It’s clearly not because of performance! (Click the image to see the bigger and more shocking version!)