Tuesday, September 24, 2013

Android in Vision-2020

Just have a look on future android in 2020.. Version name may start with " R"
Your messaging services, video calling and hangouts etc....
http://www.techradar.com/news/software/operating-systems/android-in-2020-the-future-of-google-s-mobile-os-explored-1168141

Tuesday, April 9, 2013

G. V. Raman(a)Droid: Can't find Android SDK Manager and AVD Manager..

G. V. Raman(a)Droid: Can't find Android SDK Manager and AVD Manager..: If you are unable to find Android SDK Manager and AVD Manager follow the below steps:   In eclipse go to Windows --> Custom Perspec...

Can't find Android SDK Manager and AVD Manager..

If you are unable to find Android SDK Manager and AVD Manager follow the below steps:
 
  • In eclipse go to Windows --> Custom Perspective 









  • After selecting Custom Perspective from windows tab it will open a new window. In that window go to Command Groups Availability tab and check Android SDK and AVD Manager option.


 

  • Click on OK button. Now you can see Andriod SDK Manager and AVD manager in your eclipse.

Sunday, March 31, 2013

Installing external APK files on Android Emulator

To install an external APK on Android Virtual Deice (AVD) or on Emulator go through the following step-by-step procedure.
step 1-
         Launch the emulator
step 2-   
         Paste your APK file whichever you want to install on emulator in android-sdk-windows\platform-tools directory.
step 3-
         open cmd prompt and move to platform-tools folder of Android SDK directory.
step 4-
         Run the  following command:
  • adb install "xxx.apk" 
    • Example: abd install "Indianlaws.apk"
If Exists:
 If the emulator is already has that application it will give a failure notification to the user - [ INSTALL_FAILED_ALREADY_EXISTS ].

After successful installation it will give a " SUCCESS" message to the user.
Please, find the procedure in the following screenshot.




Sunday, April 8, 2012

Linear Layout Example in Android

This tutorial is about to designing a Linear Layout. Linear Layout is a very basic and the default layout of providing the UI in Android.

Linear Layout is a View Group which supply its child Views, either HORIZONTAL or VERTICAL, depends upon the orientation property we set.
  • Create a project against your specified Build Target. (Android SDK level).
  • Hence, the layout file linear.xml would be like this:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
</LinearLayout>

To configure a layout, we have main areas control besides the container's content: 
  • Orientation:
    • Orientation indicates whether the LinearLayout represents a row or a column. 
    • Just add the android:orientation property to LinearLayout element in XML layout, set the value to be horizontal for a row or vertical for a column.
    • The orientation can be modified at runtime by invoking setOrientation().
  • Fill Model:
    • Since, we have so many devices available in the market with various screen sizes, to match the size of the child views with various screen sizes we use Fill Model in android.
    • All widgets inside a LinearLayout must supply android:layout_width and android:layout_height properties.
    • These properties values have 3 flavors:
      1. We can provide a specific dimension, such as 200dp to indicate the widget should take up exactly  200dp (dp/dip - Density Independent Pixels).
      2. We  can provide wrap_content, which means the widget should fill up its natural space,  unless that is too big, in which case Android can use word-wrap as needed to make it fit.
      3. We can provide fill_parent, which means the widget should fill up all available space in its enclosing container, after all other widgets are taken care of(means the widgets added after this will not be visible).
Here, in this example I am setting the orientation as vertical. Later, added some widgets (TextViews, EditText, and a Button) to LinearLayout. 

After editing the xml file would be like this:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
<TextView  
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="Hello.! Everyone"
    />
    <TextView  
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="Welcome to Android.."
    />
    <TextView  
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="this is an example for Linear layout with vertical orientation"
    />
  <TextView  
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="Please enter your name:"
    />
    <EditText  
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    
    />
    <Button  
    android:layout_width="200dp" 
    android:layout_height="wrap_content" 
    android:text="Save"
    />
</LinearLayout>

Now lets, move on to activities coding. In this example we are not doing anything on activity file.
Hence, the activity file would be like this:
public class LinearLayoutActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}
After running the application output would be like this:


Friday, March 30, 2012

Getting Real time traffic data on Google Maps

Its very nice to hear that Google is providing the real time traffic data again almost after a year.Now on we can get the traffic details in all the areas, like where the traffic is more and where it is less. And as well as it is going to guide the nearest way to your destination.
Data is gathered through third-party services and through information from Android users who have opted in to the My Location feature on Google Maps.


For detail information Click Here..


Thursday, February 23, 2012

Android User Interface, Common Layout Objects


The more common types of layout objects to use in android applications are as follows:

  • Frame Layout.
  • Linear Layout.
  • Table Layout.
  • Relative Layout.

Frame Layout:

  • Frame Layout is a blank space on the screen that we can later fill with a single object.
  • All child elements of the Frame Layout are pinned to the top left corner of the screen, cannot specify a location for a child views.
  • Later child views will simply be drawn over earlier ones.
Linear Layout:

  • Linear Layout  aligns all children in a single direction — vertically or horizontally, depending on how you define the orientation attribute.
  • All children are stacked one after the other, so a vertical list will only have one child per row, no matter how wide they are, and a horizontal list will only be one row high (the height of the tallest child, plus padding).
Table Layout:

  • Table Layout positions its children into rows and columns.
  • TableLayout containers do not display border lines for their rows, columns, or cells. The table will have as many columns as the row with the most cells.
  • A table can leave cells empty, but cells cannot span columns, as they can in HTML.

Relative Layout:

  • Relative Layout lets child views specify their position relative to the parent view or to each other (specified by ID). So you can align two elements by right border, or make one below another, centered in the screen, centered left, and so on.
Some other Important View Groups:

  • Gallery
  • GridView
  • ListView
  • ScrollView
  • Spinner