Planet Android Headlines

↑ Grab this Headline Animator

September 02, 2010

SwiftKey Receives A Substantial Update – Multitouch, Better Voice Recognition, Less Lag

imageOne of the more popular tip-tap software keyboards got a nice little upgrade today. SwiftKey, an aftermarket keyboard that uses intelligent statistical methods as well as scanning of your SMS inbox to predict the most likely next word, now has support for multitouch typing. As seen previously on the Droid X’s keyboard, this greatly enhances possible typing speeds… unless you have one of HTC’s infamously erroneous older touchscreen panels, that is.

 

image

What, DroidSans not good enough for you?

Moving on with a more positive spin, SwiftKey claims to have nixed many bugs, as...

by Brian O'Toole at September 02, 2010 09:16 PM

Samsung Galaxy Tab Hands On Videos

The IFA in Germany means this week is now unofficially ‘International Android Tablet Week’ and the specs, photos and videos just keep coming from around the interwebs.

We covered the Samsung Galaxy Tab in our previous Android Tablets Roundup, but it went official today at the IFA. No firm pricing and launch date as yet. We’ll have the android news on this and other tablets as soon as it comes in. Here’s a quick reminder of the device and it’s spec.

Samsung Galaxy Tab

  • Android 2.2
  • 7-inch 1024×600 screen
  • Weighs 380g
  • ARM Cortex A8 1.2 GHz processor and PowerVR SGX540 graphics.
  • 16GB of internal storage.
  • microSD expension for up to 32GB additional storage
  • Front 1.3MP webcam for video calls
  • 3.0MOP rear camera
  • Full-size and mini USB ports and a full-size SD card slot.
  • 3G data / voice
  • 802.11n WiFi
  • Full HD video playback

So, lets keep this short and sweet as the best way to get a feel for a gadget is with a nice video or four. To that end, here are a few of the best hands on videos straight from the IFA floor, with the last one being Samsung’s official product video. Enjoy.

TechCrunch – The Samsung Galaxy Tab In Action

SlashGear – Samgung Galaxy Tab Hands On

Engadget – Samsung Galaxy Tab Preview

Samsung Official Product Video

by Nick Hoddinott at September 02, 2010 06:06 PM

Engadget Previews Viewsonic 10" Tablet – Dual-Boots Win7 & Android 1.6

viewpad-10-08-hands

Last week, we found out that Viewsonic would be rebranding and selling a 7" and 10" tablet; the 7" tablet would be Android while the 10" would dual-boot Android and Win7. Now Engadget has a hands-on preview of the 10" with additional details, and suffice it to say there are some ups and downs.

Bad news first, though: the tablet runs Android 1.6. The reason for this lies in the CPU used, but that doesn’t make shipping a tablet with an OS that’s over a year old suck any less. Also bad news: Engadget was...

by Aaron Gingrich at September 02, 2010 04:49 PM

T-Mobile G2 Confirmed To Feature 800MHz Processor and Android 2.2

T-Mobile G2 Confirmed To Feature 800MHz Processor and Android 2.2Just yesterday, we reported a leak about pricing information for the upcoming T-Mobile G2. Today, T-Mobile updated its teaser page for the G2 to include some other important information — namely its processor type and software. While it may not pack a powerful 1GHz processor, the G2 will feature a a 800 MHz Scorpion processor, [...]

by Natesh Sood at September 02, 2010 04:44 PM

Many thanks to Alcatel-Lucent

Many thanks to Alcatel-Lucent.

The droidcon London event simply could not happen without the support of our sponsors. We are lucky however that we are bringing in companies that have great value to offer to Android developers.

Alcatel-Lucent are arguably the most innovative telecommunications infrastructure company there is. Over the last few years they've pushed for the technologies they deploy within the networks we use, to be made available to third party developers. They embarked on a programme of developing APIs to open up a whole range of network data and services. Their development sandbox initiative allows developers to experiment at no cost with a wide selection of Lab APIs, along side a prototyping and testing environment plus a top class analytics suite.

After years of extensive research in to markets for services and application types Alcatel-Lucent recently launched an entire book of their findings, The shift which is a must read for everyone who intends to make a living developing for the mobile ecosystem. These people are deadly serious about putting the power of networks in to your hands. We will have some of the Open API Service team on hand at droidcon London to chat with about how they can help you realise your ideas.

September 02, 2010 04:24 PM

Hella Umbrella Beta Mini Review

Hella Umbrella, developed by Ramblin' Wreckage, is a very unique platformer that can now be had in beta form from the Android Market. I snagged the beta and gave it a very thorough run through. Although the beta has only three levels they have a great rang of difficulty. The first level starts you off as a basic training level to get you up and up on how the game plays.

Read more...


by reddragon72 (reddragon72@hotmail.com) at September 02, 2010 04:04 PM

Gzipping files on the fly part 1.

SDK Version: 
M3
0

Today we wanted to test ways, to optimize the download of files to android phones.
The first way we tried, is the most obvious method of using a little less of everything (bandwith, battery, cpu, backlight, time? etc), compression.

Image source.

But what about speed? Is it worth to sacrifice the app's speed for using less bandwith? How much slower is compressing/decompressing files on a phone anyway?
Read on to find out.

read more

by tamas at September 02, 2010 02:03 PM

CoPilot Live

CoPilot Live is a fully-featured GPS system for your Android device. It includes turn-by-turn directions, live traffic, local gas prices, various route options, and more.

Price: $19.99 – $59.99

We’re giving away 2 full licenses of CoPilot Live (North America) at random to those who comment below!

AndroidTapp.com Android App Review:

(Tested using an HTC Evo running Android 2.2)
Pros & Cons:

Pros

  • Maps are downloaded directly onto your SD card so navigation features work even without a wireless connection as long as GPS in enabled
  • Multi-stop trips
  • Lane assist eliminates confusion in unfamiliar multi-lane high traffic areas
  • Additional maps are available for other countries such as Europe, UK, Australia, and more
  • Route recalculation is quick and seamless

Cons

  • HUGE download. The North America region download for this app is almost 2GB stored to your SD card
  • No voice search feature. One of the most used functions on my Evo with the 2.2 upgrade.

Features:

CoPilot Live is a great app for anyone who finds themselves using GPS navigation often. This, of course, coming from someone who uses Google Maps often, having the offline capability was a huge plus! CoPilot sets itself apart from other navigation software by simply offering many services you would normally find only on a dedicated GPS device. Even better, you have more than one voice to choose from rather than the standard TTS voice (which on long trips can get annoying and causes use of the mute button) your given using Google Maps. This application is available on Android, iPhone, iPad and Windows Mobile. On your desktop, you can customize a variety of features for CoPilot Live using the free Windows software called CoPilot Central, also available from ALK.

There are several versions you can buy of this app (All available in the Android Market): North America, South Africa, UK + Ireland, Europe, and Australia. Using this app I only tested the North American maps in their most current form.

Key Features:

  • Accurate navigation to either house number or street level
  • Quick re-routing when needed. I’m no longer nervous about missing a turn!
  • Several different views for navigation to choose from (2D, 3D, and Driver Safety)
  • Enhancements such as speed limit indicator and lane indicator display just makes using this app that much safer
  • Works in either landscape or portrait mode
  • Thousands of POIs available for North America (almost too much to handle!)
  • Share location via SMS. Cool feature to let your loved ones know where you are.
  • Navigation available either by car, motorcycle, bicycle, RV, or walking. (I only tested the car method but feel free to send me a motorcycle or RV!)
  • Download maps for several areas on one SD card
  • Live Services (see below)

Live Services:

CoPilot offers a variety of different premium services that requires a data connection. Not all services are available in all areas. These are:

  • Live Weather: Choice of local weather, at destination, or in another city (either Fahrenheit or Celsius). Provided you with current and 5-day outlook including highs & lows with weather conditions for the day. Clicking any of the 5 days will send you externally to AccuWeather’s websites.
  • LiveLink: I was unfortunate enough not to get to try this out but it sounds very interesting. In theory, you would share you location with others either via their CoPilot Live application on-screen or via email to others through the CoPilot LiveLink website. I could see this being very useful amongst a group of travellers, only if everyone had the same application installed.
  • Live Traffic: Shows any traffic-related incident in the area. Throughout my usage, I typically found construction as the items it provided me with. It separates this in two formats: via Map or via list of major highways effected. You can choose to automatically avoid the incident or select it manually.
  • Live Fuel Prices: Shows the prices of nearby gas stations. Great information but no way to change whether the information is sorted by price or distance without going into the settings. Does allow you to be specific on the grade of fuel and the search radius.
  • Live Local Search: Find different items of interest either nearby or in another city. Google Search SPOILS me so I was not impressed with the functionality of this feature. Area of improvement for sure.
