NewImage

Creating Native ads is a bit similar to regular banner ads. Native ads have higher CTR compare to normal banner. It is recomended to add native ads in your apps. You can still use both regular smart banner and native ads but you cannot use both in the same page. Be creative and add native ads in your Android Apps to increase your apps revenue.

1. Create Native ads unit with template. 

 

 

NewImage

 

2. Customize the CSS presentation on Admob console page. You can also redesign CSS later without redeploy your apps.

 

NewImage

3. Add native express ads view in the main activity layout. Add the following code. You can modify the adSize according to your need.

<com.google.android.gms.ads.NativeExpressAdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
ads:adSize="320x150"
ads:adUnitId="@string/ad_unit_id">
</com.google.android.gms.ads.NativeExpressAdView>

 

3. Load an Ads in the MainActivity.java by adding two line of code in the onCreate()

 

NewImage

 


NativeExpressAdView adView = (NativeExpressAdView) findViewById(R.id.adView);
adView.loadAd(new AdRequest.Builder().build());

 

4. Run the apps and you should see native ads in your android apps.

Firebase is a new tools that allow developer to grow user and monetise the app in one stop solution. You can link your existing Admob apps. Just click Analyize tab and select the existing aps and click link to firebase.
NewImage
Download the google-service config file and link it to your Android Studio project.

NewImage

Next , Configure the Gradle file in the Android Studio.

  1. Project-level build.gradle (<project>/build.gradle):
    buildscript { dependencies {
        // Add this line
        classpath 'com.google.gms:google-services:3.0.0' } }
  2. App-level build.gradle (<project>/<app-module>/build.gradle):
    ...
    // Add to the bottom of the file
    apply plugin: 'com.google.gms.google-services'
    includes Firebase Analytics by default

Next add Individual dependency in your <project>/<app-module>/build.gradle and click sync now. Gradle will refresh the project library and add the dependency that you just added.

...
    dependencies {
            compile fileTree(dir:'libs', include:['*.jar'])
            compile 'com.android.support:appcompat-v7:xx.x.x'
            compile 'com.google.firebase:firebase-ads:9.6.0'
        }
...

apply plugin:'com.google.gms.google-services'



NewImage
Open the activity_main.xml in your res/layout folder and add the following code.
<com.google.android.gms.ads.AdViewandroid:id="@+id/ad_view"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_centerHorizontal="true"android:layout_alignParentBottom="true"ads:adSize="BANNER"ads:adUnitId="@string/banner_ad_unit_id" />

Next, Open the main activity java files add add the following code to init and display the ads.

NewImage
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.MobileAds;

/** * Main Activity. Inflates main activity xml and child fragments. */public class MyActivity extends ActionBarActivity {

    private AdView mAdView;

    @Overrideprotected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my);

        // Initialize the Mobile Ads SDK.MobileAds.initialize(this, "ca-app-pub-3940256099942544~3347511713");

        // Gets the ad view defined in layout/ad_fragment.xml with ad unit ID set in // values/strings.xml.mAdView = (AdView) findViewById(R.id.ad_view);

        // Create an ad request. Check your logcat output for the hashed device ID to // get test ads on a physical device. e.g. // "Use AdRequest.Builder.addTestDevice("ABCDEF012345") to get test ads on this device."AdRequest adRequest = new AdRequest.Builder()
                .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
                .build();

        // Start loading the ad in the background.mAdView.loadAd(adRequest);
    }
 
}
Now you can add a bunch of Firebase tools such as realtime database, analytics, cloud messaging and user authentication.

How to add Admob with Firebase

by on 3:56 AM
Firebase is a new tools that allow developer to grow user and monetise the app in one stop solution. You can link your existing Admob apps. ...

NewImage

 

Activity is a single screen with user interface in Android just like a window form in visual .net development tools. Just like C++ which start with main() function. Android start its activity with onCreate() method. This is where you should do all of your  create views, bind data to lists, etc. OnStart() is call when the activity is visible to the user. OnResume() is call when the user start interacting with the apps. OnPause() is called when the app cannot receive any user input or execute code. OnStop() is called when the The activity is no longer visible to the user. onDestroy() is called before the activity is being destroy by the system.

 

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

import androidrich.com.firebaseauthtest.R;

