Thursday, July 28, 2011

Custom Class Loading in Dalvik

[This post is by Fred Chung, who’s an Android Developer Advocate — Tim Bray]

The Dalvik VM provides facilities for developers to perform custom class loading. Instead of loading Dalvik executable (“dex”) files from the default location, an application can load them from alternative locations such as internal storage or over the network.

This technique is not for every application; In fact, most do just fine without it. However, there are situations where custom class loading can come in handy. Here are a couple of scenarios:

  • Big apps can contain more than 64K method references, which is the maximum number of supported in a dex file. To get around this limitation, developers can partition part of the program into multiple secondary dex files, and load them at runtime.

  • Frameworks can be designed to make their execution logic extensible by dynamic code loading at runtime.

We have created a sample app to demonstrate the partitioning of dex files and runtime class loading. (Note that for reasons discussed below, the app cannot be built with the ADT Eclipse plug-in. Instead, use the included Ant build script. See Readme.txt for detail.)

The app has a simple Activity that invokes a library component to display a Toast. The Activity and its resources are kept in the default dex, whereas the library code is stored in a secondary dex bundled in the APK. This requires a modified build process, which is shown below in detail.

Before the library method can be invoked, the app has to first explicitly load the secondary dex file. Let’s take a look at the relevant moving parts.

Code Organization

The application consists of 3 classes.

  • com.example.dex.MainActivity: UI component from which the library is invoked

  • com.example.dex.LibraryInterface: Interface definition for the library

  • com.example.dex.lib.LibraryProvider: Implementation of the library

The library is packaged in a secondary dex, while the rest of the classes are included in the default (primary) dex file. The “Build process” section below illustrates how to accomplish this. Of course, the packaging decision is dependent on the particular scenario a developer is dealing with.

Class loading and method invocation

The secondary dex file, containing LibraryProvider, is stored as an application asset. First, it has to be copied to a storage location whose path can be supplied to the class loader. The sample app uses the app’s private internal storage area for this purpose. (Technically, external storage would also work, but one has to consider the security implications of keeping application binaries there.)

Below is a snippet from MainActivity where standard file I/O is used to accomplish the copying.

  // Before the secondary dex file can be processed by the DexClassLoader,
// it has to be first copied from asset resource to a storage location.
File dexInternalStoragePath = new File(getDir("dex", Context.MODE_PRIVATE),
SECONDARY_DEX_NAME);
...
BufferedInputStream bis = null;
OutputStream dexWriter = null;

static final int BUF_SIZE = 8 * 1024;
try {
bis = new BufferedInputStream(getAssets().open(SECONDARY_DEX_NAME));
dexWriter = new BufferedOutputStream(
new FileOutputStream(dexInternalStoragePath));
byte[] buf = new byte[BUF_SIZE];
int len;
while((len = bis.read(buf, 0, BUF_SIZE)) > 0) {
dexWriter.write(buf, 0, len);
}
dexWriter.close();
bis.close();

} catch (. . .) {...}

Next, a DexClassLoader is instantiated to load the library from the extracted secondary dex file. There are a couple of ways to invoke methods on classes loaded in this manner. In this sample, the class instance is cast to an interface through which the method is called directly.

Another approach is to invoke methods using the reflection API. The advantage of using reflection is that it doesn’t require the secondary dex file to implement any particular interfaces. However, one should be aware that reflection is verbose and slow.

  // Internal storage where the DexClassLoader writes the optimized dex file to
final File optimizedDexOutputPath = getDir("outdex", Context.MODE_PRIVATE);

DexClassLoader cl = new DexClassLoader(dexInternalStoragePath.getAbsolutePath(),
optimizedDexOutputPath.getAbsolutePath(),
null,
getClassLoader());
Class libProviderClazz = null;
try {
// Load the library.
libProviderClazz =
cl.loadClass("com.example.dex.lib.LibraryProvider");
// Cast the return object to the library interface so that the
// caller can directly invoke methods in the interface.
// Alternatively, the caller can invoke methods through reflection,
// which is more verbose.
LibraryInterface lib = (LibraryInterface) libProviderClazz.newInstance();
lib.showAwesomeToast(this, "hello");
} catch (Exception e) { ... }

Build Process

In order to churn out two separate dex files, we need to tweak the standard build process. To do the trick, we simply modify the “-dex” target in the project’s Ant build.xml.

The modified “-dex” target performs the following operations:

  1. Create two staging directories to store .class files to be converted to the default dex and the secondary dex.

  2. Selectively copy .class files from PROJECT_ROOT/bin/classes to the two staging directories.

          <!-- Primary dex to include everything but the concrete library
    implementation. -->
    <copy todir="${out.classes.absolute.dir}.1" >
    <fileset dir="${out.classes.absolute.dir}" >
    <exclude name="com/example/dex/lib/**" />
    </fileset>
    </copy>
    <!-- Secondary dex to include the concrete library implementation. -->
    <copy todir="${out.classes.absolute.dir}.2" >
    <fileset dir="${out.classes.absolute.dir}" >
    <include name="com/example/dex/lib/**" />
    </fileset>
    </copy>
  3. Convert .class files from the two staging directories into two separate dex files.

  4. Add the secondary dex file to a jar file, which is the expected input format for the DexClassLoader. Lastly, store the jar file in the “assets” directory of the project.

        <!-- Package the output in the assets directory of the apk. -->
    <jar destfile="${asset.absolute.dir}/secondary_dex.jar"
    basedir="${out.absolute.dir}/secondary_dex_dir"
    includes="classes.dex" />

To kick-off the build, you execute ant debug (or release) from the project root directory.

That’s it! In the right situations, dynamic class loading can be quite useful.

Wednesday, July 27, 2011

New Tools For Managing Screen Sizes

[This post is by Dianne Hackborn and a supporting cast of thousands; Dianne’s fingerprints can be found all over the Android Application Framework — Tim Bray]



Android 3.2 includes new tools for supporting devices with a wide range of screen sizes. One important result is better support for a new size of screen; what is typically called a “7-inch” tablet. This release also offers several new APIs to simplify developers’ work in adjusting to different screen sizes.

This a long post. We start by discussing the why and how of Android “dp” arithmetic, and the finer points of the screen-size buckets. If you know all that stuff, you can skip down to “Introducing Numeric Selectors” to read about what’s new. We also provide our recommendations for how you can do layout selection in apps targeted at Android 3.2 and higher in a way that should allow you to support the maximum number of device geometries with the minimum amount of effort.

Of course, the official write-up on Supporting Multiple Screens is also required reading for people working in this space.

Understanding Screen Densities and the “dp”

Resolution is the actual number of pixels available in the display, density is how many pixels appear within a constant area of the display, and size is the amount of physical space available for displaying your interface. These are interrelated: increase the resolution and density together, and size stays about the same. This is why the 320x480 screen on a G1 and 480x800 screen on a Droid are both the same screen size: the 480x800 screen has more pixels, but it is also higher density.

To remove the size/density calculations from the picture, the Android framework works wherever possible in terms of "dp" units, which are corrected for density. In medium-density ("mdpi") screens, which correspond to the original Android phones, physical pixels are identical to dp's; the devices’ dimensions are 320x480 in either scale. A more recent phone might have physical-pixel dimensions of 480x800 but be a high-density device. The conversion factor from hdpi to mdpi in this case is 1.5, so for a developer's purposes, the device is 320x533 in dp's.