CoPilot Live Start Screen CoPilot Live Turn-by-Turn Map Navigation CoPilot Live Choose Language CoPilot Live Turn-by-Turn Map Directions CoPilot Live Traffic Listing CoPilot Live Turn-by-Turn Map Directions CoPilot Live Battery Alert CoPilot Live Settings Menu 2 CoPilot Live Settings Menu 3 CoPilot Live Quick Stop CoPilot Live Menu 2 CoPilot Live Menu 3 CoPilot Live Map Styles CoPilot Live Services CoPilot Live Detour CoPilot Live Turn-by-Turn Map Directions CoPilot Live Turn-by-Turn Map Directions

Usefulness:

CoPilot is great for those who do a lot of traveling. This application feels like it wasn’t designed for just your average trip across town, however, it could easily be used for any destination no matter how far away it may be. Offline usage is a huge advantage and makes traveling in areas with limited cellular signal much easier. The additional services that CoPilot offers makes trips less of a headache and more enjoyable for you and your family.

Ease of Use:

Being used to Google Maps, this app takes on a different approach to how to use navigation software. It resembles a dedicated GPS device heavily so if your used to that platform, this should be a breeze.

Frequently Used:

If you need directions to an unfamiliar area, want up-to-date information on your common routes, or plan or traveling further than your own internal-brain-navigation can handle, this will be used often. Even though I know the route to work, I used it everyday just to keep updated on traffic.

Interface:

All icons and text is large and easily readable on the screen. Menus are a bit excessive at times but that can be viewed from a positive and negative standpoint. Lots of options and settings means lots of way to customize your experience with this app.

Battery Life (Updated):

This was one of my main concerns with this app (and all GPS nav apps for that matter). I’m happy to report that battery life with this application was minimal! During most trips, I saw about half the battery usage I normally see using Google Maps or Sprint Navigation. I guess it makes a big different to not be connected to the internet the entire time. In fact, a couple of times I used this application turning my mobile internet off completely and had no issues aside from not being able to use Live Services. Very pleased with this app’s battery usage!

AndroidTapp.com Rating

AndroidTapp.com Rating!AndroidTapp.com Rating!AndroidTapp.com Rating!AndroidTapp.com Rating!AndroidTapp.com Rating! (4.25 out of 5)

Should you Download CoPilot Live? For anyone who uses GPS navigation more than once a week, YES! The added features and offline capability alone are enough to justify getting this app. Skeptical at first but after a few days of use it’s definitely worth the money.

This content was originally posted at AndroidTapp.com

Algadon Free Online RPG. Fully Mobile Friendly.

by Jason Norment at September 02, 2010 12:01 PM

Are you an Android Blogger?

Ron Burgendroid

What would a conference be without it's army of bloggers? Droidcon invites you to apply for an exclusive "bloggership" and get free admission to Droidcon London! We'll also give you the option to conduct exclusive interviews with conference speakers and exhibitors.

We'll of course give priority to those who have blogged about Droidcon previous to the event :) . So what are you waiting for? Apply here

Droidcon London is happening at the angel business design centre on the 28 & 29th of October 2010.

September 02, 2010 10:40 AM

Archos Android Tablet Quintent – Prices & Release Dates

Archos Internet Tablets

The Android tablet deluge continues unabated with Archos announcing 5 new Android tablets. Our recent Android Tablets pre-lanuch roundup covered the hottest yet to be released tablets, and some of these Archos offerings appear to be worthy additions to that group.

Archos have gone for a naming convention that signifies the screen size, and decided to brand them all as ‘tablets’. This is fine, although you might raise some eyebrows telling your friends about your new 2.8-inch 320×240 tablet. The 28 and 32 are really media players by another name, but we can see that the ‘tablet’ badge simplified the marketing drive and make it buzz word compliant.

The flagship 101 10.1-inch tablet is device that stands out from the bunch with 1024×600 screen, fold out stand, phone tethering and 720p video playback. The device weighs a mere 480g and has a thickness of only 12mm. That’s thinner than a certain device by a company named after a fruit. Yes, the 101 is a device we’d like to get to know better.

Android Apps are provided, not via the Android Market, but via Archos’ own AppsLib; a Marketplace for Android Tablets. It remains to be seen if Google will address the issue of Apps for Tablets swiftly or if a third-party provider solutions, like that from Archos, will become the de-facto Tablet Market.

We’ve managed to track down all important release dates and prices for these 5 contenders and the good news is ‘pretty soon and pretty cheap’.

All five models come with Android 2.2, WiFi (b/g/n), usb and g-sensors. All except the 28 have Bluetooth 2.1 EDR

ARCHOS 28 internet tablet
320×240 2.8-inch screen, 800 MHz ARM
Available in September 2010: $99 – 4GB

ARCHOS 32 internet tablet
400×240 3.2-inch screen, 800 MHz ARM, Camcorder capabilities
Available in September 2010: $149 – 8GB

ARCHOS 43 internet tablet
480×85 4.3-inch screen, 1GHz processor
Available in September 2010: $199 – 16GB

ARCHOS 70 internet tablet
800×480 screen 7.0-inch screen,  1GHz processor, phone tethering, mini-HDMI and USB ports.  VGA Webcam
Available in October 2010: $274.99 – 8GB and $349.99 – 250GB (HDD)

ARCHOS 101 internet tablet
1024×600 10.1-inch screen, 1GHz ARM A8, phone tethering, HMDI-output, 720p HD video playback, font webcam.
Available in October 2010: $299 – 8GB and $349.99 – 16GB.

To be honest Archos isn’t a name that has lit up our hearts in the past, and has been known to ship some pretty so-so devices. By getting on the Android band wagon they seem to have stepped up a gear and what we have here is a genuinely interesting line up of devices, especially at the higher end. We look forward to testing some of them out.

[Archos]

by Nick Hoddinott at September 02, 2010 06:56 AM

Brace for the Future

[This post is by Dan Morrill, Open Source & Compatibility Program Manager. — Tim Bray]

Way back in November 2007 when Google announced Android, Andy Rubin said “We hope thousands of different phones will be powered by Android.” But now, Android’s growing beyond phones to new kinds of devices. (For instance, you might have read about the new 7” Galaxy Tab that our partners at Samsung just announced.) So, I wanted to point out a few interesting new gadgets that are coming soon running the latest versions of Android, 2.1 and 2.2.

For starters, the first Android-based non-phone handheld devices will be shipping over the next few months. Some people call these Mobile Internet Devices or Personal Media Players — MIDs or PMPs. Except for the phone part, PMP/MID devices look and work just like smartphones, but if your app really does require phone hardware to work correctly, you can follow some simple steps to make sure your app only appears on phones.

Next up are tablets. Besides the Samsung Galaxy Tab I mentioned, the Dell Streak is now on sale, which has a 5” screen and blurs the line between a phone and a tablet. Of course, Android has supported screens of any size since version 1.6, but these are the first large-screen devices to actually ship with Android Market. A tablet’s biggest quirk, of course, is its larger screen.

It’s pretty rare that we see problems with existing apps running on large-screen devices, but at the same time many apps would benefit from making better use of the additional screen space. For instance, an email app might be improved by changing its UI from a list-oriented layout to a two-pane view. Fortunately, Android and the SDK make it easy to support multiple screen sizes in your app, so you can read up on our documentation and make sure your app makes the best use of the extra space on large screens.

Speaking of screen quirks, we’re also seeing the first devices whose natural screen orientation is landscape. For instance, Motorola’s CHARM and FLIPOUT phones have screens which are wider than they are tall, when used in the natural orientation. The majority of apps won’t even notice the difference, but if your app uses sensors like accelerometer or compass, you might need to double-check your code.

Now, the devices I’ve mentioned so far still have the same hardware that Android phones have, like compass and accelerometer sensors, cameras, and so on. However, there are also devices coming that will omit some of this hardware. For instance, you’ve probably heard of Google TV, which will get Android Market in 2011. Since Google TV is, you know, a stationary object, it won’t have a compass and accelerometer. It also won’t have a standard camera, since we decided there wasn’t a big audience for pictures of the dust bunnies behind your TV.

Fortunately, you can use our built-in tools to handle these cases and control which devices your app appears to in Android Market. Android lets you provide versions of your UI optimized for various screen configurations, and each device will pick the one that runs best. Meanwhile, Android Market will make sure your apps only appear to devices that can run them, by matching those features you list as required (via tags) only with devices that have those features.

Android started on phones, but we’re growing to fit new kinds of devices. Now your Android app can run on almost anything, and the potential size of your audience is growing fast. But to fully unlock this additional reach, you should double-check your app and tweak it if you need to, so that it puts its best foot forward. Watch this blog over the next few weeks, as we post a series of detailed “tips and tricks” articles on how to get the most out of the new gadgets.

