Featured Post

How to capture long screenshot of apps and website on Android?

Image
Usually, you can take screenshot of only visible area on your display. But what if you could capture screenshot of the app by scrolling up and it will automatically keep capturing the long screenshot until you scroll up. Well, it's easy. In some devices, there is built-in feature called Super Screenshot or Long Screenshot which can capture long screenshot by scrolling up. If your device don't have these features, don't worry, I am going to share best trick to take long screenshot on any Android device. In this tutorial, I am going to share a useful Android app which can be used to take long screenshot of any apps or stitch multiple screenshots into one. The name of the app is LongShot for long screenshot . This is my favorite app to take long screenshot on Android phone. For taking long screenshot, the view must be scrollable. Example, you can take long screenshots on Facebook, Messages, Twitter and any apps which can be scrolled vertically. You can also take the s...

Build Android apps on Android Phone with Java and XML

Build Android Apps On Android Device With AIDE

Yes! You can build awesome Android apps on your Android device using Java and XML. To build the apps, you need to have good knowledge of Java, XML and Android app development. If you are beginner to Android app development, then you can practice building Android apps. You just need is the good knowledge of Java Programming.

For building Android apps on mobile phone, there is a free and popular Android IDE called AIDE. It is a free and offline IDE designed to code on Android Device. AIDE can be used for building Java Console Applications, C & C++ Console Applications, Android Apps with Java and XML, Native Android Apps with Java, C++ and XML and many more. If you start building apps on AIDE, the code and skills of AIDE is not limited within this app. You can use the same concept and knowledge on Android Studio which is the official IDE for Android app development that is available on PC. You can run the projects made with AIDE on Android Studio and vice versa without any problems.

In this tutorial, we are going to use AIDE for building Android apps with Java and XML.


Getting Started

In order to start building Android apps on Android device, first of all, you need to download and install AIDE app. Click here to go to Play Store and install AIDE.
AIDE also have a premium version which include advanced features like Debugger, APP UI Designer, No Ads, Premium features, etc. Click here to download the latest AIDE Premium mod APK for free or you can purchase these features within the AIDE app.


Creating New Android Project

After the app gets installed successfully on your device, open the app. If you are using the app for the first time, you will see this kind of interface. Click on For Experts.
AIDE Code For Experts
Or, if you have opened the app before, you may not see this window. So, if you are in the learning mode, just press button on the title bar. Or, if you are already on the Experts mode, click on Create New Project.
Create New Project In AIDE

After clicking on Create New Project, click on New Android App..
Create New Android App Project In AIDE

You need to enter the app information i.e. App Name and Package Name. App Name is the name of your Android app. Package Name is the unique name for Android app.
Enter App Name And Package Name
After entering the app name and package name, click on CREATE. Your new Android project will be created successfully on AppProjects folder of your sdcard.


Important Files To Work On

While building Android apps on AIDE, you need to manage multiple files at a time. Some of them are explained here.

  1. XML Files

    XML files in Android Apps are used to represent the important information about the app. There will be number of XML files in the Android app. Some of them are layouts, strings, styles, colors, manifest, etc. Layout XML files represent the User Interface of the app. We define buttons, texts, input fields, checkbox, etc. in the Layout XML file. We can also define the position of a widget in the Layout XML file. Strings XML file represent all the words and sentences used in the app. Colors XML represent useful color codes. Style XML represent app theme and styles. Manifest XML file represents all the information of our app at one file. There are more other XML files which couldn't be explained here as the tutorial is going to be very long.
    XML File In AIDE
  2. Java Files

    Java File is used to set the behaviour of your Android app. If you have defined a button in your XML file, you can set an action when the button is clicked. Similar to HTML and CSS is used to design the page look and JavaScript is used set behaviour of your web page, XML is used for designing your app and Java is used to set behaviour of your app and widgets.
    Java File In AIDE
  3. AndroidManifest.xml File

    AndroidManifest.xml file contains the information about your app like app name, package name, version name and version code, app icon, app theme, permissions used by the app, activities, services, broadcasts, fragments, etc. In other words, we can say AndroidManifest is the file which stores all the information of our app in one file.
    Android Manifest XML File In Android App
  4. Build.gradle File

    If your Android app uses external libraries, you need to add them in the build.gradle file in order to use the library functions. There will be two build.gradle files in Android app project i.e. Project Level and App Level Grade Files. Project Level Gradle is located on the root directory of Android App Project and App Level gradle file is located on /app directory of your Android app project. We use this while building advanced apps or if you are advanced app developer. If you are just beginner or started practicing Android app development, you don't need to touch this file.
    Build Dot Gradle File

Building Your First App

After having knowledge of important files while building Android apps, you can start building your first Android app on your phone. So, if you haven't created new project, create it now. After creating a project, open main.xml file to design the User Interface of the app.
For demo, I will add a button and give it text and id values as you can see in the image below.
New XML File In AIDE
You can also use UI Designer to create app UI without coding if you have downloaded premium mod version or purchased UI Designer.
XML APP UI Designer In AIDE

After the UI is ready, now the time comes for main coding i.e. interacting with the XML layout using Java. So, open MainActivity.java file.
New Java File In AIDE

In the Java code, we need to declare the widgets used on the app activity(line 11). After declaring the widget, initialize the widget using the id defined in the main.xml(line 17). After initializing, we will set OnClickListener and display a toast message on clicking a button(line 19 - 28).