Screen-size Buckets

Android has included support for three screen-size “buckets” since 1.6, based on these “dp” units: “normal” is currently the most popular device format (originally 320x480, more recently higher-density 480x800); “small” is for smaller screens, and “large” is for “substantially larger” screens. Devices that fall in the “large” bucket include the Dell Streak and original 7” Samsung Galaxy Tab. Android 2.3 introduced a new bucket size “xlarge”, in preparation for the approximately-10” tablets (such as the Motorola Xoom) that Android 3.0 was designed to support.

The definitions are:

  • xlarge screens are at least 960dp x 720dp.


  • large screens are at least 640dp x 480dp.


  • normal screens are at least 470dp x 320dp.


  • small screens are at least 426dp x 320dp. (Android does not currently support screens smaller than this.)


Here are some more examples of how this works with real screens:

  • A QVGA screen is 320x240 ldpi. Converting to mdpi (a 4/3 scaling factor) gives us 426dp x 320dp; this matches the minimum size above for the small screen bucket.


  • The Xoom is a typical 10” tablet with a 1280x800 mdpi screen. This places it into the xlarge screen bucket.


  • The Dell Streak is a 800x480 mdpi screen. This places it into the bottom of the large size bucket.


  • A typical 7” tablet has a 1024x600 mdpi screen. This also counts as a large screen.


  • The original Samsung Galaxy Tab is an interesting case. Physically it is a 1024x600 7” screen and thus classified as “large”. However the device configures its screen as hdpi, which means after applying the appropriate ⅔ scaling factor the actual space on the screen is 682dp x 400dp. This actually moves it out of the “large” bucket and into a “normal” screen size. The Tab actually reports that it is “large”; this was a mistake in the framework’s computation of the size for that device that we made. Today no devices should ship like this.


Issues With Buckets

Based on developers’ experience so far, we’re not convinced that this limited set of screen-size buckets gives developers everything they need in adapting to the increasing variety of Android-device shapes and sizes. The primary problem is that the borders between the buckets may not always correspond to either devices available to consumers or to the particular needs of apps.

The “normal” and “xlarge” screen sizes should be fairly straightforward as a target: “normal” screens generally require single panes of information that the user moves between, while “xlarge” screens can comfortably hold multi-pane UIs (even in portrait orientation, with some tightening of the space).

The “small” screen size is really an artifact of the original Android devices having 320x480 screens. 240x320 screens have a shorter aspect ratio, and applications that don’t take this into account can break on them. These days it is good practice to test user interfaces on a small screen to ensure there are no serious problems.

The “large” screen size has been challenging for developers — you will notice that it encompases everything from the Dell Streak to the original Galaxy Tab to 7" tablets in general. Different applications may also reasonably want to take different approaches to these two devices; it is also quite reasonable to want to have different behavior for landscape vs. portrait large devices because landscape has plenty of space for a multi-pane UI, while portrait may not.

Introducing Numeric Selectors

Android 3.2 introduces a new approach to screen sizes, with the goal of making developers' lives easier. We have defined a set of numbers describing device screen sizes, which you can use to select resources or otherwise adjust your UI. We believe that using these will not only reduce developers’ workloads, but future-proof their apps significantly.

The numbers describing the screen size are all in “dp” units (remember that your layout dimensions should also be in dp units so that the system can adjust for screen density). They are:

  • width dp: the current width available for application layout in “dp” units; changes when the screen switches orientation between landscape and portrait.


  • height dp: the current height available for application layout in “dp” units; also changes when the screen switches orientation.


  • smallest width dp: the smallest width available for application layout in “dp” units; this is the smallest width dp that you will ever encounter in any rotation of the display.


Of these, smallest width dp is the most important. It replaces the old screen-size buckets with a continuous range of numbers giving the effective size. This number is based on width because that is fairly universally the driving factor in designing a layout. A UI will often scroll vertically, but have fairly hard constraints on the minimum space it needs horizontally; the available width is also the key factor in determining whether to use a phone-style one-pane layout or tablet-style multi-pane layout.

Typical numbers for screen width dp are:

  • 320: a phone screen (240x320 ldpi, 320x480 mdpi, 480x800 hdpi, etc).


  • 480: a tweener tablet like the Streak (480x800 mdpi).


  • 600: a 7” tablet (600x1024).


  • 720: a 10” tablet (720x1280, 800x1280, etc).


Using the New Selectors

When you are designing your UI, the main thing you probably care about is where you switch between a phone-style UI and a tablet-style multi-pane UI. The exact point of this switch will depend on your particular design — maybe you need a full 720dp width for your tablet layout, maybe 600dp is enough, or 480dp, or even some other number between those. Either pick a width and design to it; or after doing your design, find the smallest width it supports.

Now you can select your layout resources for phones vs. tablets using the number you want. For example, if 600dp is the smallest width for your tablet UI, you can do this:

res/layout/main_activity.xml           # For phones
res/layout-sw600dp/main_activity.xml # For tablets

For the rare case where you want to further customize your UI, for example for 7” vs. 10” tablets, you can define additional smallest widths:

res/layout/main_activity.xml           # For phones
res/layout-sw600dp/main_activity.xml # For 7” tablets
res/layout-sw720dp/main_activity.xml # For 10” tablets

Android will pick the resource that is closest to the device’s “smallest width,” without being larger; so for a hypothetical 700dp x 1200dp tablet, it would pick layout-sw600dp.

If you want to get fancier, you can make a layout that can change when the user switches orientation to the one that best fits in the current available width. This can be of particular use for 7” tablets, where a multi-pane layout is a very tight fit in portrait::

res/layout/main_activity.xml          # Single-pane
res/layout-w600dp/main_activity.xml # Multi-pane when enough width

Or the previous three-layout example could use this to switch to the full UI whenever there is enough width:

res/layout/main_activity.xml                 # For phones
res/layout-sw600dp/main_activity.xml # Tablets
res/layout-sw600dp-w720dp/main_activity.xml # Large width

In the setup above, we will always use the phone layout for devices whose smallest width is less than 600dp; for devices whose smallest width is at least 600dp, we will switch between the tablet and large width layouts depending on the current available width.

You can also mix in other resource qualifiers:

res/layout/main_activity.xml                 # For phones
res/layout-sw600dp/main_activity.xml # Tablets
res/layout-sw600dp-port/main_activity.xml # Tablets when portrait

Selector Precedence

While it is safest to specify multiple configurations like this to avoid potential ambiguity, you can also take advantage of some subtleties of resource matching. For example, the order that resource qualifiers must be specified in the directory name (documented in Providing Resources) is also the order of their “importance.” Earlier ones are more important than later ones. You can take advantage of this to, for example, easily have a landscape orientation specialization for your default layout:

res/layout/main_activity.xml                 # For phones
res/layout-land/main_activity.xml # For phones when landscape
res/layout-sw600dp/main_activity.xml # Tablets

In this case when running on a tablet that is using landscape orientation, the last layout will be used because the “swNNNdp” qualifier is a better match than “port”.

Combinations and Versions

One final thing we need to address is specifying layouts that work on both Android 3.2 and up as well as previous versions of the platform.

Previous versions of the platform will ignore any resources using the new resource qualifiers. This, then, is one approach that will work:

res/layout/main_activity.xml           # For phones
res/layout-xlarge/main_activity.xml # For pre-3.2 tablets
res/layout-sw600dp/main_activity.xml # For 3.2 and up tablets