It’s official folks: we’re living in the future! Happy coding.

by Tim Bray (noreply@blogger.com) at September 02, 2010 06:51 AM

September 01, 2010

Ninja Kaka – Fruit Dojo

Ninja Kaka is a simple and fun game, which has an extremely straightforward gameplay. Fruits will be tossed up from the bottom of the screen and players will attempt to slice them by swiping their finger through it. Within limited time, the more you slice, the more points you’ll get. Leaderboard also available for users to get competitive.

Price: Free, $1.99

AndroidTapp.com Android Game Review:

Pros & Cons:

Pros

  • Fun and challenging game
  • Responsive controls

Cons

  • The spin-off of popular iPhone game Fruit Ninja, it’s missing a lot of cool features like bombs, various play modes, choice in the sword type, etc.

Features:

Ninja Kaka Fruit Dojo is a fun and challenging game of strategically using your Ninja slicing skills to chop random fruit stacking up points to advance to the next level under a timer. The key is slice in higher number combos without misses, a miss or no cuts in the higher rounds result in points taken away, and the speed of the game increases making it more challenging.

How to Play Ninja Kaka Fuit Dojo

  • Swipe in any direction on the screen to slice the fruit, recommended to slice at least 3 or more pieces with every strike without missing.
  • Each round has a timer and point threshold to beat, hence combo slices are vital
  • Each advance in rounds get even tougher as the game speed increases
  • Missing fruit subtracts score
  • Nothing cut subtracts score
  • Cut target fruit awards high score, miss target fruit and get penalized
Ninja Kaka Pro Start Menu Ninja Kaka Pro in Game Play 1 Ninja Kaka Pro Help Ninja Kaka Pro Help 2 Ninja Kaka Pro Help 3

Fun Factor & Addictive:

Though it’s a simple game it’s really fun, addictive and can get quite challenging as you’re not just slicing fruit but figuring out the best way to slice 3 or more without missing to maximize points.

Graphics:

The game features smooth & delicious fruit splattered 3D game graphics and is very responsive on Android devices with higher processor speeds.

Accelerometer, Vibration & Sound:

Ninja Kaka only uses sound which can be toggled.

AndroidTapp.com Rating

AndroidTapp.com Rating!AndroidTapp.com Rating!AndroidTapp.com Rating!AndroidTapp.com Rating!AndroidTapp.com Rating! (3.9 out of 5)

Should you Download Ninja Kaka – Fruit Dojo? Yes! A Good Game for Killing Some Time (or Fruit) with a Challenge!

This content was originally posted at AndroidTapp.com

Algadon Free Online RPG. Fully Mobile Friendly.

by Antonio Wells at September 01, 2010 08:49 PM

Leak: T-Mobile G2 Pricing Surfaces in Internal Inventory

Leak: T-Mobile G2 Pricing Surfaces in Internal InventoryT-Mobile has already teased us with the T-Mobile G2 being its first HSPA+ capable device, but other details such as pricing and availability have not yet been announced. While the rumored launch date for the device is September 29, we still have no idea on pricing at this time. Most new, high-end smartphones sell for [...]

by Natesh Sood at September 01, 2010 08:25 PM

Securing Android LVL Applications

