Friday, November 2, 2012

Android 4.2 - Upcoming Security Enhancements

Along with new features in Android 4.2, there is significant enhancements in the security system. The Android 4.2 security system is integrated into the mobile OS, and is always on the lookout for problems. The key component is a real-time app scanning service that instantly checks apps put on your device for any malicious or potentially harmful code. This feature is an extension of the Google Play Store’s security technology, which analysis apps uploaded to the store for maliciousness. While that technology worked exclusively on the server side, analysing apps that were uploaded to the Play Store, the new system works with your device and scans any apps you install from third-party sources (a process known as "sideloading"). This offers users protection from malicious apps that aren't vetted by the Play Store’s security system.

Also included in the new security suite of services for Android 4.2, is a system that will warn you if a text messaging service is trying to send out messages that could cost you money. If your phone discovers one of these, it will stop the service and then let you decide if you want to allow the action to happen or not.

Last, the app permissions page that pops up during app installs has been refined. The new Android 4.2-level screen is cleaned up and far easier to read than what we've seen in the past.

Wednesday, October 31, 2012

Android 4.2: A new flavor of Jelly Bean.

Google announced it's new Nexus tablet & smartphone line, along with new version of Android 4.2. While Android 4.2 isn't a major upgrade, it does bring significant improvements to Jelly Bean & takes the speed and simplicity of Jelly Bean to a different level.

New Features
  1. Multi-user Support: On Android 4.2-powered tablets, but not on smartphones, you'll be able to have multiple users. Each user will get his or her own setup. That means, for example, you can have your own home-screen, background, widgets, apps and games, while your spouse or office partner can have their own unique tablet experience. You can set this up so a new user must login to the tablet or they'll be able to simply hit a button and away they'll go with their own tablet take.
  2. Miracast: From Tablet and Smartphone to TV: Apple recently introduced AirPlay Mirroring in iOS 5 and Mac OS X, Mountain Lion. With it, you can throw your screen to any Apple TV-equipped television. Android 4.2 will let you do the same thing with any TV, DVD-player, or other media device that supports Miracast. Miracast is the trade name for Wi-Fi Direct or WiDi. This is an 802.11n compatible network protocol for display-sharing. With a compatible device or a Miracast adapter, you'll be able to stream Internet TV shows and movies from your smartphone or tablet to your TV.
  3. Gesture Typing: Do you use Swype, the popular third-party on-screen keyboard replacement? If you do, then you'll find the same basic functionality to make on-screen keyboards more useful in Gesture Typing. Just glide your finger over the letters you want to type, and lift after each word. You don’t have to worry about spaces because they’re added automatically for you. The keyboard can anticipate and predict the next word, so you can finish entire sentences just by selecting suggested words. Power through your messages like never before. Android's dictionaries are now more accurate and relevant. With improved text-to-speech capabilities, voice typing on Android is even better. It works even when you don't have a data connection, so you can type with your voice everywhere you go.
  4. Smart Screen-Savers: Android 4.2's Daydream is actually a smart screen-saver. It lets you display photo slideshows, news headlines, and the like.
  5. Photo Sphere: This feature allow you to capture images up, down, all around you to from Google Street View style panoramic images. When you're snapping a photo sphere, you can move in every direction, you can look up, you can look down, every detail from the original scene is just there. Photo Spheres are stored as JPEG files, and all of the information required to view them is embedded as open XML metadata in the image itself.

Friday, May 4, 2012

Debug Android App using Log

Debugging during development process always play a key role, so lots of developer use logging. Android provides us a great interface while dealing with logcat. The problem I saw with few developers, they simply use the log for debugging and never remove their log statements before creating final apk & which result in decreased application performance.

To avoid this situation, you can create a custom log class & can control the amount of information visible in logcat. The CustomLogger class is as follow:-

public class CustomLogger {
     
        public static void d(String tag, String msg) {
                if (Log.isLoggable(tag, Log.DEBUG)) {
                        Log.d(tag, msg);
                }
        }

        public static void i(String tag, String msg) {
                if (Log.isLoggable(tag, Log.INFO)) {
                        Log.i(tag, msg);
                }
        }

        public static void e(String tag, String msg) {
                if (Log.isLoggable(tag, Log.ERROR)) {
                        Log.e(tag, msg);
                }
        }

        public static void v(String tag, String msg) {
                if (Log.isLoggable(tag, Log.VERBOSE)) {
                        Log.v(tag, msg);
                }
        }

        public static void w(String tag, String msg) {
                if (Log.isLoggable(tag, Log.WARN)) {
                        Log.w(tag, msg);
                }
        }

}

This class helps you to hide all the debug calls automatically from logcat in final apk. Using this CustomLogger class you won’t have to worry about removing print lines or maintaining variables for levels that you might forget to change before building your release apk. This class is simply wrapping the calls to the android Log class. The rest of your application can simply reference CustomLogger.d("TAG NAME", "DEBUG MESSAGE"); before displaying any debug info it will check for the return boolean variable from Log.isLoggable() method. If the device/emulator running the app has the log level set to debug then only message will appear.

As you know after SDK Tools, Revision 8 (December 2010) - Support for a true debug build. Developers no longer need to add the android:debuggable attribute to the tag in the manifest — the build tools add the attribute automatically.