Tuesday, 1 May 2012

External Fonts use in Android



Assets : fonts

Note : Create a fonts folder under assets folder and place all your fonts file in it. (Folder name can be anything)

Wednesday, 25 April 2012

Tuesday, 17 April 2012

Export Phone Contacts CSV in Android


Note : Give the Following permission in android menifest file.

<uses-permission android:name="android.permission.READ_CONTACTS"/>

Thursday, 12 April 2012

Custom Tital Bar in Android


Layout : Main.xml

Layout : titlebar.xml

Values : colors.xml

Values : styles.xml
Values : themes.xml


Tuesday, 10 April 2012

10 Reasons why Android 4.0 (Ice Cream Sandwich) is better than Apple’s iOS

Google has finally figured out the recipe for success with the introduction of Ice Cream Sandwich, the newest member of Android OS family. Google has faced many criticisms around the responsiveness of the UI in Android. Many tech experts will conclude their reviews of the Android OS with statements like, “Android OS is the best mobile operating system besides iOS but it still suffers from occasional lag or stutter in the user interface”.

Android 4.0 (Ice Cream Sandwich) is the latest version of the Android platform for phones, tablets, and more. This version of Android unifies everything by combining the Phone and Tablet software in one package. It builds on the things users love most about Android including easy multitasking, rich notifications, resizable widgets, customizable home screens, and deep interactivity — and adds powerful new ways of communicating and sharing.

We have outlined 10 reasons why Android 4.0 is just better than iOS. Many first time buyers overlook the features offered by Android and just focus on the fact that iPhone is produced by Apple. The following 10 reasons will shed some light on some of the key differentiating features that make Android a better mobile operating system.

1. Better User Interface

Unlike the iPhone OS, Android user interface has been constantly refining and evolving over the years. With Android 4.0, Google has made the user interface much more polished and modern. The main feature of the OS is navigation buttons, these make it easier for the user to navigate around the phone. Unlike the iPhone with only one navigation button (Home Button), Android phones have back, menu, and multitasking buttons, which allow the user to very easily perform these actions whith out having to look for the virtual buttons in an application.

Android utilizes the entire screen with screenshots of the running applicaitons compared to iOS, where multitasking is only done using the dock at the bottom. iOS wastes the entire screen space when it comes to multitasking.
On the iPhone there is only one thing you see, a page full of applications and nothing more. This makes the user interface very boring and dull as the space on your home screen not being used efficiently to provide rich experience for the user. iOS might be easier to use but it is time to move on from an operating system designed for technologically challenged individuals. The Android user interface separates your home screens from the applications list and provides a space that you can customize the way you want. This is the main reason why every single Android phone looks different and unique unlike the iPhone.

2. Resizable Widgets

This feature is exclusive to Android when comparing to the iOS. The home screens in Android 4.0 are designed to be content-rich and customizable allowing the user to embed live application content directly through interactive widgets. Widgets let you check email, flip through a calendar, play music, check social streams, and more — right from the home screen, without having to launch apps. Widgets are resizable, so you can expand them to show more content or shrink them to save space. The retina display on the iPhone is a waste if you use it to display just a grid of icons page after page.
3. Swipe to dismiss notifications, tasks, and browser tabs

Android 4.0 makes managing notifications, recent apps, and browser tabs even easier. You can now dismiss individual notifications, apps from the Recent Apps list, and browser tabs with a simple swipe of a finger. This provides a unified experience to the user with quick and easy way to manage the content on your phone.
4. Quick responses for incoming calls

When an incoming call arrives, you can now quickly respond by a text message, without needing to pick up the call or unlock the device. On the incoming call screen, you simply slide a control to see a list of text responses and then tap to send and end the call. You can add your own responses and manage the list from the Settings app. On iOS you can only answer or decline the incoming call, there is no additional functionality that provides the user with more ways to respond.

5. Improved text input and spell-checking

The soft keyboard in Android 4.0 makes text input even faster and more accurate. To fix misspelled words more easily, Android 4.0 adds a spell-checker that locates and underlines errors and suggests replacement words. With one tap, you can choose from multiple spelling suggestions, delete a word, or add it to the dictionary. You can even tap to see replacement suggestions for words that are spelled correctly. For specialized features or additional languages, you can now download and install third-party dictionaries, spell-checkers, and other text services.

 6. Powerful voice input engine

Android 4.0 introduces a powerful new voice input engine that offers a continuous “open microphone” experience and streaming voice recognition. This lets you dictate the text you want, for as long as you want, using the language you want. The voice recognition is done in real time allowing you to look at the interpreted text as you speak. You no longer have to finish your speech and wait to see the transcribed text. Siri on iOS provides options to search the web directly but it is used more for entertainment purposes as it is still in beta form. Text-to-speech options on Android are more governed towards productivity allowing you to finish the task easily and effectively.
7. Control over network data