This does require, however, that you have two copies of your tablet layout. One way to avoid this is by defining the tablet layout once as a distinct resource, and then making new versions of the original layout resource that point to it. So the layout resources we would have are:

res/layout/main_activity.xml           # For phones
res/layout/main_activity_tablet.xml # For tablets

To have the original layout point to the tablet version, you put <item> specifications in the appropriate values directories. That is these two files:

res/values-xlarge/layout.xml
res/values-sw600dp/layout.xml

Both would contain the following XML defining the desired resource:

<?xml version="1.0" encoding="utf-8"?>
<resources>
<item type="layout" name="main_activty">
@layout/main_activity_tablet
</item>
</resources>

Of course, you can always simply select the resource to use in code. That is, define two or more resources like “layout/main_activity” and “layout/main_activity_tablet,” and select the one to use in your code based on information in the Configuration object or elsewhere. For example:

public class MyActivity extends Activity {
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate();

Configuration config = getResources().getConfiguration();
if (config.smallestScreenWidthDp >= 600) {
setContentView(R.layout.main_activity_tablet);
} else {
setContentView(R.layout.main_activity);
}
}
}

Conclusion

We strongly recommend that developers start using the new layout selectors for apps targeted at Android release 3.2 or higher, as we will be doing for Google apps. We think they will make your layout choices easier to express and manage.

Furthermore, we can see a remarkably wide variety of Android-device form factors coming down the pipe. This is a good thing, and will expand the market for your work. These new layout selectors are specifically designed to make it straightforward for you to make your apps run well in a future hardware ecosystem which is full of variety (and surprises).

Saturday, July 23, 2011

New FIFA 12 Game Release Date

FIFA 12
The development of video games today are increasingly sophisticated. The game developers see that the gaming platforms that exist today, such as the PlayStation 3 or Xbox 360, already too old. They hope for a new platform that could provide the experience of playing the game look real.

David Rutter, Producer of FIFA game development, said that the real image in a game, has been existing. However, Rutter said, the quality of the game in a video game becomes more important than realizing the perfect picture as real objects.

"I think we were pretty close," said Rutter to the CVG when asked about the picture quality of the FIFA 12 game.

"We did close supervision on this game - I think if you saw someone playing the FIFA from afar, you will not realize that he was playing the game. There are still shortcomings in the shape of the face and stuff like that, but the physical form of the players, lighting and camera settings, all of them when seen from afar looks amazing. "

The developer should not only focus on an aspect. Rutter prefers to deliver a satisfying gaming experience and then add it with the best picture appearance.

"When compared with the real picture, we're getting closer, but we much prefer the experience in playing games. The rest is just supporting aspects. Our team so far has been the focus of work and has had what has become of our goals in the last few years. "In addition to having a good picture, the FIFA 12 provides a wide variety of improvements when compared with the previous titles, with more advanced AI, a new defensive system , dribbling the precision, and others.

The new FIFA 12 game will be releases on September 27, 2011 in North America and September 30 in Europe. The FIFA 12 game will be available in a few platforms, including PC, PS 3, PS 2, PSP, Xbox 360, Nintendo Wii or 3DS.

Apple Unveils New Generation of Mac Mini

Apple Mac Mini
Talk about Apple products is a thing that always appeal to gadget lovers. Like a product that has a high taste, every Apple product present in the market always has a unique design so that their products also have a separate class in the hearts of consumers.

The Mac Mini, is probably one of Apple's products are also unique. The Mac Mini was first introduced in early 2005 and is a "small computer" designed for the Macintosh computer lovers with an affordable price but still have performance that is tough enough.

In line with the development of the hardware technology, the Mac Mini also has undergone a few upgrades. Now, the Apple "small computer" has got back in the upgrade, ranging from the use of the latest processors, the addition of hard disk capacity and memory, Firewire 800, Built-in Power Supply, and also the addition of the Thunderbolt port.

Some slots were already provided by other connections including 4 USB 2.0 ports, one HDMI slot, a Gigabit Ethernet slot, and also a slot for memory card types SDXC. For other features, there is also WiFi 802.11n connection service and also Bluetooth 4.0

With a slim 3.6 cm design, overall width 19.7 cm, and weighs only 1.22 kg, the latest version of the Mac Mini has two variants prices. For the price of $599, you can have a Mac Mini with a specification using a 2.3 GHz Intel Core i5, Graphics Card Intel HD Graphics 3000, hard disk type SSD 500 GB, and 2 GB of memory.

For those of you who expect for higher performance, you can have a Mac Mini with Intel 2.5 GHz Core i5 processor, AMD Radeon HD 6630M 256 MB DDR5 Graphic Card, hard disk type SSD 500 GB and 4 GB of memory at a price of $799. If necessary, you can upgrade the processor and the memory of this type. You can upgrade the processor with Intel 2.7 GHz Core i7.

The Mac Mini uses the latest operating system, OS X Lion, which was equipped with 250 new features. In addition, there are the Lion Recovery app that can help you reinstall the OS X Lion without having to use the help of the disk.

JayCut Video Editing for Playbook

JayCut Video Editing for Playbook
BlackBerry developer company, Research In Motion (RIM) has purchased a video editing JayCut from the Swedish company and will work on features for tablet Playbook.

"Working closely with JayCut aims to add video editing capabilities for the BlackBerry platform, we can further enrich the multimedia experience of our customers with the BlackBerry," said David Yach Chief Technology RIM, as reported by Reuters on Saturday (07/23/2011).

JayCut joined the design company The Astonishing Tribe in Stockholm who had previously acquired RIM in order to improve the user interface. In a blog posting, Yach announced the purchase and indicates that the Playbook, ready to compete with Apple's iPad. Equipped with dual cameras with high resolution, the playback quality is also high and can send images to a television screen via the regular cable.

RIM has acquired a number of companies to meet certain requirements in recent years. Among QNX Software, which provides the Playbook operating system, and the Torch Mobile, which allows the company to upgrade its Web browser. This is all an attempt to compete with RIM's rivals, especially Apple.

Thursday, July 21, 2011

Multiple APK Support in Android Market

[This post is by Eric Chu, Android Developer Ecosystem. —Dirk Dougherty]

At Google I/O we announced our plans to add several new capabilities to help developers manage their products more effectively in Android Market. We’re pleased to let you know that the latest of those, multiple APK support, is now available. Multiple APK support is a new publishing option in Android Market for those developers who want extra control over distribution.

Until now, each product listing on Android Market has included a single APK file, a universal payload that is deliverable to all eligible devices — across all platform versions, screen sizes, and chipsets. Broad distribution of a single APK works very well for almost all applications and has the advantage of simplified product maintenance.

With multiple APK support, you can now upload multiple versions of an APK for a single product listing, with each one addressing a different subset of your customers. These APKs are complete, independent APKs that share the same package name, but contain code and resources to target different Android platform versions, screen sizes, or GL texture-compression formats. When users download or purchase your app, Android Market chooses the right APK to deliver based on the characteristics of the device.

When you upload multiple APK files, Android Market handles them as part of a single product listing that aggregates the app details, ratings, and comments across the APKs. All users who browse your app’s details page see the same product with the same description, branding assets, screenshots, video, ratings, and comments. Android Market also aggregates the app’s download statistics, reviews, and billing data across all of the APKs.

