Breaking News

Android Studio

Android Studio

As an IDE, Android Studio provides the interface you need to build your applications. The programming language is Java or Kotlin. . Android St. will give you access to SDK ( Software Development Kit).

Setting up

Follow the instructions during installation. Check the box to tell the installer that you also want to use the Android SDK and note where to install Android Studio and the SDK. Here are the default values selected for your installation:

Choose a directory name for the SDK that should not contain any spaces. Note that the AppData folder selected by Android Studio here is a hidden folder under Windows.

Starting a new project

Launch Android Studio, and then New Project. You can also choose File> New> New Project at any time in the IDE itself.
You choose from several types of activities. You are free to start a new project without activity (in this case, you would choose "Add no activity"). so it's easier to let Android Studio set you up with something that looks like a white. Application template to start.
You choose a new Android application.
Choose the option that best suits the application you want to create. You will also be able to choose the name of your app at this point, the minimum Android SDK you want to support and the name of the package. This is a combination of the application name and the developer's name.

What are all these files?

Android development involves many files and resources that need to be structured
The main "code" will be the Java file with the same name as your activity. By default, this is MainActivity.Java.

However, the actual layout of your application is fully processed in a file called activity_main.xml. XML is a markup language that defines the layout of a document, much like the HTML used to create websites.
So, to create a new button, you have to modify activity_main.xml and to describe what happens when someone clicks on this button, you will write it in MainActivity.Java. To complicate things a little, you can use an XML file to define the layout of any Java script (called class). This is defined at the very top of your Java code, with the line:

This indicates that this script will be defined by activity_main.xml. It also means that you can theoretically use the same XML file to define provisions for two different Java classes.

As you can see, an Android application is actually composed of several files. . The main window on the right of the screen allows you to display scripts, while the tabs at the top allow you to switch between what is open at any time.

If you want to open a tab, you can do it via the file hierarchy on the left. Double-click MainActivity.Java and it will appear in the foreground in the right window.
When you edit XML files, you can switch between the "Text" view and the "Design" view. The Text view also has a preview window for viewing what you are creating.

More types of files

The 'res' folder is a shortcut for 'resources' and includes 'drawable' (images of your application) as well as 'layout' at the location where your XML files go.

"Values" is a folder that contains XML files containing variable values, such as application names and color values.
AndroidManifest.xml is located in the "manifest" folder. Right-click on the appropriate directory, then choose "New" and add what you want.

Meet Gradle

Maybe Android Studio mentions "Gradle" from time to time. This is a "build automation tool" to turn all these files into a single APK file. . Sometimes, if things do not work, you can choose Build> Clean Project, which essentially reaffirms the location of all files and their role. There will normally be two of these Gradle build files, one for the entire project and one for the 'module' (the application).

Debugging, virtual devices and the SDK manager

You can test your application either run it on your physical device or create a virtual device (emulator) on which to test it.
To run it on your device, connect it via USB, allow debugging and USB installations from unknown sources in your phone's settings, then press the green play button at the top, or "Run> Run ".

You will see a message informing you that the Gradle build is running on your device. It's faster with Instant Run.
When your application is running, you will be able to get live reports via the 'logcat' tab of the Android monitor, located at the bottom of the screen. You may find that it is simply a matter of having forgotten permissions that are easy to fix. Be sure to filter the types of messages you want to see here.
You can also see CPU usage, etc. Android Device Monitor lets you monitor everything with a convenient user interface.

AVD Manager

One of the biggest challenges for Android developers is fragmentation.

This is essentially an emulator that you can use to mimic the look and performance of any other Android device, including setting the size of the device. screen and the Android version.
To use the virtual device, you must, go to Tools> Android> AVD Manager.

If the Android version you want to run has not been downloaded yet, the option will be shown next.

Once you have configured some devices to use, you can select one when you run your application and debug in the same way as on a physical device. You can treat this like any other emulator and even access the Play Store to download your apps.

The SDK Manager

If you want to target a specific version of Android, you need to download the platform and the necessary SDK tools. You can do this via the SDK Manager, which you will find by selecting Tools> SDK Manager.
Simply check the box next to what you want to download, then click "OK." Android Studio will alert you of updates to the EDI itself, or any of these elements.

Creating signed APKs

Finally, once you've tested your app, you need to select Build> Generate Signed APK, the file you'll need to download to Google Play and that will contain all the different files, resources, and more..
You must create a Keystore. . This prevents anyone from hacking your Google Play account and then downloading a malicious APK. You will need to keep this file safe because once lost, there will be no way to update your application! Choose "release" as the build type if you want to do something that you can release, then click "finish".
Then there is the Android NDK (Native Development Kit) for development in C / C ++. Of course, you will also need to familiarize yourself with Java and/or Kotlin if you are going to do something useful! You will also need to learn how to use external libraries.
Google also regularly updates Android Studio and brings new features to the platform, which can be difficult to track.
Now that we have done a little tour on android studio, the question that must certainly be asked each of you is: 

How to make money through these android applications?

* Ads through advertising programs

* Direct advertising

* Paid subscriptions

You can provide a free application for users to take advantage of a particular service and offer it to them free of charge, but when a user wants more than this, he or she is paid.

* Contents funded

This method also works with the video platforms that own the app and want, along with the ads that appear on the videos and pages, to show other unique ads to be in the form of a video that is funded in the search results, the interface and the suggestions.

* Pay a nominal price for deleting ads

Some free apps and games that show ads and ad sections allow users to remove these ads by paying a nominal price of up to 0.99 cents to remove.

* Pay for additional benefits

A common method in gaming applications that provide you with the payment of money to buy weapons and tools and what helps you outperform competitors and break records.

* Reservations

Reservations for hotels, restaurants, taxis and travel are all available free of charge, but these applications benefit from every commission that is paid through them. This is when the user pays for booking the service and entering payment information.

* Profit from paid applications

Along with the free  version of your app, you can provide a paid copy and show it to your store with the promotion in the free app.

* Sale app for larger company