public class TestActivity extends Activity {
/** Called when the activity is first created. */

private final static String TAG = "TestActivity";

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Log.i(TAG, "On Create .....");
}
/* (non-Javadoc)
* @see android.app.Activity#onDestroy()
*/
@Override
protected void onDestroy() {
super.onDestroy();
Log.i(TAG, "On Destroy .....");
}
/* (non-Javadoc)
* @see android.app.Activity#onPause()
*/
@Override
protected void onPause() {
super.onPause();
Log.i(TAG, "On Pause .....");
}

/* (non-Javadoc)
* @see android.app.Activity#onRestart()
*/
@Override
protected void onRestart() {
super.onRestart();
Log.i(TAG, "On Restart .....");
}

/* (non-Javadoc)
* @see android.app.Activity#onResume()
*/
@Override
protected void onResume() {
super.onResume();
Log.i(TAG, "On Resume .....");
}

/* (non-Javadoc)
* @see android.app.Activity#onStart()
*/
@Override
protected void onStart() {
super.onStart();
Log.i(TAG, "On Start .....");
}
/* (non-Javadoc)
* @see android.app.Activity#onStop()
*/
@Override
protected void onStop() {
super.onStop();
Log.i(TAG, "On Stop .....");
}
}
NewImage
Firebase Authentication is a good and secure way to get the indentity of your user.It leverages industry standards like OAuth 2.0 and OpenID Connect.
FirebaseUI as a complete drop-in auth solution. The FirebaseUI Auth component implements best practices for authentication on mobile devices and websites, which can maximize sign-in and sign-up conversion for your app. It also handles edge cases like account recovery and account linking that can be security sensitive and error-prone to handle correctly. You can access the user's basic profile information, and you can control the user's access to data stored in other Firebase products.

Step 1: Create New Project on AndroidStudio. Configure your new project such as Application Name, Company Domain, and Project Location.
NewImage

2. Just accept the default form factors your apps will run on.
NewImage

3. Select add Empty Activity for your Mobile Android app.
NewImage

4. Goto Tools menu, and click the new Firebase. Select the  Authentication and Conect to Firebase. next Click Add firebase Authentication to your apps. It will automatically add the following classpath to the build.gradle (project level) and Add the following code to the app/build.gradle
 
  1. Project-level build.gradle (<project>/build.gradle):
    buildscript { dependencies {
        // Add this line
        classpath 'com.google.gms:google-services:3.0.0' } }
  2. App-level build.gradle (<project>/<app-module>/build.gradle):
    ...
    // Add to the bottom of the file
    apply plugin: 'com.google.gms.google-services'
    includes Firebase Analytics by default

NewImage

5. You will got the following error.
Error:Execution failed for task ':app:processDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it.  Don’t worry we will fix the error in the next step.
NewImage

6. Add firebase to your Android app and enter the Package name that we created earlier in step 1.

NewImage

For SHA1, go to terminal and type the following code.

keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android

For window user, follow the StackOverflow discussion over here.

7. Swith to project mode and drag and drop the google-service.jason to you app folder.

NewImage

8. Go to Firebase console and go the Auth menu and enable Google Sign in Provider.
NewImage

9. Add google sign in button in your main layout activity
<com.google.android.gms.common.SignInButtonandroid:id="@+id/sign_in_button"android:layout_width="wrap_content"android:layout_height="wrap_content" />
 
NewImage
 
10. On you onCreate method configure Google Sign in to request user data by using GoogleSignObject
 
  // Configure sign-in to request the user's ID, email address, and basic// profile. ID and basic profile are included in DEFAULT_SIGN_IN.GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                .requestEmail()
                .build();
 
NewImage
 
11. Then also in main_activity onCreate method, create GoogleApiClient object to access Google Sign-In API and the options you specified.
 
 
NewImage
 
Copy the following code.
 
package androidrich.com.firebaseauthtest;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import com.google.android.gms.auth.api.Auth;
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
import com.google.android.gms.auth.api.signin.GoogleSignInResult;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.ResultCallback;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthCredential;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.auth.GoogleAuthProvider;