Multiple APK support gives you a variety of ways to control app distribution. For example, you could use it to create separate APKs for phones and tablets under the same product listing. You could also use it to take advantage of new APIs or new hardware capabilities without impacting your existing customer base.

To support this new capability, we’ve updated the Developer Console to include controls for uploading and managing APKs in a product listing — we encourage you to take a look. If you’d like to learn more about how multiple APK support works, please read the developer documentation. As always, please feel free to give us feedback on the feature through the Market Help Center.

Mac OS X Lion Officially Available on Mac App Store

Mac OS X Lion
In accordance with media speculation earlier this week, Apple finally launched its new Mac OS X Lion, Wednesday (07/20/2011) local time.

The Mac OS X Lion is the latest version of the Macintosh computer operating system that offers more than 250 additional features. This OS is already available in the new Macintosh products, while the old user can download the update on the Mac App Store for $29,99. As reported by the Straits Times, Thursday (07/21/2011).

"Lion adalah versi OS X terbaik yang pernah ada, dan kami sangat gembira para pengguna di seluruh dunia bisa mulai mengunduhnya hari ini," said Philip Schiller, Senior Vice-President of WorldWide Product Marketing Apple.

This software is the first Mac OS offered by Apple without a CD. If consumers are anxious to spend a lot of time to download a software upgrade for 4GB, Apple invited them to come to its retail stores and using their own WiFi.

The Mac OS X Lion was first introduced by Apple CEO Steve Jobs in the event the Worldwide Developers Conference (WWDC) in San Francisco, in early June, along with a music storage service iCloud as well as the latest version of its mobile operating system iOS 5.

Tuesday, July 19, 2011

New Rumors: iPhone 5 Coming in August

iPhone 5
Apple is fond of setting up a puzzle for the latest products that will be released to the market, including the iPhone 5. Widely reported earlier this smart device will be presented on September 5, but other sources say different things.

From reliable sources say Apple will speed up their pace in bringing the iPhone 5. Mentioned, this phone will land in mid-August. As reported by Boy Genius Report, Wednesday (20/07/2011).

BGR source is indeed mention in detail about the certainty of the iPhone 5, referred to as a reliable source, this phone is expected to be present on August 16 or in late summer.

The report also said that it is possible that Apple will release the iPhone 5 is cheaper than the iPhone 3G before. This move comes as the Android platform is to continue to overtake Apple as their supremacy in the smartphone market.

The iPhone 5 is rumored to have a dual-core A5 processor, and will run on the new IOS 5. The smartphone will also be equipped with a larger screen and has an 8 megapixel camera that can record 1080p video resolution.

Debugging Android JNI with CheckJNI

[This post is by Elliott Hughes, a Software Engineer on the Dalvik team — Tim Bray]

Although most Android apps run entirely on top of Dalvik, some use the Android NDK to include native code using JNI. Native code is harder to get right than Dalvik code, and when you have a bug, it’s often a lot harder to find and fix it. Using JNI is inherently tricky (there’s precious little help from the type system, for example), and JNI functions provide almost no run-time checking. Bear in mind also that the developer console’s crash reporting doesn’t include native crashes, so you don’t even necessarily know how often your native code is crashing.

What CheckJNI can do

To help, there’s CheckJNI. It can catch a number of common errors, and the list is continually increasing. In Gingerbread, for example, CheckJNI can catch all of the following kinds of error:

  • Arrays: attempting to allocate a negative-sized array.

  • Bad pointers: passing a bad jarray/jclass/jobject/jstring to a JNI call, or passing a NULL pointer to a JNI call with a non-nullable argument.

  • Class names: passing anything but the “java/lang/String” style of class name to a JNI call.

  • Critical calls: making a JNI call between a GetCritical and the corresponding ReleaseCritical.

  • Direct ByteBuffers: passing bad arguments to NewDirectByteBuffer.

  • Exceptions: making a JNI call while there’s an exception pending.

  • JNIEnv*s: using a JNIEnv* from the wrong thread.

  • jfieldIDs: using a NULL jfieldID, or using a jfieldID to set a field to a value of the wrong type (trying to assign a StringBuilder to a String field, say), or using a jfieldID for a static field to set an instance field or vice versa, or using a jfieldID from one class with instances of another class.

  • jmethodIDs: using the wrong kind of jmethodID when making a Call*Method JNI call: incorrect return type, static/non-static mismatch, wrong type for ‘this’ (for non-static calls) or wrong class (for static calls).

  • References: using DeleteGlobalRef/DeleteLocalRef on the wrong kind of reference.

  • Release modes: passing a bad release mode to a release call (something other than 0, JNI_ABORT, or JNI_COMMIT).

  • Type safety: returning an incompatible type from your native method (returning a StringBuilder from a method declared to return a String, say).

  • UTF-8: passing an invalid Modified UTF-8 byte sequence to a JNI call.

If you’ve written any amount of native code without CheckJNI, you’re probably already wishing you’d known about it. There’s a performance cost to using CheckJNI (which is why it isn’t on all the time for everybody), but it shouldn’t change the behavior in any other way.

Enabling CheckJNI

If you’re using the emulator, CheckJNI is on by default. If you’re working with an Android device, use the following adb command:

adb shell setprop debug.checkjni 1

This won’t affect already-running apps, but any app launched from that point on will have CheckJNI enabled. (Changing the property to any other value or simply rebooting will disable CheckJNI again.) In this case, you’ll see something like this in your logcat output the next time each app starts:

D Late-enabling CheckJNI

If you don’t see this, your app was probably already running; you just need to force stop it and start it again.

Example

Here’s the output you get if you return a byte array from a native method declared to return a String:

W JNI WARNING: method declared to return 'Ljava/lang/String;' returned '[B'
W failed in LJniTest;.exampleJniBug
I "main" prio=5 tid=1 RUNNABLE
I | group="main" sCount=0 dsCount=0 obj=0x40246f60 self=0x10538
I | sysTid=15295 nice=0 sched=0/0 cgrp=default handle=-2145061784
I | schedstat=( 398335000 1493000 253 ) utm=25 stm=14 core=0
I at JniTest.exampleJniBug(Native Method)
I at JniTest.main(JniTest.java:11)
I at dalvik.system.NativeStart.main(Native Method)
I
E VM aborting

Without CheckJNI, you’d just die via SIGSEGV, with none of this output to help you!

New JNI documentation

We’ve also recently added a page of JNI Tips that explains some of the finer points of JNI. If you write native methods, even if CheckJNI isn’t rejecting your code, you should still read that page. It covers everything from correct usage of the JavaVM and JNIEnv types, how to work with native threads, local and global references, dealing with Java exceptions in native code, and much more, including answers to frequently-asked JNI questions.

What CheckJNI can’t do

There are still classes of error that CheckJNI can’t find. Most important amongst these are misuses of local references. CheckJNI can spot if you stash a JNIEnv* somewhere and then reuse it on the wrong thread, but it can’t detect you stashing a local reference (rather than a global reference) and then reusing it in a later native method call. Doing so is invalid, but currently mostly works (at the cost of making life hard for the GC), and we’re still working on getting CheckJNI to spot these mistakes.

We’re hoping to have more checking, including for local reference misuse, in a future release of Android. Start using CheckJNI now, though, and you’ll be able to take advantage of our new checks as they’re added.

Monday, July 18, 2011

Motorola Titanium Specs, price and release date

