Skip to main content

Creating new Project in Android Studio

Step 1: Create a New Project

If you didn't have a project opened, Android Studio shows the Welcome screen. To create a new project, click New Project.
If you had a project opened, Android Studio shows the development environment. To create a new project, click File >New Project.
The next window lets you configure the name of your app, the package name, and the location of your project.

Enter the values for your project and click Next.

Step 2: Select Form Factors and API Level

The next window lets you select the form factors supported by your app, such as phone, tablet, TV, Wear, and Google Glass. For each form factor, you can also select the API Level that your app requires. To get more information, click Help me choose.

The API Level window shows the distribution of mobile devices running each version of Android, as shown in Figure 2. Click on an API level to see a list of features introduced in the corresponding version of Android. This helps you choose the minimum API Level that has all the features that your apps needs, so you can reach as many devices as possible. Then click OK.

Then, on the Form Factors Window, click Next.

Step 3: Add an Activity

The next screen lets you select an activity type to add to your app, as shown in Figure 4. This screen depends on the form factors you selected earlier.

Choose an activity type and click Next.

Step 4: Configure Your Activity

The next screen lets you configure the activity to add to your app, as shown in Figure 6.

Enter the activity name, the layout name, and the activity title. Then click Finish.

Step 5: Develop Your App

Android Studio creates the default structure for your project and opens the development environment. If your app supports more than one form factor, Android Studio creates a module for each of them,


Popular posts from this blog

Sign In with Google in Your Android Apps Example with Code in Android Studio

1. Prerequisites

Before beginning, check that you have all the necessary pre-requisites. These include: Android StudioAn Android Device that runs Android 4.2.2 or later    -or-   A configured Android Emulator (this is available in Android Studio)The latest version of the Android SDK including the SDK tools component. You can get this from the Android SDK Manager in Android Studio.The Google Play Services SDK. You can get this from the Android SDK Manager in Android Studio.

2. Enabling Sign-In for your App
Before you start coding any of the Android functionality, you need to turn on the Sign-In APIs for your App in the Google Developer’s console. You’ll see how to do that in this section. Create a Project
To create a project, visit the developer’s console at:
Press the ‘Create Project’ button, and you’ll see a popup like this:

Enter a meaningful name for your project in the ‘Project name’ box. For the project ID, you’ll need to enter something tha…

Android Basic Tutorial : Get the Current Date and Time

Here’s a code snipped to get the current date and/or time. This snipped uses the Calendar object (java.util.Calendar) which is a useful class when working with dates.

//Get a calendar object for the current date and time Calendar CurrentDateTime = Calendar.getInstance();
//Example: Get current day of the month