public class MainActivity extends AppCompatActivity implements        GoogleApiClient.OnConnectionFailedListener,
        View.OnClickListener {

    private static final String TAG = "GoogleActivity";
    private static final int RC_SIGN_IN = 9001;

    // [START declare_auth]    private FirebaseAuth mAuth;
    // [END declare_auth]
    private GoogleApiClient mGoogleApiClient;
    private TextView mStatusTextView;
    private TextView mDetailTextView;
    private ProgressDialog mProgressDialog;

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

        // Views        mStatusTextView = (TextView) findViewById(R.id.status);
        mDetailTextView = (TextView) findViewById(R.id.detail);

        // Button listeners        findViewById(R.id.sign_in_button).setOnClickListener(this);
        findViewById(R.id.sign_out_button).setOnClickListener(this);
        findViewById(R.id.disconnect_button).setOnClickListener(this);

        // [START config_signin]        // Configure Google Sign In        GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                .requestIdToken(getString(R.string.default_web_client_id))
                .requestEmail()
                .build();
        // [END config_signin]
        mGoogleApiClient = new GoogleApiClient.Builder(this)
                .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)
                .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
                .build();

        // [START initialize_auth]        mAuth = FirebaseAuth.getInstance();
        // [END initialize_auth]    }

    @Override    public void onStart() {
        super.onStart();

        // Check for existing sign-in        FirebaseUser user = mAuth.getCurrentUser();
        updateUI(user);
    }

    // [START onactivityresult]    @Override    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        // Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...);        if (requestCode == RC_SIGN_IN) {
            GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
            // [START_EXCLUDE]            handleGoogleSignInResult(result);
            // [END_EXCLUDE]        }
    }
    // [END onactivityresult]
    // [START auth_with_google]    private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {
        Log.d(TAG, "firebaseAuthWithGoogle:" + acct.getId());
        // [START_EXCLUDE silent]        showProgressDialog();
        // [END_EXCLUDE]
        AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);
        mAuth.signInWithCredential(credential)
                .addOnCompleteListener(this, new OnCompleteListener() {
                    @Override                    public void onComplete(@NonNull Task task) {
                        Log.d(TAG, "signInWithCredential:onComplete:" + task.isSuccessful());

                        // If sign in fails, display a message to the user. If sign in succeeds                        // the auth state listener will be notified and logic to handle the                        // signed in user can be handled in the listener.                        if (!task.isSuccessful()) {
                            Log.w(TAG, "signInWithCredential", task.getException());
                            Toast.makeText(MainActivity.this, "Authentication failed.",
                                    Toast.LENGTH_SHORT).show();
                        }
                        // [START_EXCLUDE]                        hideProgressDialog();
                        // [END_EXCLUDE]                    }
                });
    }
    // [END auth_with_google]

    private void handleGoogleSignInResult(GoogleSignInResult result) {
        Log.d(TAG, "handleSignInResult:" + result.getStatus());
        if (result.isSuccess()) {
            // Successful Google sign in, authenticate with Firebase.            GoogleSignInAccount acct = result.getSignInAccount();
            firebaseAuthWithGoogle(acct);


            

        } else {
            // Unsuccessful Google Sign In, show signed-out UI            updateUI(null);
        }
    }

    // [START signin]    private void signIn() {
        Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);
        startActivityForResult(signInIntent, RC_SIGN_IN);
    }
    // [END signin]
    private void signOut() {
        // Firebase sign out        mAuth.signOut();

        // Google sign out        Auth.GoogleSignInApi.signOut(mGoogleApiClient).setResultCallback(
                new ResultCallback() {
                    @Override                    public void onResult(Status status) {
                        updateUI(null);
                    }
                });
    }

    private void revokeAccess() {
        // Firebase sign out        mAuth.signOut();

        // Google revoke access        Auth.GoogleSignInApi.revokeAccess(mGoogleApiClient).setResultCallback(
                new ResultCallback() {
                    @Override                    public void onResult(Status status) {
                        updateUI(null);
                    }
                });
    }

    private void showProgressDialog() {
        if (mProgressDialog == null) {
            mProgressDialog = new ProgressDialog(this);
            mProgressDialog.setMessage(getString(R.string.loading));
            mProgressDialog.setIndeterminate(true);
        }

        mProgressDialog.show();
    }

    private void hideProgressDialog() {
        if (mProgressDialog != null && mProgressDialog.isShowing()) {
            mProgressDialog.hide();
        }
    }

    private void updateUI(FirebaseUser user) {
        hideProgressDialog();
        if (user != null) {
            mStatusTextView.setText(getString(R.string.google_status_fmt, user.getEmail()));
            mDetailTextView.setText(getString(R.string.firebase_status_fmt, user.getUid()));

            findViewById(R.id.sign_in_button).setVisibility(View.GONE);
            findViewById(R.id.sign_out_and_disconnect).setVisibility(View.VISIBLE);
        } else {
            mStatusTextView.setText(R.string.signed_out);
            mDetailTextView.setText(null);

            findViewById(R.id.sign_in_button).setVisibility(View.VISIBLE);
            findViewById(R.id.sign_out_and_disconnect).setVisibility(View.GONE);
        }
    }

    @Override    public void onConnectionFailed(ConnectionResult connectionResult) {
        // An unresolvable error has occurred and Google APIs (including Sign-In) will not        // be available.        Log.d(TAG, "onConnectionFailed:" + connectionResult);
        Toast.makeText(this, "Google Play Services error.", Toast.LENGTH_SHORT).show();
    }

    @Override    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.sign_in_button:
                signIn();
                break;
            case R.id.sign_out_button:
                signOut();
                break;
            case R.id.disconnect_button:
                revokeAccess();
                break;
        }
    }
}