Motorola Titanium
The Motorola Titanium first introduced in early May as the successor of the Motorola i1, Sprint announced today that Motorola Titanium will be available starting July 24 for $149.99 with a two-year contract.

The Motorola Titanium is a tool to support iDEN Nextel Direct Connect push-to-talk services. However, he added a QWERTY keyboard and the newer software, but do not expect Android Android Gingerbread 2.3 or even 2.2 Froyo. This smartphone running Android 2.1 Eclair.

Just like as i1, the smartphone meets military specifications for dust, shock, vibration, pressure, temperature solar radiation, high and low temperatures. The Motorola Titanium also features a 3.1 inch touch screen HVGA, 5-megapixel camera with flash, stereo Bluetooth, GPS, and Wi-Fi.

Here are the Motorola Titanium Specs:

Network
iDEN 800, 900 MHz
DirectTalk 900MHz
Dimensions
Size 4.71 x 2.44 x 0.53 inch
Weight 5.2 once
Form Factor Candybar
Display
Type TFT Capacitive Touch Screen
Size 3.2 inches
Colors & Resolution
Input/ User Interface Full QWERTY Keyboard
Accelerometer Sensor For Auto UI Rotate
System Properties
Operating System
CPU
Android 2.1 Eclair OS
1GHz Processor
Storage Capacity
Internal Memory - 512MB Internal Memory
- 300MB Preloaded
Expandable Memory micro-SD card slot for expansion up to 32GB
Browser & Messaging HTML
MMS, SMS, Email, Push Email
Camera
Still - 5 Megapixels
- 2592 X 1544 pixels
- Auto Focus
- Camcoder
- LED Flash
- 4x Zoom
Secondary NO
Video Recording - Capable
Connectivity
Bluetooth & USB v 2.1 with EDR & micro USB 2.0
Wi-Fi 802.11 b/g
3G Yes
GPS A-GPS
Headset 3.5mm stereo headset jack
Video & Audio
Video Formats MPEG4, H.263, H.264, WMV
Audio Formats MP3, AAC, AAC+, eAAC+, AU, WMA, MIDI, Ogg Vorbis
Battery
Type Li-Ion 1800mAh Standard Battery
Talk Time Up to 405 Mins
Standby Time Up To 235 Hours
Other Features MIL-SPEC 810G Military Certified
Google Maps navigation
Android market, Adobe Flash Player 10.1
Google Voice Search, G-Mail, G-Talk
Facebook, YouTube, Twitter
Compass
Screen Lock, Remote Data Wipe
Colors Availability Black
Price $149.99 two-year contract with Sprint

Saturday, July 16, 2011

Top 5 Best Android Tablets

Android Tablets
Competition is happening in the world market tablet, has made the vendors to compete to create something new for their tablets. Tablets that currently dominate the market such as Apple iPad, HP TouchPad, Blackberry Playbook.

The presence of the tablets on the market do not make the android tablets trepidation. Because the android tablets are launched into the market is not inferior to the tablets from other vendors.

Therefore, here be chosen top 5 best Android tablets that could be a consideration for you if you wish to have android-based tablet, based on the features and capabilities of each of these tablets. The following Andoid tablets have been tested and rated by PCMag and PCworld.

Acer Iconia Tab A500

Pros
- Software customizations are helpful
- USB host port and microSD card slot

Cons
Fine touchscreen grid is bothersome on display
Heavier and bulkier than other other tablets

Bottom Line
Acer Iconia Tab is a great, reasonably priced choice if you want to access your content via USB sources, but the current limitations of Android 3.0 and what you can do with that content via USB, coupled with this tablet’s display quirks, still make it a qualified recommendation.

Price: $449 (16GB, Wi-Fi-Only)
Acer Iconia Tab A500


Asus Eee Pad Transformer TF101

Pros
Currently the most affordable Honeycomb tablet. Speedy Nvidia Tegra 2 processor. Honeycomb features strong multitasking, e-mail and calendar notifications. HDMI out for HD video and mirroring. $150 keyboard dock accessory turns the tablet into a virtual notebook.

Cons
Honeycomb interface can be cluttered. Virtual keyboard is slightly modified and doesn't handle predictive text well.

Bottom Line
The Asus Eee Pad Transformer TF101 distinguishes itself from the sea of emerging Honeycomb tablets with its aggressive pricing, and an optional accessory that turns it into a virtual notebook.

Price: $399 (16GB, Wi-Fi-Only), $499 (32GB, Wi-Fi-Only)
Asus Eee Pad Transformer TF101


Motorola Xoom

Pros
The first Android tablet with Google's tablet-specific Honeycomb OS. Flash support. Fast. Beautiful, highly responsive touch screen. HDMI output for television/computer monitor viewing.

Cons
User interface seems a bit overcomplicated at times. While promised in the future, there's no support for SD cards at launch. Android Market selection is weak for Honeycomb.

Bottom Line
The Motorola Xoom for Verizon Wireless is a solid Android tablet with Flash support, but it doesn't measure up to the Apple iPad 2 in terms of app selection.

Price: $499 (32GB, Wi-Fi-Only), $599 (32GB, Wi-Fi + 3G), $799 (Wi-Fi + 3G, w/o contract)
Motorola Xoom


Samsung Galaxy Tab 10.1

Pros
The thinnest tablet currently available. Excellent 10.1-inch HD screen. Honeycomb 3.1 brings improved multitasking, Flash support, and a higher-quality user experience. Comes with earbuds—a rarity for a tablet.

Cons
Samsung plans to customize the OS down the road, which may slow down future Android updates. App selection is very weak. Even with a strong Wi-Fi signal, online video playback sputtered in our tests.

Bottom Line
The Samsung Galaxy Tab 10.1 is the thinnest Honeycomb tablet available, but until Samsung pushes out the customized user interface it's planning, you won't really know what you're getting.

Price: $499.99 (16GB, Wi-Fi-Only), $599.99 (32GB, Wi-Fi-Only)
Samsung Galaxy Tab 10.1


Toshiba Thrive

Pros
Integrated USB, mini-USB, HDMI ports, and SDXC card slot. User-removable battery can be swapped out, replaced. Honeycomb OS is generally well-designed, great for multitasking.

Cons
Bulkiest of all the Honeycomb tablets thus far. Not competitively priced.

Bottom Line
With full USB functionality and a replaceable battery, the Toshiba Thrive is better outfitted for business tasks than most Honeycomb tablets. But in a world where a svelte tablet build is important, its bulkiness is bound to be a turn-off for some.

Price: $429.99 (8GB, Wi-Fi-Only), $479.99 (16GB, Wi-Fi-Only), $579.99 (32GB, Wi-Fi-Only)
Toshiba Thrive

MobileGo apps for Android Phone

MobileGo apps for Android Phone
The MobileGo apps for Android Phone is an application for android mobile phones that allows users to transfer music, movies and pictures. Simple, just by connecting it to the Desktop PC.

Once the MobileGo apps installed, connect the Android phone to PC via USB and wait for the software to recognize the phone. If your phone does not immediately recognize the MobileGo software, do a manual driver installation and restart your phone and PC to both make the connection. If your Android phone not compatible, send requests for the applications to Wondershare.

Unlike iTunes on the iPhone, MobileGo can see the space occupied by the music content, images and movies.

MobileGo can also transfer your contacts from Outlook or Symbian phone into the Android phone. If the device has to rely on the cloud there is tight integration between Gmail and Android. Conversion of data in the .Mkv format handled quickly and easily within minutes.