[This post is by Trevor Johns, who's a Developer Programs Engineer working on Android. — Tim Bray]

The Android Market licensing service is a powerful tool for protecting your applications against unauthorized use. The License Verification Library (LVL) is a key component. A determined attacker who’s willing to disassemble and reassemble code can eventually hack around the service; but application developers can make the hackers’ task immensely more difficult, to the point where it may simply not be worth their time.

Out of the box, the LVL protects against casual piracy; users who try to copy APKs directly from one device to another without purchasing the application. Here are some techniques to make things hard, even for technically skilled attackers who attempt to decompile your application and remove or disable LVL-related code.

  • You can obfuscate your application to make it difficult to reverse-engineer.

  • You can modify the licensing library itself to make it difficult to apply common cracking techniques.

  • You can make your application tamper-resistant.

  • You can offload license validation to a trusted server.

This can and should be done differently by each app developer. A guiding principle in the design of the licensing service is that attackers must be forced to crack each application individually, and unfortunately no client-side code can be made 100% secure. As a result, we depend on developers introducing additional complexity and heterogeneity into the license check code — something which requires human ingenuity and and a detailed knowledge of the application the license library is being integrated into.

Technique: Code Obfuscation

The first line of defense in your application should be code obfuscation. Code obfuscation will not protect against automated attacks, and it doesn’t alter the flow of your program. However, it does make it more difficult for attackers to write the initial attack for an application, by removing symbols that would quickly reveal the original structure of a compiled application. As such, we strongly recommend using code obfuscation in all LVL installations.

To understand what an obfuscator does, consider the build process for your application: Your application is compiled and converted into .dex files and packaged in an APK for distribution on devices. The bytecode contains references to the original code — packages, classes, methods, and fields all retain their original (human readable) names in the compiled code. Attackers use this information to help reverse-engineer your program, and ultimately disable the license check.

Obfuscators replace these names with short, machine generated alternatives. Rather than seeing a call to dontAllow(), an attacker would see a call to a(). This makes it more difficult to intuit the purpose of these functions without access to the original source code.

There are a number of commercial and open-source obfuscators available for Java that will work with Android. We have had good experience with ProGuard, but we encourage you to explore a range of obfuscators to find the solution that works best for you.

We will be publishing a separate article soon that provides detailed advice on working with ProGuard. Until then, please refer to the ProGuard documentation.

Technique: Modifying the license library

The second line of defense against attack from crackers is to modify the license verification library in such a way that it’s difficult for an attacker to modify the disassembled code and get a positive license check as result.

This actually provides protection against two different types of attack: it protects against attackers trying to crack your application, but it also prevents attacks designed to target other applications (or even the stock LVL distribution itself) from being easily ported over to your application. The goal should be to both increase the complexity of your application’s bytecode and make your application’s LVL implementation unique.

When modifying the license library, there are three areas that you will want to focus on:

  • The core licensing library logic.

  • The entry/exit points of the licensing library.

  • How your application invokes the licensing library and handles the license response.

In the case of the core licensing library, you’ll primarily want to focus on two classes which comprise the core of the LVL logic: LicenseChecker and LicenseValidator.

Quite simply, your goal is to modify these two classes as much as possible, in any way possible, while still retaining the original function of the application. Here are some ideas to get you started, but you’re encouraged to be creative:

  • Replace switch statements with if statements.

  • Use XOR or hash functions to derive new values for any constants used and check for those instead.

  • Remove unused code. For instance, if you’re sure you won’t need swappable policies, remove the Policy interface and implement the policy verification inline with the rest of LicenseValidator.

  • Move the entirety of the LVL into your own application’s package.

  • Spawn additional threads to handle different parts of license validation.

  • Replace functions with inline code where possible.

For example, consider the following function from LicenseValidator:

public void verify(PublicKey publicKey, int responseCode, String signedData, String signature) {
    // ... Response validation code omitted for brevity ...
    switch (responseCode) {
        // In Java bytecode, LICENSED will be converted to the constant 0x0
        case LICENSED:
        case LICENSED_OLD_KEY:
            LicenseResponse limiterResponse = mDeviceLimiter.isDeviceAllowed(userId);
            handleResponse(limiterResponse, data);
            break;
        // NOT_LICENSED will be converted to the constant 0x1
        case NOT_LICENSED:
            handleResponse(LicenseResponse.NOT_LICENSED, data);
            break;
        // ... Extra response codes also removed for brevity ...
    }

In this example, an attacker might try to swap the code belonging to the LICENSED and NOT_LICENSED cases, so that an unlicensed user will be treated as licensed. The integer values for LICENSED (0x0) and NOT_LICENSED (0x1) will be known to an attacker by studying the LVL source, so even obfuscation makes it very easy to locate where this check is performed in your application’s bytecode.

To make this more difficult, consider the following modification:

public void verify(PublicKey publicKey, int responseCode, String signedData, String signature) {
       // ... Response validation code omitted for brevity …
        
        // Compute a derivative version of the response code
        // Ideally, this should be placed as far from the responseCode switch as possible,
        // to prevent attackers from noticing the call to the CRC32 library, which would be
        // a strong hint as to what we're done here. If you can add additional transformations
        // elsewhere in before this value is used, that's even better.
        java.util.zip.CRC32 crc32 = new java.util.zip.CRC32();
        crc32.update(responseCode);
        int transformedResponseCode = crc32.getValue();

        // ... put unrelated application code here ...
        // crc32(LICENSED) == 3523407757
        if (transformedResponse == 3523407757) {
            LicenseResponse limiterResponse = mDeviceLimiter.isDeviceAllowed(userId);
            handleResponse(limiterResponse, data);
        }
        // ... put unrelated application code here ...
        // crc32(LICENSED_OLD_KEY) == 1007455905
        if (transformedResponseCode == 1007455905) {
            LicenseResponse limiterResponse = mDeviceLimiter.isDeviceAllowed(userId);
            handleResponse(limiterResponse, data);
        }
        // ... put unrelated application code here ...
        // crc32(NOT_LICENSED) == 2768625435
        if (transformedResponseCode == 2768625435):
            userIsntLicensed();
        }
    }

In this example, we’ve added additional code to transform the license response code into a different value. We’ve also removed the switch block, allowing us to inject unrelated application code between the three license response checks. (Remember: The goal is to make your application’s LVL implementation unique. Do not copy the code above verbatim — come up with your own approach.)

For the entry/exit points, be aware that attackers may try to write a counterfeit version of the LVL that implements the same public interface, then try to swap out the relevant classes in your application. To prevent this, consider adding additional arguments to the LicenseChecker constructor, as well as allow() and dontAllow() in the LicenseCheckerCallback. For example, you could pass in a nonce (a unique value) to LicenseChecker that must also be present when calling allow().

Note: Renaming allow() and dontAllow() won’t make a difference, assuming that you’re using an obfuscator. The obfuscator will automatically rename these functions for you.

Be aware that attackers might try and attack the calls in your application to the LVL. For example, if you display a dialogue on license failure with an “Exit” button, consider what would happen if an attacker were to comment out the line of code that displayed that window. If the user never pushes the “Exit” button in the dialog (which is no not being displayed) will your application still terminate? To prevent this, consider invoking a different Activity to handle informing a user that their license is invalid, and immediately terminating the original Activity; add additional finish() statements to other parts of your code that get will get executed in case the original one gets disabled; or set a timer that will cause your application to be terminated after a timeout. It’s also a good idea to defer the license check until your application has been running a few minutes, since attackers will be expecting the license check to occur during your application’s launch.

Finally, be aware that certain methods cannot be obfuscated, even when using a tool such as ProGuard. As a key example, onCreate() cannot be renamed, since it needs to remain callable by the Android system. Avoid putting license check code in these methods, since attackers will be looking for the LVL there.

Technique: Make your application tamper-resistant

In order for an attacker to remove the LVL from your code, they have to modify your code. Unless done precisely, this can be detected by your code. There are a few approaches you can use here.

The most obvious mechanism is to use a lightweight hash function, such as CRC32, and build a hash of your application’s code. You can then compare this checksum with a known good value. You can find the path of your application’s files by calling context.GetApplicationInfo() — just be sure not to compute a checksum of the file that contains your checksum! (Consider storing this information on a third-party server.)

[In a late edit, we removed a suggestion that you use a check that relies on GetInstallerPackageName when our of our senior engineers pointed out that this is undocumented, unsupported, and only happens to work by accident. –Tim]

Also, you can check to see if your application is debuggable. If your application tries to keep itself from performing normally if the debug flag is set, it may be harder for an attacker to compromise:

boolean isDebuggable =  ( 0 != ( getApplcationInfo().flags &= ApplicationInfo.FLAG_DEBUGGABLE ) );

Technique: Offload license validation to a trusted server

If your application has an online component, a very powerful technique to prevent piracy is to send a copy of the license server response, contained inside the ResponseData class, along with its signature, to your online server. Your server can then verify that the user is licensed, and if not refuse to serve any online content.

Since the license response is cryptographically signed, your server can check to make sure that the license response hasn’t been tampered with by using the public RSA key stored in the Android Market publisher console.

When performing the server-side validation, you will want to check all of the following:

  • That the response signature is valid.

  • That the license service returned a LICENSED response.

  • That the package name and version code match the correct application.

  • That the license response has not expired (check the VT license response extra).

  • You should also log the userId field to ensure that a cracked application isn’t replaying a license response from another licensed user. (This would be visible by an abnormally high number of license checks coming from a single userId.)

To see how to properly verify a license response, look at LicenseValidator.verify().

As long as the license check is entirely handled within server-code (and your server itself is secure), it’s worth nothing that even an expert cracker cannot circumvent this mechanism. This is because your server is a trusted computing environment.

Remember that any code running on a computer under the user’s control (including their Android device) is untrusted. If you choose to inform the user that the server-side license validation has failed, this must only be done in an advisory capacity. You must still make sure that your server refuses to serve any content to an unlicensed user.

Conclusion

In summary, remember that your goal as an application developer is to make your application’s LVL implementation unique, difficult to trace when decompiled, and resistant to any changes that might be introduced. Realize that this might involve modifying your code in ways that seem counter-intuitive from a traditional software engineering viewpoint, such as removing functions and hiding license check routines inside unrelated code.

For added protection, consider moving the license check to a trusted server, where attackers will be unable to modify the license check code. While it’s impossible to write 100% secure validation code on client devices, this is attainable on a machine under your control.

And above all else, be creative. You have the advantage in that you have access to a fully annotated copy of your source code — attackers will be working with uncommented bytecode. Use this to your advantage.

Remember that, assuming you’ve followed the guidelines here, attackers will need to crack each new version of your application. Add new features and release often, and consider modifying your LVL implementation with each release to create additional work for attackers.

And above all else, listen to your users and keep them happy. The best defense against piracy isn’t technical, it’s emotional.

by Tim Bray (noreply@blogger.com) at September 01, 2010 08:13 PM

Android Programming Tutorials Version 3.0.1 Released

Between releasing Version 3.0 of Android Programming Tutorials and preparing the print release, I found a few minor bits that I wanted to fix. So, as the 3rd Edition in print slowly makes its way to online bookstores, I am releasing Version 3.0.1 in digital form. Subscribers now have access to the new version in PDF and EPUB; native Kindle editions will be generated (slooooooooooooowly) this weekend.

by Mark Murphy at September 01, 2010 02:29 PM

Simple connection example part II - TCP communication

SDK Version: 
M3
0
Last time I wrote about UDP connection. I got some comments about the problem, that UDP packets are not guaranteed to be delivered.
This time I’m going to show you the safer option, the TCP connection.
TCP is probably the most commonly used protocol, simply because it is used for so many applications such as HTTP, POP, SMTP, etc. TCP is a protocol which guarantees that the receiver will receive exactly what the sender sent - there will be no errors, it will be in the correct order, everything will work just fine.

TCP communication time diagram.

  1. try {
  2.         Socket s = new Socket("http://helloandroid.com",80);
  3. } catch (UnknownHostException e) {
  4.         // TODO Auto-generated catch block
  5.         e.printStackTrace();
  6. } catch (IOException e) {

read more

by jozsi at September 01, 2010 08:07 AM

Android Collectible Contest Part II: Andy vs Bender

Let’s face it, comedy’s a dead art form. Tragedy, now that’s funny.”

-Bender

It’s that time once again!  Did you miss out on getting your very own Dead Zebra Android Collectibles?  Here’s your second chance.  The first contest was a lot of fun with Rye being the eventual victor.  This time around the rules are a little different.  For the second installment we will be doing a caption contest of the photo above.  Sharpen your wit and give me your snappiest one liner in a comments below.

The winner will be hand chosen by yours truly.  Submissions must be entered by midnight Saturday.  Any comments left after that point will not be considered.  Can’t think of anything good?  Not to worry!  I will also be accepting your favorite Futurama Bender lines as well as general groveling and pleading.  Maybe a haiku about how much you love Android is more your style?  I mean really, if you leave a comment, you probably have a pretty good chance of being chosen.

Remember, just have some fun.  That’s the whole point, right?  Please limit one idea per comment, but you are not limited to a single comment.  Leave as many as you would like.  Winner gets one of these bad boys.  May the best robot/droid win!

by Dave D. at September 01, 2010 03:56 AM

How to build the perfect Android tablet, part 3: Market watch


Continuing our series on the perfect Android tablet ™, this latest entry is about software instead of hardware. Software applications will either make your tablet into a useful addition to your digital life, or an expensive ingredient in some eco-unfriendly compost pile. Finding the right software is crucial, and for that reason the number three feature on the perfect tablet is:

#3: Full Google software suite including the Android Market

Many recently announced Android tablets come with an alternative application stores such as AppsLib, GetJar, SlideME, or AndAppStore. Alternate markets are good to have for applications that are not allowed, for one reason or another, on Google’s mainstream Android capital-M Market. However, it’s the Market that has 100K+ applications and it’s the Market that is both the de facto and de jure center of the Android development universe.

For a one-time fee of $25, developers can get a publisher’s account on the Market and upload their free or paid applications. The Market is fraught with problems, such as tons of spam, a stingy 325-character limit on descriptions, and a woefully lacking list of supported countries. Google has been ever-so-slowly improving the Market over the last couple of years, for example by adding the amazingly innovative ability to post screenshots (insert sarcasm here). The fact that it’s flawed, though, doesn’t change the crucially important role of the Market in the Android ecosystem.

As a developer, I want to submit my application to one place and have it reach all users. I can do that with the iPhone, so why not on Android? (Of course Apple brooks no alternatives on the iPhone, so it’s not a fair comparison, but still there should be a default market that covers everyone.) Each additional place I have to publish is another place I have to make a publishing agreement with, keep up to date for each upgrade, and manage for marketing. More potential users with less friction for the developer equals more income and more interest in creating exciting games and applications.

Perhaps the greatest impediment to the universal Market is a somewhat nebulous list of restrictions and requirements that Google imposes which limits what types of devices can and can’t have the Market and other Google apps. Some of the restrictions I can understand, like requiring an accelerometer. Others make no sense, such as the need to include a telephone (with its requisite expensive monthly fee). Google needs to change these rules ASAP or at least show some flexibility to accommodate devices (such as as the 5 announced this week from Archos) that aren’t smartphones.

Along with the Market, the perfect tablet should have all the other parts of Google’s Android suite, including GMail, Maps, Navigation, Search, and so forth. The apps should either be pre-installed or available for download through the Market. This does not preclude a vendor from using, say, Bing search and Yahoo Mail by default to differentiate their offering. But Google’s suite is pretty good, and I ought to be able to use it if I want without having to search the fine print for the words, “with Google”.

What would you build into *your* perfect Android tablet? Share your thoughts in the comment area below. And check back next week to find out what’s next on my list.

by Ed Burnette at September 01, 2010 02:26 AM

August 31, 2010

SPIL Games Goes Mobile - Supports Android

Recently we posted an article about major flash gaming sites and their support for the Android OS making their games available for everyone to play via their Android phone. Well another major casual gaming company just announced they are getting on board with mobile gaming and one of the platforms they will be support is...you guessed it, Android!

Read more...


by ExtremeT (702records@gmail.com) at August 31, 2010 09:48 PM

Clocks, clocks and more clocks

Hello there! :)

While we are preparing our next clock collection I decided to blog about what we already have.
Here are some screenshots of our most popular and loved clocks.
I must note that all of them are available on Android Market in at least three sizes: 2×2, 3×3 (XL), 4×4 (XXL). Some even have 1×1.

But for this post I made screenshots of a 4×4 versions so you can see all the details :)