<com.google.android.gms.common.SignInButton
 android:id="@+id/sign_in_button"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"/>

<com.google.android.gms.common.SignInButton
 android:id="@+id/sign_in_button"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"/>



Watch Official Video from Google
Prerequisites

You need a device running Android 2.3 (Gingerbread) or newer devices.
NewImage
Make sure the device or emulator has a Google Play Services 9.0 or above.

NewImage

You need to make sure you have atl least Google Play Services rev 30 and Google Repository Rev 30. As per today we have Google Play services rev 33 and Google Repository rev 35. Always update this two repository.

There are plenty of sample code for Andorid and iOS here. You can also Quick Start from GitHub

Step to add firebase project.
 NewImage
1. Add firebase project in https://firebase.google.com/console/.


NewImage
2. Click Add Firebase to your Android app
NewImage
3.When prompted, enter your app's package name. It's important to enter the package name your app is using; this can only be set when you add an app to your Firebase project.

4. Doownload a google-services.json file and drag and drop the file in your android studio app folder.


NewImage

The Google services plugin for Gradle loads the google-services.json file that you just downloaded. Modify your build.gradle files to use the plugin.

  1. Project-level build.gradle (<project>/build.gradle):
    buildscript { dependencies {
        // Add this line
        classpath 'com.google.gms:google-services:3.0.0' } }
  2. App-level build.gradle (<project>/<app-module>/build.gradle):
    ...
    // Add to the bottom of the file
    apply plugin: 'com.google.gms.google-services'
    includes Firebase Analytics by default help_outline
  3. Finally, press "Sync now" in the bar that appears in the IDE:
The Google services plugin for Gradle loads the google-services.json file that you just downloaded. Modify your build.gradle files to use the plugin.

NewImage

 

We recently update our Android Studio (with instant run support) to the latest 2.2 version. It is focus to create a fast and productive integrated development environment (IDE) for Android. We start developing Android on Eclipse IDE but switch to Android Studio 3 years ago. Today 92% of the top 125 apps & game developers on Google Play, plus millions of developers worldwide, use Android Studio.
 
So, today we update our old Android Studio to the latest Android Studio 2.2 stable version. Here is what we like about the new Android Studio 2.2
 
NewImage
 
1. Now your can download the Android SDK component in the background. You can still coding while downloading the new SDK component. It is simple but we love this new features.
 
NewImage
 
2. Now you can build android APK and Analyze back the APK and reduce your APK size. The new APK Analyzer helps you understand the contents and the sizes of different components in your APK. You can also use it to avoid 64K referenced method limit issues in your Dex files, diagnose ProGuard configuration issues, view merged AndroidManifest.xml file, and inspect the compiled resources file (resources.arsc).
 
NewImage
 
3. New Merged Manifest Editor. With new Merge Manifest editor you can find out with legend where the permission of your application come from. 
 
NewImage
 
4. You can also design Android Interface using new layout manager. The new Layout Editor: Android Studio 2.2 features a new user interface designer. There are many enhancements but some of the highlights include: Drag-and-drop widgets from the palette to the design surface .Design surface has a blueprint mode to inspect the spacing and arrangement of your layout. Properties panel can you help edit the value of component quickly.
 
NewImage
 
5. New constraint layout: This new layout is quite similar with RelativeLayout bu the constraint Layout was designed to be used in Studio and it can efficiently express your app design so that you rely on fewer layouts like LinearLayout, FrameLayout, TableLayout, or GridLayout. 
 
NewImage
 
6. The built-in automatic constraints inference engine to automatically predict the layout in potrait and landscape mode. It is huge time saver.
 