You can get this MobileGo apps for Android Phone at a price of $40.

Friday, July 15, 2011

Apple iOS vs Google Android OS

Apple iOS vs Google Android OS
A recent report revealed that in the second quarter of 2011, developers prefer the Apple iOS than Google Android operating system (Apple iOS vs Google Android OS).

According to data released by Flurry, a company that provides statistical data application developers, this time the developers tend to create applications for iPhone, iPod Touch and iPAD, rather than for Android applications.

The study revealed that in the second quarter of 2011, 57 percent of the new applications project are created for the iPhone, up from number 54 percent in the first quarter of 2011. As reported by IT Portal, Friday (07/15/2011).

The data in the study also shows that in the second quarter of 2011, 15 percent of the new applications project created for the iPad, up 10 percent from first quarter 2011.

As for Android, instead suffered a setback. Because for the second quarter of 2011, only 28 percent of new application projects that are intended for Android, a decline from the previous figure that is still around 36 percent in the first quarter of 2011.

Flurry mentioned that there are two main reasons of the decline in interest in the application developers for Android, the first is the launch of the iPhone 4, while the second is the launch of the iPad 2.

"Google should take prompt steps so that Apple does not continue to attract application developers," said Flurry, in response to an increase in the percentage interest of developers to the iOS.

Android 3.2 Platform and Updated SDK tools

Today we are announcing the Android 3.2 platform, an incremental release that adds several new capabilities for users and developers. The new platform includes API changes and the API level is 13.

Here are some of the highlights of Android 3.2:

Optimizations for a wider range of tablets. A variety of refinements across the system ensure a great user experience on a wider range of tablet devices.

Compatibility zoom for fixed-sized apps. A new compatibility display mode gives users a new way to view these apps on larger devices. The mode provides a pixel-scaled alternative to the standard UI stretching, for apps that are not designed to run on larger screen sizes.

Media sync from SD card. On devices that support a removable SD card, users can now load media files directly from the SD card to apps that use them.

Extended screen support API. For developers who want more precise control over their UI across the range of Android-powered devices, the platform’s screen support API is extended with new resource qualifiers and manifest attributes, to also allow targeting screens by their dimensions.

For a complete overview of what’s new in the platform, see the Android 3.2 Version Notes.

We would also like to remind developers that we recently released new version of the SDK Tools (r12) and of the Eclipse plug-in (ADT 12). We have also updated the NDK to r6.

Visit the Android Developers site for more information about Android 3.2 and other platform versions. To get started developing or testing on the new platform, you can download it into your SDK using the Android SDK Manager.

Google Photovine Coming to iOS Devices

Google Photovine
Google released a photo sharing service Photovine for iOS-based devices. Currently, access to this services is limited only to guests invited. The Photovine applications can be downloaded for free and runs on iOS 4.2.

Photovine concepts such as vines. A user uploading an image, and gave a description (caption). Furthermore, the caption was the basis of propagation so that people can attach a similar-themed images.

Electronista site says that the application is similar to its competitors, Instagram and Facebook. Photovine is one of Google's promotional activities and not available in the Android Market.

Thursday, July 14, 2011

Amazon Tablet Computer Release Date

Amazon Tablet
Latest news in circulation as reported by the Journal said that Amazon was working for a tablet computer and planned for release in October.

Amazon tablet will become a rival of the Apple iPad. Apple and Amazon have had some conflicts. In March, Apple sued Amazon, accusing the online retailer has violated the trademark on the name "App Store." Apple Chief Executive Steve Jobs has also been mocked in the electronic-book reader Amazon Kindle, saying that some people are reading and general purpose devices like the iPad is superior to a single destination.

According to a Forrester Research analyst, Sarah Rotman Epps said “Amazon and Apple are frenemies, both friends and enemies. They “rely on each other as partners". Amazon, for example, sells digital books via its Kindle app in Apple's iTunes Store—but "at the same time, they aggressively compete for customers' attention and dollars," as reported by Journal, on Thursday (07/14/2011).

Amazon faces a tough road against Apple in the tablet market. Since last year introduced the iPad, Apple has sold 19.5 million devices by the end of March.

Amazon tablet will have a 9-inch screen and will run on the Google Android platform, said people familiar with the device. The Amazon tablet computer release date rumored in October. Unlike the iPad, it will not have a camera. While the price and distribution of this device is not clear, the online retailer will not design the initial tablet itself. It also is outsourcing production to Asian manufacturers.

Wednesday, July 13, 2011

Panasonic ToughBook H2 Tablet Specs and Price

Panasonic ToughBook H2 Tablet
Following the successful of Toughbook laptops are "anti-tsunami" series and follow the development trend of mobile computing, Panasonic launched the Toughbook H2 tablet. The tablet has a dual touch screen measuring 10.1-inch display that carries TransfelctivePlus display technology that can produce a display brightness level up to 6 thousand minutes. Coupled with the presence of circular polarizer, and display anti-glare and reflection make screen tablet is easily seen, even when under the blazing sun.

The Panasonic ToughBook H2 Tablet Specs include an Intel Core i5-2557M vPro processor (1.7GHz with Turbo Boost up to 2.7GHz), 4GB of RAM can be upgraded up to 8GB, and a choice of 120 GB or 320GB 7200rpm hard disk drive. The tablet is equipped with a super tough range of wireless technologies, including WiFi, Bluetooth, and 3G mobile broadband technology from Qualcomm.

In addition, the Panasonic ToughBook H2 Tablet based on Windows 7 also comes with various features that will help the productivity of field workers. Including barcode readers or RFID, resolution 2-megapixel camera, up to GPS. With a myriad of completeness, the Toughbook H2 battery can last quite long, ie up to 6.5 hours.

Just as the its name, the Toughbook, a tablet that weighs 1.6 pounds can be dropped from a height of up to six feet or about 1.83 meters. This capability makes H2 Toughbook tablet suitable for use by workers who do not want to worry if the tablets fall. Moreover, Panasonic complement this tablet with the hand strap to make it easier for users when they bring these tablets over a period of time.

The Panasonic ToughBook H2 Tablet Price start at $3,449.

PayPal NFC for Mobile Payments

PayPal NFC for Mobile Payments
Laura Chambers, Senior Director of PayPal Mobile, demonstrates the tap-and-pay move at the MobileBeat conference today in San Francisco. At the event, Laura showcased the ability of the PayPal mobile payments to transfer money and pay by tapping two phones together as it looks to secure its role in developing the mobile-payment.

The demonstration was performed by using two Nexus S Smartphones are equipped with a near-field communications (NFC) technology, which allows for rapid transmission of information, in this case the data on the amount of money transferred. Transfers can be done through a special PayPal widget.

“The demonstration shows PayPal is jumping on the NFC bandwagon, which has been embraced by the likes of Google, payment systems manufacturers such as Verifone, and credit card issuers such as Visa and MasterCard. The growing number of players also indicates the crowded room through which a payments provider like PayPal must navigate.” As reported by Cnet, on Wednesday (07/13/2011).

Previously, PayPal already handles the mobile payment through an application that communicates via Wi-Fi or cellular network, or through a mobile browser or text messaging. It is also experimenting with NFC stickers placed on the back of the phone, but the tests are limited in scope.

HP TouchPad 4G Tablet Specs