In the Settings app, colorful charts show the total data usage on each network type (mobile or Wi-Fi), as well as amount of data used by each running application. Based on your data plan, you can optionally set warning levels or hard limits on data usage or disable mobile data altogether. You can also manage the background data used by individual applications as needed.
8. Cloud-connected experience

Android has always been cloud-connected, letting you browse the web and sync photos, apps, games, email, and contacts — wherever you are and across all of your devices. Android has always provided superior cloud experience way before Apple introduced their cloud based services. Android users have always enjoyed this feature as you never have to worry about losing your personal information with your phone.

9. Google Experience

If you are a gmail user then Android OS is made just for you and with all of your needs in mind. Android provides the best google experience including GMail, Google Calendar, Google Maps, Google Voice, Google Search, YouTube, Google Goggles, Google Talk, Google Translate, Google Earth, Blogger, and Chrome to Phone. This list provides more than enough reasons for gmail users to own an Android device. Google has also introduced Google Chrome browser which allows you to sync your bookmarks and view tabs you have open on your computer. You can send pages from desktop Chrome to your smartphone or tablet with one click and read them on the go, even if you’re offline. Neither the iPhone nor any other phone on the market will provide immersive and rich google experience the way Android does.

10. Google Maps and FREE voice-guided Navigation

If you use your phone for navigation or destination searches then Google Maps Navigation provides you the best experience on Android 4.0. Google has built in a free voice guided turn-by-turn GPS navigation. The application also provides driving, public transit, biking, and walking directions as well. This is exclusive only to Android as the iOS version of Google Maps provides just the core functionality.

In addition, Google has also included Android Beam for NFC-based sharing and Face Unlock in Android 4.0. Android Beam is an innovative, convenient feature for sharing across two NFC-enabled devices, It lets people instantly exchange favorite apps, contacts, music, videos — almost anything.Face Unlock is a new screen-lock option that lets you unlock your device with your face. It takes advantage of the device front-facing camera and state-of-the-art facial recognition technology to register a face during setup and then to recognize it again when unlocking the device.
In conclusion, many iOS users will argue that some of the features mentioned in this post can be added by jailbreaking or installing third party applications but these features are included in Android by default. Android currently has around 450,000 applications available in Play Store and with its current growth rate it is expected to surpass the App Store in the coming months. Apple’s iOS gets the fluidity and responsiveness at an expense of some key features that are essential for any smartphone. Anyone can achieve fast and responsive UI with a locked down user interface like iOS. The applications, mentioned in this post, are all present on both platforms but Android is the only OS that provides additional functionality that proves to be very essential for its users. Given the aforementioned reasons, Android 4.0 Ice cream sandwich is clearly the superior mobile operating system. With 50.1% of smartphone market in the United States, Android will continue to gain more market share as more and more people discover the amazing features that make Android better than iOS.

Monday, 2 April 2012

Android has more Features

  1. Desktop widgets
  2. Battery removal
  3. External SD card storage up to 32GB
  4. Phone can be used as a flash drive
  5. Multitasking just like your computer (MAC or PC)
  6. Notification system (emails, texts, voicemail, Facebook, calendar and more)
  7. Personalization – Stocks, Hello Kitty, Superman, Bowling, Gucci or whatever.
  8. More free apps. (Essential apps that you pay for on iPhone are free on Android)
  9. Voice everything – text, search and navigation
  10. Carrier choice (basically all carriers carry Android phones)
  11. Video Chat on phones or computers via Gtalk, Skype, Yahoo or almost anything (not just iPhone users with FaceTime – that’s’ just dumb).
  12. Video Chat on 3G, 4G, or WiFi
  13. Phone prices (there are phones that are significantly cheaper than the iPhone.
  14. Manufacturer choices (ex. if you want your Samsung TV to work with Samsung phone, it can).
  15. Size choices (if you like a huge phone or small phone you can choose).
  16. Keyboard or Virtual Keyboard
  17. Talking GPS based on Google Maps with Satellite and 3D views.
  18. Standard cheap easy micro USB charging, use your old Blackberry charger.
  19. Editable dictionary
  20. Fantastic Google Voice integration
  21. Download all types of music (from iTunes or anywhere else)
  22. Portable WiFi Hotspot
  23. Tethering without jail breaking or rooting the Phone
  24. Sync calendar and contact information for free over the air
  25. Develop your own customized apps for free.
  26. Better rear and front camera choices
  27. Over the air music syncing and streaming
  28. Seeing all websites even ones with Flash
  29. Install any app you want even competitor apps
  30. Constant updates so the need to get a new phone is almost obsolete.

Top 10 Reasons why Android is better than Iphone

1) Browsing
Browsing with Android is much faster, and it has FLASH You can view all flash websites.and yes, you can play Facebook games like city ville, farm ville