NewImage
 
7. Easy firebase integration.Firebase is the new tools for developer that can help you develop high-quality apps, grow your user base, and earn more money. Inside of Android Studio, you can add Firebase to a new or existing Android app with the new Assistant window. You can now explore other Firebase services like Firebase Cloud Messaging or Firease Crash Reporting to add your application. Learn more about firebase integration here.
 
NewImage
 
8. Find sample Code directly from the IDE. Just highlight any code or API and the IDE will find a sample code for you that you can copy and paste or learn more about the documentation.
NewImage
 
9. Help UI test with new Expresso recorder.

NewImage

This is a tutorial 3 on how to create your own android application series.  If you have not read the first article on how to create your first android application, follow this link. In this tutorial we will learn how to display message box or dialog box. Message box is created based on AlertDialog.Builder classes. This class will creates a builder for an alert dialog that uses the default alert dialog theme.  

Open the last project in Android Studio. We will add the following code in our MainActivity java.

NewImage

First we need to add the following classe

 

import android.app.AlertDialog;
import android.content.DialogInterface;

 

We also are going to initialize the AlerDialog object and set the properties and method.

 

 

AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
alertDialogBuilder.setMessage("This is a message box");

alertDialogBuilder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface arg0, int arg1) {
Toast.makeText(MainActivity.this,"You Ok BUtton",Toast.LENGTH_LONG).show();
}
});



AlertDialog alertDialog = alertDialogBuilder.create();
alertDialog.show();

 

 

NewImage

 

Full code to run messagebox in android. 

package androidrich.com.hellome;

import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;

public class MainActivity extends ActionBarActivity {

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

AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
alertDialogBuilder.setMessage("This is a message box");

alertDialogBuilder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface arg0, int arg1) {
Toast.makeText(MainActivity.this,"You click Ok Button",Toast.LENGTH_LONG).show();
}
});



AlertDialog alertDialog = alertDialogBuilder.create();
alertDialog.show();


}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();

//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}

return super.onOptionsItemSelected(item);
}
}
This is a tutorial 2 on how to create your own android application series.  If you have not read the first article on how to create your first android application, follow this link. In this tutorial we will learn how to change your android icon and application names.
NewImage
When you create your first hello world android application, android studio will automatically create a series of files and folder.Android studio will create a resources folder that will store  static content that your code uses, such as bitmaps, colors, layout definitions, user interface strings, animation instructions, and more.


NewImage


Drawable folder store Image files like .png, .jpg, .gif or XML files that are compiled into bitmaps, state lists, shapes, animation drawable. This is where you store Android Icon prior to Android 4.3. Since Android 4.3 we can now make use of the res/mipmap folders to store "mipmap" images.

NewImage
Mipmap folder is where you store your anroid icon. You can edit the ic_launcher.png and edit the files with your own icon.
Using a mipmap as the source for your bitmap or drawable is a simple way to provide a quality image and various image scales, which can be particularly useful if you expect your image to be scaled during an animation.
NewImage
You need to change the ic_launcher.png in mipmap-hdpi , mipmap-mdli and mipmap-xxhdpi .

Layout folder store XML files that define a user interface layout. T

NewImage

Values folder is where simple values, such as strings, integers, and colors are store. Here we can open the string.xml and edit the app_name value to our application names.
NewImage
NewImage
Please Note that the latest version of Android Studio as for today  is 2.13. The tutorial are using android studio 1.2.
NewImage

Launch Android Studio and Click Start a New Android Studio Project.

NewImage

Configure your New Project application name. The project will automatically create you package name.
NewImage

Select Target Android Devices. You should select API 10 or Android 2.33 as about 99.5% of the devices that are active on Google play are using this version.

NewImage

Add an Activity to your mobile apps. Activity is similar to form in Visual .Net development. You can choose Blank Activity, Blank activity with fragment, full screen activity, Google Admob Activity, Google Map Activity, Login Activity and ect. Select Blank activity for our example.

NewImage

Customize the activity name. Let’s use the default setting and click next.
NewImage
Please wait while Android Studio create and configure project for your.

NewImage

Android Studio will create several folder and files for your. The most important file is MainActivity.java. This main files will convert into dalvik executable and run your application.

NewImage
Click Run app icon to test your first android app in the emulator. If you want to test it on your android handphone connect it with USB.
NewImage

Congratulation, your first hello world android apps.

NewImage