HP TouchPad 4G Tablet
HP today announced that HP TouchPad 4G is available in the U.S. market through AT&T. “TouchPad 4G is ideal for anyone who needs maximum flexibility for productivity on the go, It’s particularly well suited for users who rely on connectivity in the field – from large corporations to small businesses and self-employed mobile professionals.” Said David Gee, vice president, Marketing and Enterprise Solutions, webOS, Personal Systems Group.

The HP TouchPad 4G specs comes with a faster processor 1.5 GHz, 32 GB of internal storage, integrated GPS and integrated GPS and AT & T mobile broadband wireless capability built, as well as allowing users to access the web, check email and get more done in more places - not just Wi-Fi hotspots.

In addition, with the support of Adobe Flash Player Beta, the HP TouchPad 4G-enabled for video calling, the ability to print wirelessly to a network printer HP compatible; Quickoffice to view Microsoft Word, Excel, and PowerPoint files, and Adobe Reader PDF, HP TouchPad productivity a true powerhouse. Automatically sync personal and work email, contacts and calendar information from sources such as Microsoft Exchange, Facebook and Google into a single view.

The HP TouchPad 4G will be available on HP commercial channel, AT & T and Business Services major retailers, is still not an official announcement for the price of The HP TouchPad 4G.

Tuesday, July 12, 2011

A New Android Market for Phones

[This post is by Eric Chu, Android Developer Ecosystem. —Dirk Dougherty]

Earlier this year, we launched several important features aimed at making it easier to find great applications on Android Market on the Web. Today, we're very excited to launch a completely redesigned Android Market client that brings these and other features to phones.

The new Market client is designed to better showcase top apps and games, engage users with an improved UI, and provide a quicker path to downloading or purchasing your products. For developers, the new Android Market client means more opportunities for your products to be merchandised and purchased.

In the home screen, we've created a new promotional page that highlights top content. This page is tiled with colorful graphics that provide instant access to featured apps and games. The page also lets users find their favorite books and movies, which will help drive even more return visits to Market.

To make it fun and easy for users to explore fresh content, we've added our app lists right to the Apps and Games home pages. Users can now quickly flip through these lists by swiping right or left, checking out what other people are downloading in the Top Paid, Top Free, Top Grossing, Top New Paid, Top New Free, and Trending lists. To keep the lists fresh and relevant, we've made them country-specific for many of the top countries.


To help you convert visitors to customers, we’ve made significant changes to the app details page. We've moved the app name and price into a compact action bar at the top of the page, so that users can quickly download or purchase your app. Directly below, users can flip through screen shots by swiping right or left, or scroll down to read your app's description, what's new, reviews, and more. To help you promote your product more effectively, the page now also includes a thumbnail link to your product video which is displayed at full screen when in landscape orientation.

For users who are ready to buy, we've streamlined the click-to-purchase flow so that users can complete a purchase in two clicks from the app details page. During the purchase, users can also see a list of your other apps, to help you cross-sell your other products.

With a great new UI, easy access to app discovery lists, a convenient purchase flow, and more types of content, we believe that the new Market client will become a favorite for users and developers alike.

Watch for the new Market client coming to your phone soon. We've already begun a phased roll-out to phones running Android 2.2 or higher — the update should reach all users worldwide in the coming weeks. We encourage you to try the update as soon as you receive it. Meanwhile, check out the video below for an early look.

LG Optimus Pro C660 Specs and Price

LG Optimus Pro C660
The LG Optimus Pro C660 is a QWERTY Smartphone with a portrait, which has similar specs to the LG Optimus One and priced with a low price as well. The form factor is quite rare on the market and become new entrants that will compete with HTC ChaCha and Motorola Pro.

The LG Optimus Pro C660 specs features a 2.8 inch screen with a resolution that is currently unknown and four row QWERTY keyboard underneath a portrait. Screen aspect ratio is 4:3, so the possibility of the screen has QVGA resolution.

The LG Optimus Pro is reported to run on Android 2.3 Gingerbread OS on 800MHz CPU with 512MB RAM. Cameras include a 3MP camera and supports HSDPA connectivity, Wi-Fi, Bluetooth, GPS and battery 1500mAh.

And there is the possibility of 150MB of internal storage but no info on the microSD installed or not because all the specs that there is definitely unconfirmed at this time.

The LG Optimus Pro C660 price is $250 which makes this phone compete with HTC ChaCha. Italian Retail Mediaworld.it rumored as one retail store that will offer the LG Optimus Pro, but there is currently no information exactly when this phone will be available.

MSI FX620DX Notebook Specs and Price

MSI FX620DX Notebook
MSI recently launched its latest notebook is the MSI FX620DX supported by Intel's Sandy Bridge platform. The MSI FX620DX has a 15.6-inch screen with a grid design on the exterior with the latest anti-scratch and anti-fingerprint coating. The MSI FX620DX notebook consists of three processor versions to choose ie: Intel Core i3, i5, or i7, with memory up to 8GB RAM and NVIDIA GeForce GT540M 3D graphics card with 1GB of video memory.

The new MSI FX620DX notebook specs has a 15.6-inch screen 1920 × 1080 Full HD theater classes and four speakers with THX TruStudio Pro technology. The MSI FX620DX comes with a 750GB hard drive SuperMulti drive and a choice of DVD or Blu-ray. This notebook also supports Bluetooth, WiFi 802.11b/g/n and provides two USB 3.0 ports and two USB 2.0 ports. You can also find HD webcam, HDMI output, 5-in-1 card reader and Chiclet keyboard and multitouch touchpad on this notebook.

The MSI FX620DX notebook price start at $773.03, and you can make purchases via Amazon.

Monday, July 11, 2011

New Mode for Apps on Large Screens

[This post is by Scott Main, lead tech writer for developer.android.com. — Tim Bray]

Android tablets are becoming more popular, and we're pleased to note that the vast majority of apps resize to the larger screens just fine. To keep the few apps that don't resize well from frustrating users with awkward-looking apps on their tablets, Android 3.2 introduces a screen compatibility mode that makes these apps more usable on tablets. If your app is one of the many that do resize well, however, you should update your app as soon as possible to disable screen compatibility mode so that users experience your app the way you intend.

Beginning with Android 3.2, any app that does not target Android 3.0 (set either android:minSdkVersion or android:targetSdkVersion to “11” or higher) or does not explicitly set android:xlargeScreens="true" in the <supports-screens> element will include a button in the system bar that, when touched, allows users to select between two viewing modes on large-screen devices.

“Stretch to fill screen” is normal layout resizing (using your app’s alternative resources for size and density) and “Zoom to fill screen” is the new screen compatibility mode.

When the user enables this screen compatibility mode, the system no longer resizes your layout to fit the screen. Instead, it runs your app in an emulated normal/mdpi screen (approximately 320dp x 480dp) and scales that up to fill the screen---imagine viewing your app at the size of a phone screen then zooming in about 200%. The effect is that everything is bigger, but also more pixelated, because the system does not resize your layout or use your alternative resources for the current device (the system uses all resources for a normal/mdpi device). Here’s a comparison of what it looks like (screen compatibility mode enabled on the right):

In cases where an app does not properly resize for larger screens, this screen compatibility mode can improve the app’s usability by emulating the app’s phone-style look, but zoomed in to fill the screen on a tablet.