7art Clocks

And we have many more! You can always browse all of our clocks by visiting this page on appbrain.com

Let us know if you have some comments/suggestions or whatever! :)
Have a good day!

P.S. Links to download pages and more info:
Flower Parade Clock
Fire Clock
Rock Clock
Tribal Clock
Mystic Clock
Star Clock

by Dmitry at August 31, 2010 01:21 PM

Galcon and Cosmic Nitro come to the Palm Phones!

FACT: You either own a Palm Pre / Palm Pre Plus Phone or know someone who does! Let’s do this.


palm-galcon
Galcon for Palm
palm-nitro
Cosmic Nitro for Palm *FREE*

Here are some sweet games my friends created for the Palm platform – check ‘em out!

Smiles by Sykhronics Entertainment

Ancient Frog by Ancient Workship

Thanks!
-Phil

P.S. Galcon and Cosmic Nitro may also be available on the Palm Pixi eventually, so keep your eyes open!

by philhassey at August 31, 2010 03:27 AM

August 30, 2010

Samsung Galaxy Tab: Tips for a successful release

Thursday marks the day when Samsung is set to reveal its latest creation at the IFA expo in Germany.  Many are still wondering if such a device can compete against the iPad money making machine.  How will consumers respond given the large lead already obtained by Apple?  With the tablet market set to explode, all eyes will be on the first real Android iPad competitor.  So what can Samsung do to help ensure the success of the Galaxy Tab?  Let’s find out.

1) Productivity
Many will argue that tablets are designed more for consuming than producing, which results in a device that resembles a giant phone.  By leveraging the true multitasking capabilities offered by the Android system, a tablet may actually seem viable as a netbook replacement.  Yes, typing on an onscreen keyboard is still awkward; but for those that don’t want to lug around a bluetooth keyboard, Swype will be a great addition.  The key to productivity is a good platform, and Google has arguably the best cloud based office suite available in Google Docs.  It has always boggled my mind that a solid Google Docs experience is not available in web or app form on Android smart phones.  Documents are viewable, but cannot be edited.  Perhaps it’s because it was not needed until now.  For those like me that use Google Docs as a primary productivity tool, a seamless experience from desktop to tablet is a must.

2) Customized experience from the Galaxy S line
My biggest fear has been that the TouchWiz skin included on the Tab would be identical to the “S” lineup.  From the teasers we have seen, Samsung is making efforts to ease my anxiety.  As we got a peek at in the preview, the Gmail application will allow a split screen view.  Hopefully they did not stop here.  A tabbed chat experience would be highly welcome, as well as good calendar support.  With all the extra screen real estate it would be a shame to not fully leverage the experience.

3)  Multiple carrier release
Samsung recently announced their 1 millionth Galaxy S phone sold in the US.  How did they do it?  A multi-carrier launch.  A simple fact remains that many consumers are tied to specific carriers based on connection availability or work subsidies.  As with most problems, the solution is giving the consumer every option possible.  Samsung obviously has the connections and the knowledge from the Galaxy S launch; let’s see it again.  Hopefully the CDMA version of the Galaxy Tab spied this past weekend is more than just a proof of concept.

4)  Lower pricing than the iPad with competitive data rate
You want to hit Apple where it hurts?  Get them on price.  I will admit, my jaw dropped when the pricing was first revealed for the iPad at $499 for the wifi model.  Based on their premiums for desktops and laptops, I predicted to see a larger price tag.  With prices yet to be announced, Samsung has a chance to really blow the market open.  The Galaxy Tab will have smaller hardware than the iPad, so in theory should cost less to produce.  A small $25 or $50 undercut will not work.  Go big or go home.  If Samsung can offer the wifi version of the Galaxy Tab for $399 ($100 less than the iPad), a large impact will be made.  The American consumer has proven time and time again that they are more sensitive to sticker price than cost of associated plans.

5)  Developers, Developers, Developers!
While it’s not exactly something Samsung can directly control, developers will be a huge part of whether an Android tablet of any brand will succeed.  Will this prove to be further fragmentation of an already splintered operating system?  Probably, but it is a necessary evil.  While current Android apps do a decent job of scaling to various resolutions and screen sizes, tablet-specific apps and design features are needed to take full advantage of the Galaxy Tab’s potential.  One thing Samsung can do is create and foster an environment within their platform that caters towards developer needs.

6)  It’s all about performance, baby
One area that Apple has down to a science is a fast, smooth user experience.  Every time I stroll into an Apple store I find myself marveling at the responsiveness of iOS devices.  Joshua Topolsky of Engadget fame has a simple performance test that I tend to use as well.  Touch the screen and swipe back and forth as fast as possible.  Can the device keep up?  It should.  Sluggish performance will ruin a superior user experience no matter how good it looks.

7)  Don’t run out!
For the love of all that is good, make enough units!  If you can’t get it into the consumers hands while the buzz is hot, you’ll miss your window.  The HTC Incredible has been plagued with production issues, and sales have most likely suffered.  At the current rate of new products released, lifespan can be rather short.  Given that the Galaxy S lineup has been in good stock, let’s hope it won’t be a problem.

So there you have it.  If executed, will these points be enough to make you pull out your credit card?  What do you think needs to be done to not only match, but beat the iPad juggernaut?  Regardless of how things turn out, kudos to Samsung for stepping up and embracing Android as a viable platform.  The times, they are exciting.

by Dave D. at August 30, 2010 07:01 PM

The end of boring business meetings

Every time I have to sit through a meeting, I wish I could play a game of Business Bingo (also known as Buzzword Bingo) to pass the time. To my surprise, I couldn’t find any software to do that in the Android Market. I’m proud to announce that it finally is available. Boring meetings will [...]

by ElectricGoat at August 30, 2010 12:18 PM

What is Dalvik?

When it comes to the Oracle lawsuit against Google regarding Android, many sites and news outlets say that “Android applications are written in Java”.

As usual, this is a bit of shorthand.

To really understand what is going on, and where Oracle’s lawsuit comes into the picture, we need to have a bit more detailed picture of what really goes on when somebody writes an Android application:

  1. Developers write Java-syntax source code, leveraging class libraries published by the Android project, Apache Harmony, and other groups.

  2. Developers compile the source code into Java VM bytecode, using the javac compiler that comes with the Java SDK.

  3. Developers translate the Java VM bytecode into Dalvik VM bytecode, which is packaged with other files into a ZIP archive with the .apk extension.

  4. An Android device or emulator runs the .apk file, causing the bytecode to be executed by an instance of a Dalvik VM.

