simplyeasylearning

Showing posts with label AndroidFundamentals. Show all posts
Showing posts with label AndroidFundamentals. Show all posts

Sunday, 26 April 2015

Downloading And Installing Android Studio...

We have already covered the details about the Android Studio in the previous post, don't worry if you missed that click here if you want to have a look.

One thing I want to share with you that this IDE (Integrated Development Environment ) is designed specially for the development of android apps. One can use it on operating Systems like WINDOWS, MAC OS and LINUX.The minimum required RAM for installing this IDE is 2GB but 4GB of RAM is Recommended by Google.You must have atleast 500 MB of free disk space in your computer to install it.


How To Download And Install


The installation of this IDE is demonstrated step by step in the official website of it.
So please refer here .
In case you have any problem or query comment in box below.

Android Studio . How it works?

Android Studio


Android Studio is the integral development environment used for development of Android Apps.
It is based upon the IntelliJ Idea development environment and it is the Official development tool for Android Application development for Google play.

Android studio is based upon the concept of gradle.



So what is gradle in Android Studio ?
Gradle is nothing but a system that helps in the management of the following-

i.repository management.
ii.Build Management
iii.Version Management.
iv. Application Signing of App.


Thus the gradle helps in each and every task for our projects which we build using Android Studio. It is also called as the Control version System (CVS) for android.

Through the help of Android Studio we are able to visually create our application that includes layouts like Buttons, Radio Buttons, Check Boxes, Spinners etc.




When we use Android studio we are going to use JRE or JAVA as one component and android Architecture as Another Component.

We can use collections, Utility Classes from java and we can also use Android specific classes within Android Studio.

In the next post the installation of the IDE is demonstrated click here to download and install Android Studio.

Android Architecture in details ...

 

Linux Kernel-


In the linux kernel  we have libraries and android runtime that helps to work with different concepts.
For example SqlLite is a library to store data within the App. We can have media libraries to interact with Videos, Audios and Pictures etc. We also have a very important library called as WEBKIT.


What is WEBKIT in Android?

Webkit is an browser engine powering safari, Google Chrome and Android Internet browser.


Android Runtime-


Android Runtime is a component which takes care of the core services like Google MAP, Location Service and also provides a runtime for running our apps on Google's  Android Operating System.

Android gives every required functions to a App like Memory Management, Device Mangment and other jobs which are the application requisition. Its the runtime's responsibility to interact with whom the App requiring.

The runtime environment actually targets different architectures which exist on different phones. The runtime is able to understand and push the native code according to Architecture of  the phone.


Application framework-


Application framework is a layer through which different applications can interact from various activities with the phone. Every application can interact with defferent kinds of frameworks like notification framework, View framework and telephonic fraework and others.
These frameworks are the basic building blocks for android architecture. These frameworks contains reusable codes, libraries, controls that any application can use for interaction.

Application-

Application layer is the top layer within android architecture.this layer contains two types of application.
1. Inbuilt application
2.User defined Application

1.Inbuilt applications-
Inbuilt apps like Telephony, SMS and browser etc.
They interact with the application framework but they are the integral part of the android system.

2.User Defined Applications- 

 These are the apps which are developed by the end user or the third party developer like Facebook Whatsapp or Twitter etc. They also interact with the application framework and work on the same manner as Inbuilt Applications

Tuesday, 4 November 2014

Use of Intents and How it works.

                                Intents are a mechanism in android to invoke new activities from one Activity.Through Intents we can pass info from one intent activity to another activity, the reverse can also be done within intents,where data can be received back from the child intent to parent intent.There are primarily two types of intents which we can use in android:-
1) Explicit Intents
2)Implicit Intents



1)Explicit Intents-
                                They are those intents which are created by user or may also be called as a user defined intent ,we can have multiple activities within an android application and all those activities can be called in the form of intents on the happening of certain events.
                                  The intent would automatically need a layout that is essential for every activity. 

Let's make a simple application on Explicit Intents-

step-1:
Crete a new project and name it 
Step 2:
Go to activity_main.xml  and then GO to design and take a Button widget

Step 3:

First Create a Child Activity or Second Activity  ,Right Click on Java Folder on Left side Menu in Android Studio    New->Activity->Blank Activity        and name it Child Activity
So a new Activity  Child_Activity.java is created.

Go to Main_Activity.java

And Write following code-


public void CallChildActivity(View v)
{
    Intent ChildActivity=new Intent(getApplicationContext(),ChildActivity.class);           
    ChildActivity.putExtra("UserID","LPU");
    ChildActivity.putExtra("Password","Ashish");       

    startActivity(ChildActivity);          
//for calling up the child activity

}



Go to activity_my.xml :-

Go to design and take a button  and Take two EditText widget  and give them id editText and editText2 respectively by which we can call our child activity and enter some data and send it to our Child Activity.


<Button
        style="?android:attr/buttonStyleSmall"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="My Introduction"
        android:id="@+id/button"
        android:layout_below="@+id/button"
        android:layout_alignParentStart="true"
        android:layout_marginTop="68dp"
        android:onClick="CallChildActivity"/>        //Add this line for creating a method related to this button


Go to Child_Activity.java:-


Write the code below this method:-

public class ChildActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_child);



//WRITE YOUR CODE BELOW THIS FOR FETCHING DATA INTO CHILD ACTIVITY

 I am writing this code in Child Activity For fetching data from Main Activity.

 EditText et1=(EditText) findViewById(R.id.editText);
        EditText et2=(EditText) findViewById(R.id.editText2);
        Intent in=getIntent();
        String vUsername=in.getExtras().getString("UserID");
        String vPass=in.getExtras().getString("Password");
        TextView tv=(TextView) findViewById(R.id.textView);
        tv.setText(vUsername);
        et1.setText(vUsername);
        et2.setText(vPass);
    }




2)Implicit Intents:-
                                 They are those which are not user created and these intents can be called by any application by making a single call, there are lot many implicit intents which can be called.
For example:-Browser Intent ,SMS intent ,Call Intent.

                              We can capture these intents so that out application can make use of inbuilt intents,whenever certain interaction is required .We can call these implicit intents in the following manner-:

Calling Up Browser:-

This intent will invoke  by default browser configure within your android application we can use the intent class to invoke the same .




 
                                

Popular Posts

Total Visitors

TutorialsHub. Powered by Blogger.

Contributors

Tutorials

Search This Blog