2) Desktop
With Iphone you will have a page full of icons. Even if you categorized your apps, it’s still going to be ICONS :sWith Android, you will be able to customize your pages with widgets that have an actual Purpose like :
Twitter, facebook: update ur status

3) Connectivity
On android, there is the famous page. where you have 4 buttons
Turn on/off bluetooth
Turn on/off Wifi
Turn on/off Mobile Network
Turn on/off GPS
One press and ur’e done. There’s even an app on Android market called Y5, which
turns off the Wi-Fi automatically when no known wirless network is available.Now with Iphone you have to go through various options to control connections

4) PC Connection
With Iphone u need to have iTunes to manage your phone. But with Android it’s simple as to Mount your SD card and then just drag and drop

5) Multi-notification
On Iphone, to receive a notification from a specific program like twitter for example, the twitter program has to be open.

But with Android you receive all updates in the blasting notification bar for all your social activities in oneplace. Whatever it’s an e-mail, tweet, facebook, new SMS, missed call.

6) Personalization
Using Iphone, you have to stick with what apple says when it comes to personalizing your Iphone looks and settings.But with Android, you can customize your phone look and setting to match your lifestyle.
If you’re a social network power user, you can have a screen for Facebook, one for Twitter, one for texting, and one for Flickr. Or if you are a business user, you can have a screen for contacts, for your calendar, for GMail, for email, for RSS, and more.

7) Market
With Iphone, its the Apple app store. But so does android. The Android Market, one of the most active markets. you can find apps for everything. very easy to install though. and if ur’e interested to pay for an app you like to get all features, you enter your information on the Google Market one time and you’re done. I assure you there are Billions of free apps that’s gonna be useful depending on how you can make use of it. Keep Checking in as i will publish a post for the best apps you can have and it’s features.

8) Google Integration
We’re talking about Google, Do you have a gmail account? You will get surprised when you see how Android and Google are so close and easy to communicate with all its services.

9) Open Source
There are lot of developers working every minute on Android’s software and upgrading, tweaking to best performance. So when there is weakness it is fixed. iPhone Open? u’re kidding me.

10) Android Lets You Choose Your Hardware
This is my best Option. Apple keeps saying “think different” but when it comes to hardware, they don’t give much choce. Either black or white, 16 GB or 32 GB, u’re also stuck with 3.5 inch, 320×480 pixel display with 256M RAM and 600MHz processor. Now with Android they fit it to any hardware they want like the Nexus One (with 3.7-inch, 480×800 pixel display, 512MB of RAM and 1GHz Snapdragon processor) or the Motorola Droid which has a physical keypad.

Tuesday, 27 March 2012

System Services and BroadcastReceiver with Alarm Demo in Android




Note : Keep in mind that the vibrator alarm does not work on the Android emulator.
  • Add to  receiver in AndroidManifest.xml

Sunday, 18 March 2012

Email Validation in Android

package com.Email_Validation;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;

public class Email_ValidationActivity extends Activity {

    EditText TextEmail;
    String emailString;

    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {

        TextEmail = (EditText) findViewById(R.id.txtEmail);

    String regEx = "[a-zA-Z0-9\\+\\.\\_\\%\\-\\+]{1,256}" + "\\@"
            + "[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}" + "(" + "\\."
            + "[a-zA-Z0-9][a-zA-Z0-9\\-]{0,25}" + ")+";

    public void btnValidateEmailAddress(View v) {
        emailString = TextEmail.getText().toString().trim();

        Matcher matcherObj = Pattern.compile(regEx).matcher(emailString);

        if (matcherObj.matches()) {
            //Toast.makeText(v.getContext(), emailString + " is valid",Toast.LENGTH_SHORT).show();
            showAlert(emailString + " is valid", v.getContext());
        } else {
            //Toast.makeText(v.getContext(), emailString + " is InValid",Toast.LENGTH_SHORT).show();
            showAlert(emailString + " is InValid", v.getContext());
    // For alert message

        public static void showAlert(String msg, Context context) {
            AlertDialog.Builder builder = new AlertDialog.Builder(context);
            builder.setMessage(msg).setPositiveButton("Ok", dialogClickListener)

        static DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int which) {
                switch (which) {
                case DialogInterface.BUTTON_POSITIVE:
                    // Yes button clicked


                case DialogInterface.BUTTON_NEGATIVE:
                    // No button clicked


Layout : main.xml

Friday, 16 March 2012

Show Error Message in EditText - Android

Note : If user can not enter any messages in edittext and press click button then next screen will display with error message.