However, most apps (even those that don’t specifically target Honeycomb) look just fine on tablets without screen compatibility mode, due to the use of alternative layouts for different screen sizes and the framework’s flexibility when resizing layouts. Unfortunately, if you haven’t said so in your manifest file, the system doesn’t know that your application properly supports large screens. Thus, if you’ve developed your app against any version lower than Android 3.0 and do not declare support for large screens in your manifest, the system is going to offer users the option to enable screen compatibility mode.

So, if your app is actually designed to resize for large screens, screen compatibility mode is probably an inferior user experience for your app and you should prevent users from using it. The easiest way to make sure that users cannot enable screen compatibility mode for your app is to declare support for xlarge screens in your manifest file’s <supports-screens> element. For example:

<manifest ... >
<supports-screens android:xlargeScreens="true" />
...
</manifest>

That’s it! No more screen compatibility mode.

Note: If your app is specifically designed to support Android 3.0 and declares either android:minSdkVersion or android:targetSdkVersion with a value of “11” or greater, then your app is already in the clear and screen compatibility mode will not be offered to users, but adding this attribute certainly won’t hurt.

In conclusion, if your app has set the android:minSdkVersion and android:targetSdkVersion both with values less than “11” and you believe your app works well on large and xlarge screens (for example, you’ve tested on a Honeycomb tablet), you should make the above addition to your manifest file in order to disable the new screen compatibility mode.

If your app does not resize properly for large screens, then users might better enjoy your app using screen compatibility mode. However, please follow our guide to Supporting Multiple Screens so that you can also disable screen compatibility mode and provide a user experience that’s optimized for large-screen devices.

Sunday, July 10, 2011

Facebook Bring Vibes to Compete with Google Music

Facebook Vibes Music Service
The rivalry between Facebook and Google+ increasingly apparent in the social networking world, having previously Facebook cooperation with Skype to bring video chat feature, now the largest social networking service is preparing to bring its music service.

Rumor has developed a limited basis among developers, who say Facebook will present a music service called Vibes.

One software developer Jeff Rose in his blog revealed that, after Facebook released a video chat feature, he saw the codes 'hidden' which indicates that the video chat will have the name Peep, and Vibes for the music service.

"I am looking for the code on Facebook, and I found a feature that has not been announced as Vides. This feature seems to be Facebook's music service," he wrote, as reported by the Telegraph on Monday (7/11/2011).

"Vibes feature will be connected with a source to download music. So I thought, this is the future of Facebook music service," Jeff said.

This assumption is stronger after the mid year ago Facebook is reportedly negotiating with Spotify, which is the site of the leading music service in North America. Reflecting on the partnership with Skype, it could be this issue is not just a figment.

If this be true, then surely this is an open war with Google+. Because as is known, Google's social networking service is also preparing a similar service.

Wednesday, July 6, 2011

Facebook Unveils Skype Video Chat

Facebook unveils skype video chat with a new group-chat feature and a redesign to its chat tool, the company announced today.

The new features are part of an event Facebook held today at its Palo Alto, Calif., headquarters. Last week, Facebook co-founder and CEO Mark Zuckerberg said that his company was planning to "launch something awesome" today.

The social network's new offering will allow users to group multiple people into a single window to chat. Those who are online will get messages immediately, while those who are not on the platform will receive a summary of the conversation at a later time.

In addition, its chat tool features a sidebar that shows all the folks a respective user chats with most often. That sidebar adjusts in size based on the size of the user's browser window, and "appears when the window is wide enough," Facebook says. According to Zuckerberg, that simple change should make it easier for those with larger browser windows to chat.

Both group chat and Facebook's new chat design are being rolled out starting today.
(Cnet)

Lenovo ThinkPad X121e Notebook Specs and Price

Lenovo ThinkPad X121e Notebook
Lenovo has been offering the latest ThinkPad ultraportable notebook series with a screen measuring 11.6 inches for several years. This time Lenovo ThinkPad X121e Notebook comes with a choice of AMD or Intel chips. The Lenovo ThinkPad X121e Notebook will be launched initially in Japan and Europe.

Processor options will include:
- 1 GHz AMD C-50 dual core processor with a Radeon HD 6250 graphics.
- 1.6 GHz AMD E-350 dual-core processors with the Radeon HD 6310 graphics.
- 1.3 GHz Intel Core I3-2357M dual core processors with Intel HD 3000 Graphics.

The Lenovo ThinkPad X121e Notebook specs offers three USB 2.0 ports, Gigabit Ethernet, HDMI and VGA output, SD card reader, integrated webcam, and 802.11n Wi-Fi. Upgrade storage configurations can choose a 320GB HDD or 128GB SSD, WiMax radios, six-cell battery, and Bluetooth 3.0.

This notebook when running on the AMD Fusion C-50 or E-350 is claimed to achieve 3.5 to 4.1 hours endurance with a three-cell battery, or 7.2 hours with a pack of six cells, whereas variants of the Core i3 said to have reached 3, 8 or 7.7 hours depending on battery options.

The Lenovo ThinkPad X121e Notebook price ranging from ¥69,300 ($855) to ¥100,000 ($1,233). This notebook measures 11.4 " x 8.2" x 1.1" with a six-cell battery. A choice of 3 cell battery will also be available for some models. The notebook has a screen capable of displaying a resolution of 1366x768 pixels and will be available with Windows 7 Home Premium or Professional operating system.

Monday, July 4, 2011

Acer Ice Cream Android Tablet will release this year

Acer Ice Cream Android Tablet
Acer continues to passionate in presenting the tablet on the market. Still not quite with the presence of Iconia, Acer reportedly will release a device “Acer Ice Cream Android Tablet” that was popular in the market in the near future.

Interestingly, the tablets carried by the Taiwanese company will adopt the new Android operating system, the Ice Cream Sandwich. Although in fact, Google itself has not announced when this OS will be released, including whether an update for the tablet or smartphones.

Launched by VR Zone, Tuesday (07/05/2011), although Android Ice Cream Sandwich still feel its presence, reality Acer rumored to be presenting this tablet in the fourth quarter of 2011.

From a number of rumors circulating, this tablet will be using a screen measuring 10 inches, with processors that power is still not revealed the property of ARM. For the model, this tablet will adopt a slide with a qwerty keyboard. Similar to the Asus tablet? It seems that way.

As is known, the Acer more excited to bring the tablets to the market with all sorts of flavors. After the success of Android, they will reportedly bring the tablet based on Windows 7. Although official information has not been submitted formally.

Sunday, July 3, 2011

Sony PlayStation 4 Release Date in 2012

Sony plans to prepare new game console platforms, the PlayStation 4, justified by the two partners in Taiwan. Sony was allegedly going to start producing late next year and the planned release date in 2012.

The claim was made by the component manufacturers from Taiwan, Foxconn and Pegatron Technology which assembles the PlayStation 3. Both companies are reportedly also be responsible for assembling the PS4.

As reported by DigiTimes, Monday (07/04/2011), Sony will prepare at least 20 million units for the initial shipment of the PlayStation4, next year.

Discourse about the PS4 production was revealed by the media as well as Sony Vice President Financial Officer Masaru Kato revealed the plan on a conference call with investors, last May.

When asked to explain the research and development costs are bloated, Masaru claimed increased costs were used for the successor to the PS3. "We've started development for the next platform, but I can not discuss the launch plans. So the costs used for that platform," said Masaru

However, a statement Masaru contrary to the utterance of Chairman Sony Computer Entertainment Kaz Hirai several months ago that a Japanese company has not thought about the PS4 or the latest generation of gaming consoles in any form.