And for most of you, that description was gibberish. That’s the reason why we use the shorthand “Android applications are written in Java” — spelling out all those details every time would get very tiresome.

But, we need to sort out this gibberish to answer questions like:

  • What is Oracle suing over?
  • Why does this impact Google, if Java was released under the GPL?
  • Who else might be at risk due to Oracle’s decision to sue?

This article will try to explain three things, in lay terms:

  1. What does all that gibberish mean?
  2. What technical reasons are there for all that gibberish, compared to the similar gibberish an ordinary Java developer would use?
  3. Where do the Oracle patents and such tie in, generally speaking?

First, a few disclaimers:

  • In the interests of making this stuff make sense to more ordinary people, I will wind up using some shorthand of my own from time to time. Purists will probably come up with any number of places where what I say glosses over some details. I am certainly interested in making updates and corrections as needed, where those will materially help ordinary people understand things better.
  • I will use “Sun” to refer to the firm that invented Java and created the Java development tools. I will use “Oracle” to refer to the firm that acquired Sun and, therefore, owns patents, copyrights, and trademarks relevant to Java.
  • I am an Android advocate, though I do not work for Google. While this article is not strictly intended to steer readers’ opinions one way or another on the merits of Oracle’s lawsuit, I am sure that my biases will leak through.
  • This article is written for people who have a smattering of technical knowledge, enough to, say, have made some sense over what was going on in the various lawsuits that SCO was recently a part of.
  • I have a somewhat quirky sense of humor. You have been warned.

Explaining the Gibberish

Let’s take those four pieces of gibberish and examine them, one scary-looking phrase at a time.

“Java-syntax source code”

“Java” itself is a bit of shorthand. There are many things that can legitimately be called “Java”. One of those things is the syntax of the Java programming language.

Software developers write source code, in some programming language. Java offers one such language, but there are a crazy number of other programming languages, from FORTRAN and COBOL of the mid-20th century to newcomers like Scala and Clojure.

Each programming language has a syntax, just as each human language has its rules of grammar and roster of available words. The Java programming language has a specific syntax.

Most — but not all — Android developers will be creating Android applications by writing Java-syntax source code, no different than if they were writing Java applets, Java desktop applications, so-called “Java ME” applications for some mobile phones, or Java-based Web applications to run on a Web server somewhere.

“Class libraries published by the Android project, Apache Harmony, and other groups”

When you build a bridge, you typically do not start by opening an iron mine. Rather, you build the bridge from a mix of pre-fabricated and custom parts. Pre-fabricated parts might include girders and rivets. Somebody else was responsible for creating those girders, somebody else was responsible for mining the iron ore used to create the steel used to create the girders, and so on.

Similar, in software development, applications are rarely created completely from scratch. Instead, developers take advantage of pre-fabricated software routines. One term for those, used in “object oriented” languages like Java, is a “class library”.

I mentioned earlier that there are many things that are called “Java”. Besides the syntax of the source code, some people refer to certain class libraries as being “Java”. Sun developed three major flavors of these class libraries, one for conventional desktop environments (Java SE), one for a limited mobile environment (Java ME), and one for server-based Web applications (Java EE).

Android has class libraries. Some of those class libraries were written by the core Android team, made up of Google employees and contributors from other firms. The rest of the class libraries come from other open source projects. Notable among these is Apache Harmony, a project aiming to create a complete replacement implementation of all pieces of Java.

Specifically, Harmony offers a class library that is generally compatible with classes that come from Java itself — they have the same names for classes, for example. Android has included some — but not all — of the Harmony classes in the Android OS. Hence, Android developers can write code that use “Java” classes, despite the fact that those classes did not come from Sun and whose copyrights are not held by Oracle.

Java VM bytecode

Yet another thing that people sometimes refer to as “Java” is the Java virtual machine, or Java VM for short.

Many programming languages are “compiled”, meaning that a tool converts the source code that developers type in into something that a “machine” can execute directly. You can think of this as akin to converting a singer’s voice into the bits and bytes that go into an MP3 file or onto a CD.

Many compiled programming languages are compiled into ”opcodes” that are designed to be run by some specific sort of chip. There are opcode sets for the Intel chip in your notebook, and other opcode sets for the ARM chip in your smartphone, and still other opcode sets for the MIPS chip in your DVD player. If you want your source code to run on all three types of chips, you would need to compile it three times.

Some compiled programming languages, though, target not a real chip, but a fake one — a virtual machine. A virtual machine (VM) is a piece of software that mimics the functionality of a real chip. It runs bytecode (the VM equivalent of opcodes) designed for that specific type of VM. Different versions of the VM software can then be written to run on different types of real chips (Intel, ARM, MIPS, etc.). This way, a compiled VM application can run on a wide range of physical chips, without having to recompile the source code to target each physical chip.

