{"id":435980,"date":"2018-05-18T18:52:08","date_gmt":"2018-05-18T18:52:08","guid":{"rendered":"https:\/\/essaypaper.org\/tutorial-writing-your-first-android-app\/"},"modified":"2018-10-24T08:55:26","modified_gmt":"2018-10-24T08:55:26","slug":"tutorial-writing-your-first-android-app","status":"publish","type":"post","link":"https:\/\/www.benedictsol.com\/blogs\/tutorial-writing-your-first-android-app\/","title":{"rendered":"Tutorial writing your first android app"},"content":{"rendered":"<div>\n<div align=\"center\">\n\t\t\t <img decoding=\"async\" src=\"http:\/\/ihelptostudy.com\/other\/custom_top_article.gif\" alt=\"Order custom writing\"\/>\n\t\t<\/div>\n<div class=\"introimage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ihelptostudy.com\/wp-content\/uploads\/tutorial-writing-your-first-android-app_3.png\" width=\"600\" height=\"455\" alt=\"Tutorial writing your first android app tutorial step by step to\" title=\"Tutorial writing your first android app tutorial step by step to\"\/><\/div>\n<p>Let\u2019s start actual programming with Android Framework. Before you begin writing the first example using Android SDK, you need to make certain you have set-your Android development atmosphere correctly as described in Android \u2013 Atmosphere Set-up tutorial. I additionally assume that you\u2019ve a tiny bit working understanding with Eclipse IDE.<\/p>\n<p>So let\u2019s go to write an easy Android Application that will print \u201cHello World!\u201d.<\/p>\n<h2>Create Android Application<\/h2>\n<p>The initial step is to produce a simple Android Application using Eclipse IDE. Stick to the option <b>File \u2013 New \u2013 Project<\/b> and lastly select <b>Android New Application<\/b> wizard in the wizard list. Now name the application as <b>HelloWorld<\/b> while using wizard window the following:<\/p>\n<p>Next, do as instructed provided and other records as default up until the final step. When your project is produced effectively, you\u2019ll have following project screen \u2212<\/p>\n<h2>Anatomy of Android Application<\/h2>\n<p>Prior to running your application, you should know of the couple of directories and files within the Android project \u2212<\/p>\n<p>Folder, File  Description<\/p>\n<p>This offers the <b>.java<\/b> source files for the project. Automatically, it offers a <i>MainActivity.java<\/i> source file getting a task class that runs whenever your application is launched while using application icon.<\/p>\n<p>This offers the <b>.R<\/b> file, a compiler-generated file that references all of the sources present in any project. You shouldn\u2019t modify this file.<\/p>\n<div align=\"center\"> <img decoding=\"async\" src=\"http:\/\/ihelptostudy.com\/other\/essay-468.gif\" alt=\"Low cost essay writing\"\/><\/div>\n<p>This folder offers the Android package files <b>.apk<\/b> built through the ADT throughout the build process and anything else required to run an Android application.<\/p>\n<p>This can be a directory for drawable objects that are equipped for high-density screens.<\/p>\n<p>This is actually the manifest file which describes the essential characteristics from the application and defines all of its components.<!--image2begin-->\n<\/p>\n<div class=\"middleimage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ihelptostudy.com\/wp-content\/uploads\/tutorial-writing-your-first-android-app_2.png\" width=\"600\" height=\"347\" alt=\"Tutorial writing your first android app studio     &#10;   There are so many\" title=\"Tutorial writing your first android app studio     &#10;   There are so many\"\/><\/div>\n<p>Following section can give a short overview couple of from the important application files.<\/p>\n<h2>The Primary Activity File<\/h2>\n<p>The primary activity code is really a Java file <b>MainActivity.java<\/b>. This is actually the actual application file which ultimately will get transformed into a Dalvik executable and runs the application. Following may be the default code generated through the application wizard for <i>Hello World!<\/i> application \u2212<\/p>\n<p>Here, <i>R.layout.activity_primary<\/i> refers back to the <i>activity_primary.xml<\/i> file found in the <i>res\/layout<\/i> folder. The <i>onCreate()<\/i> method is among many techniques that are figured when a task is loaded.<\/p>\n<h2>The Manifest File<\/h2>\n<p>Whatever component you develop as part of the application, you have to declare its components inside a <i>manifest.xml<\/i> which resides at the bottom from the application project directory. This file works being an interface between Android Operating System as well as your application, so if you don\u2019t declare your component within this file, then it won\u2019t be considered through the OS. For instance, a default manifest file may be like as following file \u2212<\/p>\n<p>Here application. \/application tags enclosed the constituents associated with the applying. Attribute <i>android:icon<\/i> points towards the application icon available under <i>res\/drawable-hdpi<\/i>. The applying uses the look named ic_launcher.png found in the drawable folders<\/p>\n<p>The activity tag can be used to specify a task and <i>android:name<\/i> attribute specifies the properly accredited class name from the <i>Activity<\/i> subclass and also the <i>android:label<\/i> attributes specifies a string for the label for that activity.<!--image3begin-->\n<\/p>\n<div class=\"3rdimage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ihelptostudy.com\/wp-content\/uploads\/tutorial-writing-your-first-android-app_1.png\" width=\"583\" height=\"600\" alt=\"Tutorial writing your first android app Following is the default\" title=\"Tutorial writing your first android app Following is the default\"\/><\/div>\n<p><!--image3end--> You are able to specify multiple activities using activity tags.<\/p>\n<p>The <b>action<\/b> for that intent filter is known as <i>android.intent.action.Primary<\/i> to point this activity can serve as the access point for that application. The <b>category<\/b> for that intent-filter is known as <i>android.intent.category.LAUNCHER<\/i> to point the application could be launched in the device\u2019s launcher icon.<\/p>\n<p>The <i>@string<\/i> refers back to the <i>strings.xml<\/i> file described below. Hence, <i>@string\/application_name<\/i> refers back to the <i>application_name<\/i> string defined within the strings.xml file, that is \u201cHelloWorld\u201d. Similar way, other strings get populated within the application.<\/p>\n<p>Following may be the listing of tags which you\u2019ll use within your manifest file to specify different Android application components:<\/p>\n<p>activityelements for activities<\/p>\n<p>service elements for services<\/p>\n<p>receiver elements for broadcast receivers<\/p>\n<p>provider elements for content providers<\/p>\n<h2>The Strings File<\/h2>\n<p>The <b>strings.xml<\/b> file is situated in the <i>res\/values<\/i> folder also it contains all of the text that the application uses. For instance, what they are called of buttons, labels, default text, and other alike kinds of strings get into this file. This file accounts for their text message. For instance, a default strings file may be like as following file \u2212<\/p>\n<h2>The R File<\/h2>\n<p>The <b>gen\/com.example.helloworld\/R.java<\/b> file may be the glue between your activity Java files like <i>MainActivity.java<\/i> and also the sources like <i>strings.xml<\/i>. It\u2019s an instantly generated file and you ought to not customize the content from the R.java file. Following is really a sample of R.java file \u2212<\/p>\n<h2>Design File<\/h2>\n<p>The <b>activity_primary.xml<\/b> is really a layout file obtainable in <i>res\/layout<\/i> directory, that\u2019s referenced from your application when building its interface. You\u2019ll modify this file often to alter design of the application. For the \u201cHello World!\u201d application, this file may have following content associated with default layout \u2212<\/p>\n<p>It is really an illustration of simple <i>RelativeLayout<\/i> which we\u2019ll study inside a separate chapter. The <i>TextView<\/i> is definitely an Android control accustomed to build the Graphical user interface also it have various attributes like <i>android:layout_width<\/i>. <i>android:layout_height<\/i> etc which are used to create its height and width etc. The <i>@string<\/i> refers back to the strings.xml file found in the res\/values folder. Hence, @string\/hello_world refers back to the hello string defined within the strings.xml file, that is \u201cHello World!\u201d.<\/p>\n<h2>Running the applying<\/h2>\n<p>Let us attempt to run our <b>Hello World!<\/b> application we simply produced. I suppose you\u2019d produced your <b>AVD<\/b> while doing atmosphere set-up. To operate the application from Eclipse, open your project\u2019s activity files and click on Run  icon in the tool bar. Eclipse installs the application in your AVD and starts it and when things are fine together with your set-up and application, it\u2019ll display following Emulator window \u2212<\/p>\n<p>Congratulations. you\u2019ve developed the first Android Application and today keep following remaining tutorial step-by-step to become great Android Developer. All the most effective.<\/p>\n<h2>Create Android Application on Android studio<\/h2>\n<p>There are plenty of tools are for sale to develop android applications. according to Google official android development, they\u2019ve launched android studio as official Android IDE<\/p>\n<p><center><iframe loading=\"lazy\" width=\"420\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/taSwS5rhtmc\" frameborder=\"0\" allowfullscreen=\"\"><\/iframe><br \/><\/center><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Let\u2019s start actual programming with Android Framework. Before you begin writing the first example using Android SDK, you need to make certain you have set-your Android development atmosphere correctly as described in Android \u2013 Atmosphere Set-up tutorial. I additionally assume <a href=\"https:\/\/www.benedictsol.com\/blogs\/tutorial-writing-your-first-android-app\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,46],"tags":[],"class_list":["post-435980","post","type-post","status-publish","format-standard","hentry","category-essay-paper-writing","category-writing"],"_links":{"self":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/435980","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/comments?post=435980"}],"version-history":[{"count":0,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/435980\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/media?parent=435980"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/categories?post=435980"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/tags?post=435980"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}