Building APK From Code

You can build APK after you have finished coding your app. Your app must not contain any errors to build APK. This IDE provides feature of real-time error checking, so it will display errors as you type. You can check the number of errors on the notification panel. You may also get solution for your the error when you long press on the error message. So, once your code is free from errors, you are ready to build APK. To build APK, press the ▶ button and it will start building APK of your code. It will take some time to build APK depending on the code size and number of external libraries used(if any).

Once APK is build successfully, you can install it on your phone. On the demo, we have built an app with a button.
APK Built With AIDE

While clicking the button, it should display a toast message. As, you can see in the screenshot, it displayed a toast message. Our DemoApp worked successfully.
Click The Button And See A Toast Message

You can start building your own apps like this. If you are beginner in Android app development, you need a lot of resources to learn for building apps. You can find a lot of tutorial videos on YouTube, articles on the internet, sample programs source codes, e-books, online courses, etc. to learn Android app development. Take any one of them and start learning Android development right away.


Using A Library On Your App

If you want to use any external library like play-services, admob, firebase, recycleview or any others, you need to add it in your project. To add it on your app, come back to /AppProjects/{AppName}/app and click on Add to Project....Add A Library To Your App ProjectSelect a library you want to add it on your app. If you can't find a library or want to add specific version of a library, you can do it manually by opening build.gradle file on the same directory and add the library just below dependencies {. It will start downloading the library if you are using that library/ version for the first time, so you need to turn on the internet. After the library is downloaded successfully, you can use it on your code.Build Dot Gradle File

As I have explained above, If you are a beginner or you don't use any external library on your app, you don't need to touch the build.gradle file. So, just understand what is it and when to use this file.


AIDE Helper App

AIDE Helper is a small tool which is very useful while building apps with AIDE. This tool can be used to create new project, add activity and permission to an app. It takes a lot of time to create a layout file with activity file and add it to manifest file and also it is difficult to add permission in manifest file without hint or autocomplete. So, in this case, AIDE Helper is very helpful for doing these actions. Click here to download AIDE Helper app from Play Store. Below is the detailed instruction on how to use AIDE Helper App.

  1. Creating A New Project

    To create a new Android project in AIDE, press the + button on the screen.Home Page Of AIDE Helper App
    After pressing a button, it will show a window to enter App name and Package name for your app. It will also ask you whether you want to add support for AppCompatActivity in your app. If you don't know what it is, keep it unchecked it and click Next.
    Enter The Name and Package Name Of Your App
    In the next page, it will show a window to enter layout and activity name. Enter the names and click Create.
    Enter The Name For Layout And Activity For Your New App
    Following all these steps, it will successfully create a new blank Android project.
    New App Project Successfully Created In AIDE
    You can open the new project with AIDE and edit the codes.
  2. Adding New Layout and Activity

    If you want to add a new layout and activity on your app, it will consume a lot of time to do it manually. So, AIDE Helper becomes very useful for doing this as can do this in very less time.
    To add a new Activity on your app, follow these steps.
    1. Open AIDE Helper app.
    2. Select the app on which you want to add new layout and activity.
    3. Click on Add Activity.
      Add New Activity Or Permission To The App
    4. Enter the name for the new layout and activity. Keep the Checkbox checked to add the info of new Activity on AndroidManifest.xml file.
      Enter The Name Of New Layout And Activity
    Following these steps will create a new layout and activity on your app which can be edited using AIDE IDE.
  3. Adding Permission

    If your app uses internet connection to work or needs to read/ write file from sdcard, you need add internet and storage permission respectively for your app in AndroidManifest.xml file, then only your app will be able to connect to the internet or write/ read files from the storage. If your app needs to do any task that require permission but you don't define any permission on manifest file, then your app will not work as expected or crash on start. So, it is compulsory to add permission to the app. Doing this by editing the manifest file is difficult as the AIDE app doesn't provide any hint or autocompletion to add new permission or activity. So, in this case, AIDE Helper can be used to add new permission easily. To add permission on your app, follow these steps.
    1. Open AIDE Helper app.
    2. Select the app on which you want to add permission.
    3. Click on Add Permission.
      Add New Activity Or Permission To The App
    4. It will show you ADD PERMISSION button and all permissions previously added(if any). Click on ADD PERMISSION button and choose the permission you want to add on your app.
      Select The Permission To Add On The App
    After providing the app all the permissions it requires, the app will work properly.

Android App Development as Professional App Developer

If you have a good knowledge, skills and experience of Android app development and you have a good number of users on your app, then you can get a good income by monetizing your app. The monetization methods includes in-app purchase, paid app, in-app advertisements. You can also work as an Android developer on mobile app development companies with a good salary. In addition, you can also work as a freelancer and build apps for your clients as per their requirement and generate a good income.


Conclusion

If you want to build your career in the field of Android app development and want to start it on your Android phone, AIDE is the right and only the app which will provide you the friendly and suitable environment for building android apps on your Android phone. No matter whether you are beginner or professional android app developer, you can use AIDE for practicing or building professional apps. So, download the AIDE app right now and start building Android apps on your phone.

Comments

Popular posts from this blog

How to capture long screenshot of apps and website on Android?

How to capture long screenshot of apps and website on Android?

How to run VB.NET programs offline on your Android?