Java is perhaps the most famous language that uses a virtual machine — the JVM. It was not the first and is not the only such language. Other popular languages that use VMs include Perl, Python, and Smalltalk — the latter is the language behind the Squeak app that Apple removed from the App Store for violating its “Apple-only languages” policy. Similarly, Microsoft’s .NET languages (e.g., VB.Net, C#) run on a virtual machine called the Common Language Runtime (CLR).

The javac compiler that comes with the Java SDK

Still another thing that some people refer to as “Java” is the Java software development kit, or Java SDK (or, occasionally, JDK).

The Java SDK represents the set of tools and files needed by a programmer to write Java applications. Among other things, it includes a compiler tool — javac — that converts Java source code into Java bytecode that can be executed by the Java VM.

Dalvik VM bytecode

The Dalvik VM is a virtual machine, along the lines of the Java VM, the Parrot VM (Perl), Microsoft’s CLR, and so forth. Dalvik was written principally for use with Android, though some have experimented with using it separately.

Each VM has its own bytecode, just as each type of CPU chip has its own opcode. Hence, the Dalvik VM bytecode is not the same as the Java VM bytecode, or the Parrot VM bytecode, etc.

Translate the Java VM bytecode

That being said, Android does come with tools that translate compatible Java VM bytecode into Dalvik VM bytecode. This allows developers to write Java-syntax source code, compile it with the Java SDK’s compiler, then get Android-compatible Dalvik VM bytecode in the end.

Note that not all Java VM bytecode is compatible with the translation process, and therefore with Dalvik by extension. Notably, old bytecode (Java 1.4.2 and previous) and bytecode compiled by non-Sun Java compilers will fail to translate.

An instance of a Dalvik VM

A Java program is run by a Java virtual machine. The VM reads in the Java bytecode, finds the desired entry point (a main method on a designated class), and executes the bytecode instructions. Similarly, an Android program is run by a Dalvik virtual machine.

If you wanted to run two separate Java programs at once, you will usually wind up with two copies of the Java virtual machine running on your computer. Similarly, when you run more than one Android application, each application usually gets its own Dalvik VM instance.

So, Why Dalvik?

OK, so, why did anyone bother to create Dalvik in the first place? Why not just use plain ol’ ordinary Java?

I do not claim to know all of the rationale behind the decision. That being said, here are at least some of the known technical reasons:

Memory Consumption

As noted above, if you want to run more than one Java or Android application, each application gets its own virtual machine instance. However, in Java, that will require a substantial amount of RAM, and on Dalvik it does not.

Why? Sharing.

Much of what is in a VM is read-only. For example, the class libraries each VM uses do not typically get modified when a program using those libraries is run.

In Java, each application gets its own copy of all the read-only portions of the VM.

In Dalvik, each application shares one master copy of all the read-only portions of the VM, using techniques like copy-on-write.

As a result, Android, through Dalvik, can run more programs in a tightly-constrained memory environment, like a smartphone.

Security

Saving memory is good. It allows us to do more with less. However, with Dalvik, there is an extra important benefit: it gives us better security that might otherwise be possible.

Linux has a security model baked into the kernel, one involving users and permissions. Each Linux program is run under a certain user’s account, whether that be a real person or a fictitious account for a particular program (e.g., an apache account that runs a Web server). All files in a proper Linux filesystem are owned by some user. Files that are marked as usable only by the user can be read and written to by that user’s own program, but cannot be read or modified by any other program, since other programs run as other users.

With me so far?

In Android, by default, each application gets its own user account — akin to the apache scenario above. When you run an Android application, it can access its own files, but it cannot access other applications’ files by default, courtesy of it running as a certain user.

This is only possible because of the memory sharing described in the previous section. If Android were limited to a traditional Java VM, each program would take up too much memory. Android applications might all have to share a single Java VM and all run as the same user, meaning one application could access another application’s data. You would have to layer all sorts of security cruft into the Java/Android environment to isolate applications from one another.

But, the memory sharing means each Android application can have its own Dalvik VM and run under its own user account. As a result, we get the tried-and-true Linux security model, making it significantly less likely that one application will be able to abscond with another application’s data.

Register-Based VM

There are two ways to implement a virtual machine, “stack-based” and “register-based”. Java VMs tend to be stack-based. The Dalvik VM is register-based. This too is an optimization designed for mobile environments, where RAM is limited, as you can get more stuff done in fewer bytes, on average, with a register-based architecture.

by Mark Murphy at August 30, 2010 10:56 AM

THE GUIDE TO A BETTER CALL OF DUTY IN YOU! (THE RIFLES EDITION)


My god… Call of Duty Black Ops is coming out soon and yet no one has yet to prepare you for the one thing that you’ll probably find most frustrating about the game… the multiplayer. Don’t be modest; if you think your pretty f’ing awesome at the game, think again as you are probably either just lucky, or you’re just shitting out the right answers every time you enter a lobby. There are several basics I’m going to run by you in this little guide I decided to do for the upcoming Black Ops game, and I will take you around and about with the basics of how to be better at Call of Duty in general. Follow these simple rules and you actually may live to see to getting that UAV. This first part is a general overview of the game…

Before I even start, I have to run the basics over with you on how to play the game… left sticks to move, right sticks to aim… etc, I’m tired so I’m not going to explain all of that to you. I mean, honestly… I ain’t no tutor, I’m just here to make you better—not to have you learn everything from scratch, that’ll be silly. After you get all that done and out of the way, you must decide what guns you want to use… here are the basic designs you have to keep in mind when you pick your classes and set them up for later.

“AUTO-RIFLES”

Now these come in different shapes and different sizes, considering what you are trying to perform on the battlefield. There is sheer power at expense of recoil, frankly the Tar-21 rifle and the AK-47 rifles (to an extent to the Scar-H). Now many people just use them because they got a couple kills here and there with them and believe them to be superior to other rifles—it’s a common occurrence to see a couple home-boys from NYC bitching and moaning about how I was cheating and how the Tar-21 should’ve beat me at the distance across Wasteland. Every rifle is better than the other in some respect, this decision must be brought down to limitations and how every rifle interacts with the player…

Auto-rifles are have a couple classes… accurate yet weak, powerful yet with blind-sidingly bad recoil, middle of the roads and rifles that are both weak and wildly inaccurate but compensate with a high firing rate—now there are tons of rifles, but I will give you the load down on the basics of each class. I’m not your bloody teacher, if I was… well, I don’t have anything witty to say after that, so instead I will say one—hey, a penguin. Let’s talk about the most common rifle to be found in Team Deathmatch, the accurate yet weak weapons of the game—the most common being the M4A1 and ACR rifles… the only ones ever really used that often in the game.

Both these rifles are very accurate over ranges of many yards, and as a result you don’t want to meet either of these rifles if you’re fighting a ranged war—they can counter snipe if they really wanted to, but I assume you’re a bum so disregard that comment. Both the rifles are similar, except one has more recoil and a higher firing rate than the other. Now when deciding what rifle you want to use, you have to consider two situations… what level you are on, and what type of fight you’ll find yourself predominately in most of the game (at the beginning, you’ll have to guess). The M4 has a higher firing rate, has a higher tolerance rate for different styles and different attachments, it’s the jack of all trades type of rifle many people turn to if they can’t find a rifle to best suit the job. It can do anything and everything exceptionally well—it can’t eat babies, so don’t be a smart ass here… but when it comes to accuracy, give it up to the ACR.

The ACR also has a fairly high tolerance rate for attachments and perks, but the weak rounds make it that you won’t be choosing this as a stealth class anytime as often as you would being the M4—it takes five shots to take a man down without stopping power, four with, and top that with the fact that it has a fairly low firing rate compared to the M4. It won’t stand up much of a chance indoors or in urban combat where the combat will be fast and fluid. But with that being said, you can base-rape, eat babies, stomp on a man’s good snake and talk to Jesus with this bad-boy on open ranges where most of your foes are positioned off course—it’ll beat the M4 in a long range battle, but will have a higher chance of losing at medium to close range. Pick your battles wisely, and your rifles just as well—be ahead of the pack and follow those suits.

Lets now talk about the powerful yet inaccurate rifles of the game, namely the Tar-21 and the AK-47. Both these rifles are superb and are superb for one reason and one reason only… firing rate and hellish power that could only be unlocked by that dude in Star Trek—you know, the one with the funny looking ear? The pale one, or whatever. These rifles are good only in close to medium ranged fights and will not be considered effective against targets yards away from your own dude. These rifles are better suited to indoor and urban combat and should be avoided when on outdoor levels such as Afghan or Wasteland due to the high recoil.

The Tar-21 is a very strong rifle with great handling and decent tolerances that will accept most of everything for perks and attachments—though I strongly thing against putting anything but stopping power on this rifle or it will lose the one characteristic you’ll like about this weapon, the power. The recoil is easier to use then that of the AK-47 because it’s very predictable and easy to compensate for when on full auto—that or burst firing. It’ll always fling back into you and can be used to counter-snipe in hardcore modes because of the power (in hardcore, you don’t need stopping power to be effective, for one shot kills). The only interesting thing about this rifle is the red dot sight, which is considered peculiar by many. It’s the MARS sight standard to its real-life counterpart—but while very good, considerably accurate and does reduce the recoil at range… the small reticule and the thick outer-frame of the sight makes it looked down on when compared the holographic. It glares in the sun of the game, so many just use it to get the holographic when they unlock it… keep in mind though, it boils down the preference.

The AK-47 is a weird weapon as it can be very crude when testing for recoil. It’s just as strong in every aspect of the Tar-21, but the difference lies in how it handles it’s recoil. It tends to flare up at a certain point and tends to stay at that one point till you let go of the trigger. Burst fire is essential when it comes to this rifle and if you don’t get the handle of milking the trigger (burst firing on autos), you will find yourself short of another powerful, versatile weapon that could theoretically (big words, wow :D) beat the ACR at range. The only problem with this weapon is that the red dot sight, while makes it easy to aim, will decrease minimum damage at range. It take at least five rounds to kill a man with the sight, so it’s best to keep to the crude iron sight—this is an assault weapon, not meant for ranged combat, so run in like a mad-man if you need to… Sylvester Stallone would be proud—restrain yourself from using this weapon on outdoor maps as it will come up short against M4’s.

Now let’s talk about the odd ball rifles… the Scar-H and the F2000. Both these rifles are considered odd as they blur lines in-between each weapon set—and weapon characteristics. First off, the Scar-H—perhaps the most powerful weapon of the game due to the great mix of power and accuracy of all weapons to come before it, this is the weapon that would be offspringed if the M4 and the ACR had a baby… then mean-while, the Tar-21 and the AK-47 meet at this little seedy hotel to discuss their marital issues, then have angry pity sex with one another. Then ten years time, those two kids met and had intercourse (Pineapple Express, I know :D) the Scar-H is what would come back out fighting.

This is a jack of all trades weapon that will serve you well on any map I could think of as it has power, and accuracy all in one—though a jack of all trades, it’s still weak compared to the parent models that birthed it. The Scar-H has less recoil than the Tar-21, controllable and still able to make shots from across the map with little to no loss in ammo… but the ACR will beat it down at range. The Scar-H has the accuracy to take snipers down at range, but the visual recoil will throw you off when pin-point accuracy is wanted, so you will find yourself short when up against an M4. The Scar-H has power, but suffers with a lower firing rate, so you will die at close range—so all in all it adds up to a very average powerful rifle that can be used by anyone, and everyone… though it isn’t a special weapon—it’s tolerances are great for all attachments and styles, it does exceedingly well as a stealth rifle with cold-blood and silencers.

The last odd-ball rifle is the F2000… arguably the worst rifle in the game as complained about by most. But after I used it, it’s all a matter of perspective—it’s a hate it or love it rifle, nothing more as such. This rifle is so astoundingly uncontrollable, that the first three shots have you in the air in seconds… this isn’t for new-players to use, even experienced players less they are running and gunning with stopping power. High firing rate and low damage make it better suited to room clearances with steady aim. So in other words, this rifle is much better at closer ranges where firing rate and power will trump accuracy. Tolerance ratings are fairly high, but the two most common perks added to this rifle is silencers and grenade launchers… for obvious reasons. This gun is only to be used in urban settings, never ever outside… trust me, I’m super cereal… I didn’t have anything witty to say, that’s how serious I am!

“BURST-RIFLES”

These are jarring rifles that will admittedly screw you up the first time you go ahead and use them… this is assuming that you are new to these two rifles, assuming you are the type of person that prefers a ton of rounds on target than just sips of tea to quench your thirst. These two rifles are legendary in power, but are looked down upon by supposed “pro’s” and players alike for their power and accuracy at ranges where a sniper should prevail. Both of the two, the FAMAS and the M16 are similar in scope… but both of them have subtle differences that will give you a very slim choice on which one you will take to the battlefield with you.

Let’s start out with the first rifle you ever get your hands on in the game… the FAMAS. It’s a very strong weapon like the M16 was back in the first Modern Warfare. It has a three round burst like the M16… it kills in one burst, has low recoil, it has high accuracy, and can be shot fairly fast if you have a quick trigger to work with. So what’s the big difference? Look at the stats… low damage and a higher firing rate. Assuming all three bullets connect with your target, it will put him down in one burst… but doesn’t the M16 do that to? I’ll get to that in a moment. The FAMAS can accept any attachment and any perk, but stopping works best for a perk two as the burst is weak enough as it is. Sleight of hand and Scavenger helps for ammo consumption and long reload times compared the M16, and the ACOG can be fairly helpful out in open world maps where the extra range helps.

The M16 is a fantastic rifle which in Modern Warfare 2 has been nerfed incrementally to be fair along with the FAMAS—they’re identical rifles with only a couple differences which makes them useful in differing aspects, depending on what you believe to be a better suit in what map you play on. It’s a very strong rifle with characteristics similar to the FAMAS in every respect, both accuracy and characteristically, however the FAMAS at range has better damage output then that of the M16—the M16 loses power at range when making far shots, requiring 1-2 more burst to put a man down, and the FAMAS has lower recoil than the M16 when they both have red dot sights. If with a holographic however, the M16 gets an added bonus in recoil reduction, making it a truly fearful gun a range, even a closer ranges if you’re ready. This rifle is great in all levels except in levels such as Invasions as there will be considerable indoor combat, giving you no significant advantage at range. This rifle is very affiliated with stopping power, but still a strong suit with other perks if you so choose—use the Holographic to give yourself an advantage at long range.

In the end, both rifles are the same… but its best to say that the FAMAS is just a stop gap for the burst rifles as the M16 is the best and most common burst rifle in the entire game. Three shots per pull of the trigger, the M16 will almost always come out on top with low recoil and very power shot per bullet. It’s higher tolerance for attachments is also an added bonus, so keep it in mind when you unlock both and are trying to figure out what rifle to use.

“ONE-SHOT… ONE-KILL”

The last gun for this segment is something of a mystical legend and a fairly uncommon rifle out in Call of Duty when compared to the guns I mentioned above (not the F2000, that’s the most uncommon rifle in the entire game). It’s like a burst rifle… but much more powerful, yet much slower firing rate wise, firing at the rate of which you pull the trigger. It’s incredibly strong, and very accurate with very high tolerance ratings for almost any perk to go with it. It can live without stopping power as it is already very powerful and can accept a white array of attachments for anything you could ever want. Many consider this to the ideal stealth rifle of choice as it can take cold-blood and still be incredibly effective at any range against any assault rifle, sniper rifle, etc.

The only problem with this powerful rifle is two things… close range effectiveness and sighting problems. It’s a single shot rifle and can only be fired as fast as you can pull the trigger… well if a man comes at you with a shotgun, or a bloody UMP45, you’re boned. I mean, you will be base-raped, bat-shit, raged-quit if someone comes flying at you, at speed with commando on with a knife… or a man with an AA-12 comes spraying room after room—you’re sitting there all hot and bothered… then BAM! Feel my pimp hand. This problem can be alleviated by not camping, not masterbati—sorry about that one, not waiting indoors, and carrying a shotgun at all times with you… that or a claymore, whatever comes first. The other problem is in regards with the red dot sight of the gun… off center. When it comes to this rifle, it can be very difficult to sight your target… and if you have this rifle, keep in mind that the red dot sight is off center and to hit your target, you have to aim the bottom right of the dot itself.

Like the M16, equipping a holographic sight on the rifle gives it a significant advantage at range… three shots without stopping power will take a man down and keep him down. The holographic sight solves the off center red-dot sight issue, but also raises the minimum damage range to forty… this makes this rifle deadly at range against almost anything, so keep that in mind when you say to yourself… “I ain’t going to use that red-dot sight because of what he just said about it earlier…” and that hereby concludes the guide on rifles for this feature… stay tuned in next week for an edition dealing with… SUB-MACHINE GUNS

by Wallpapers Android- at August 30, 2010 06:40 AM

New smart phone help with choice please?


I have been offered a Samsung Galaxy for £150, HTC desire for £100 or a Samsung Apollo free on a contract. My understanding that Android is better for a smart phone and these are.
I currently have a Nokia 5800 Xpressmusic. It does everything I need to be honest LOL just fancy new phone and its getting a bit battered although still works fine.
I used my phone for photos and sometimes videos of my children, the odd email and facebook, ebay and of course calls and texts. I have a sat nav so unless it was free and more up todate I wouldn't use it.The contract will be for 2 years so I want something that technology wise and physically will stand the test of time.
Can anyone offer me some advice on these phones or any others that may fit the bill?
Many thanks

by Wallpapers Android- at August 30, 2010 01:59 AM

August 29, 2010

HTC EVO 4G / HTC A9292 / Supersonic Screen Protector

HTC EVO 4G / HTC A9292 / Supersonic Screen Protector

HTC EVO 4G Screen protector prevents your phone’s screen from getting scratched.

(more…)

August 29, 2010 09:49 PM

Splodey!

Mark Neil was one of the first people to use libgdx and its box2D wrapper earlier this year. He developed an original Android game called Splodey and is now preparing to release it to the market. Go checkout his site at http://www.pointergames.com/ to find out more about Mark’s company and games.

by Mario at August 29, 2010 08:52 PM

Help Me Write a Book!

I just finished writting the proposal for the APress book “Beginning Android Game Programming”. This includes the full detailed Table of Contents. I would love the get feedback from you people out there on the contents of the book. You can find the table of contents at http://www.file-pasta.com/file/0/toc.pdf.

What i want from you:

  • What do you think of the structure of the toc?
  • Is there anything missing for a beginner’s book?
  • Is there anything you’d like to see added?

I will send this proposal to Apress tomorrow evening. Maybe i’ll wait till tuesday evening if i get a lot of feedback to integrate. Thanks for any replies!

by Mario at August 29, 2010 08:48 PM

WEEKLY WRAP: Elsewhere in Android this week

Time for our lazy Sunday stroll through the Android news of the last week, in which we feature the news stories we didn’t do as a sort of punishment for not trying hard enough at the time.

So here’s the biggest news we didn’t report over the last seven days, along with the more interesting mentions Android picked up from the mainstream media.

Game advocate DeLoura departs Google after 4 months
Oh dear. We remember him joining as if it was yesterday. Sounds like he was getting bullied, or perhaps didn’t like the commute? Or his desk position?

Revealed: Android Honeycomb next up from Google
A nice scoop from Team Techradar. We didn’t fancy having to base a whole story around the revelation of one word, though. We’re not Orson Welles.

Texting World Record Broken on Samsung Galaxy S
It can’t have been much of a world record to begin with, if a woman in a supermarket beat it after being asked to try as a PR stunt. What happened next? Did she beat Usain Bolt in an impromptu 100m race around some traffic cones in the car park?

text-record


Vodafone gets in another fine mess over Android, this time with Galaxy S
Didn’t follow this one at all. Suspect it was largely nonsense blown out of all proportion?

This Android Tablet Doesn’t Need Glasses for 3D
Not convinced there’s any sort of market for tablets or 3D. Putting them together won’t help.

ViewSonic Android tablet: Pictures emerge
Those buttons don’t look like Android icons, but then it’s possible ViewSonic doesn’t get the most up-to-date branding emails from Google.

viewsonic android tablet

Hotmail push email headed for iPhone and Windows Phone 7
We’ve noticed that Hotmail now auto-refreshes itself in the desktop web browser already. No idea how Exchange works, though. We’ll read up on it.

Sony’s Newest Android Phone Is a High Dose of Can-Do
The Americans like the X10. Guess it’s a size thing.

Gorgeous, mysterious, EVO-ish HTC device headed for Verizon
We’re already very confused about HTC’s future line-up. Ignored this one on purpose. Too many model names and megapixel counts swimming about in our heads at the moment.

mystery htc kickstand

That’ll do for today, unless you want another 20 links to rumours about Android tablets? We’re guessing not. See you later or next week, everyone.

Related posts:

  1. WEEKLY WRAP: Elsewhere in Android this week
  2. WEEKLY WRAP: Elsewhere in Android this week
  3. WEEKLY WRAP: Elsewhere in Android this week

by Gary C at August 29, 2010 09:36 AM