Posts
Showing posts from 2013
AndroidManifest.xml
- Get link
- X
- Other Apps
AndroidManifest.xml file contains information about your packages including components of your application like services, actvities, content providers, broadcast receievers etc. AndroidManifest.xml file looks like this: < manifest xmlns:android = "http://schemas.android.com/apk/res/android" package = "com.example.hello" android:versionCode = "1" android:versionName = "1.0" > < uses-sdk android:minSdkVersion = "8" android:targetSdkVersion = "15" /> < application android:icon = "@drawable/ic_launcher" android:label = "@string/app_name" android:theme = "@style/AppTheme" > < activity ...
Create SdCard and Use of that SdCard in emulator
- Get link
- X
- Other Apps
Goto cmd, then goto android-sdk->tools directory Now use following command: mksdcard <-l label> <size> <file> For example, I want to create SdCard size of 256 MB and save it in E:\Apps\New folder with name sdcardImage.iso, so I write: mksdcard -l sdCard 256M E:\Apps\New folder\sdcardImage.iso Its done. Your sd card image is created. -l : A volume label for the disk image which need to create size : An integer value which specify size of image. It is possibility to specify size in kilobytes or megabytes. Examples: 1024K or 1M file : The file-name/path of the disk image Now lets use of that sdcard image in emulator. Open your AVD manager from eclipse.. Select emulator in which you want to use sdcard image. then edit i n sdcard field, select file and browse the path of your sdcardImage.iso file, you can see the following snap. Now you can us...
Create AVD or emulator from command prompt (cmd) in eclipse
- Get link
- X
- Other Apps
Press Windows+r, then write cmd Goto your sdk->tools directory Write " android list targets " to generate list of system targets of AVD. You see the following output: From the above list, select id that you want to create avd, then write: android create avd -n <name> -t <targetID> [-<option> <value>]... e.g. android create avd -n MyAvd -t 20 --abi armeabi-v7a Then as below image, AVD named MyAvd created in eclipse In command you written, --abi is an option for choose CPU/ABI of device. Like this, if you want to customize the device resolution you have to write an option --skin with value, e.g. --skin WVGA800 For delete avd, write: android delete avd -n <name> For open avd, write: emulator -avd <avd-name>
Pull file and Push file in Sdcard
- Get link
- X
- Other Apps
If you want to push file into sdcard or pull file from sdcard in emulator, first you have checked whether your emulator have sdcard storage or not by checking AVD manager settings. If your emulator has sdcard storage, then goto: Windows-> show View-> Other-> find File Explorer open it. You found many fields like acct, cache, config, data, etc. From that find storage field, and inside storage you found sdcard. click on it then you can see some options to the right side of that page with these icons: From these icons, first is for push file onto device and second is for pull file from device... If you want to add folder in sdcard, then click on 4th icon (+) and for removing click on 3rd icon (-)
Activity Life cycle of Android
- Get link
- X
- Other Apps
Activities in the Android are managed as an Activity stack. When an activity is started, it is placed at the top of the stack and becomes the running activity. The previous activity always remains below in the stack, and will not come to the foreground again until the new activity exists. In the activity life cycle there are following methods: onCreate(): Called when the activity is first created. This is where you should do all of your normal static set up: create views, bind data to lists, etc. This method also provides you with a Bundle containing the activity's previously frozen state, if there was one. Always followed by onStart(). onStart(): Called when the activity is becoming visible to the user. Followed by onResume() if the activity comes to the foreground, or onStop() if it becomes hidden. onResume(): Called when the activity will start interacting with the user. At this point your activity is at the top of the activity stack, with user input going to ...
MVC Architecture in Android
- Get link
- X
- Other Apps
MVC represents Model-View-Controller Model : Manage the behavior and data of the application R esponds to requests for information about its state (usually from the view) Responds to instructions to change state (usually from the controller) Allows the views to produce updated output View : T ypically a user interface element O ne to one correspondence with a display surface Present the model to the user Generates the output representation to the user Controller : Controls both model and view Accepts input from the user and instructs the model and the view to perform actions based on that input Update view when model changes Update model when user manipulate the input
Why XML used in Android
- Get link
- X
- Other Apps
XML stands for Extensible Markup Language. It is a markup language much like HTML but the the difference between XML and HTML is, XML was designed to transport and store data while HTML was designed to display data.. XML is easy to parse and manipulate data pro-grammatically. It is a verbose(expressed in more words) and having a easily human readable format. The reason that XML was chosen for android is because of its familiarity and the number of IDE (Integrated Development Environment like eclipse) tools that natively support it. There are several XML files used: Layout XML: -Used to define the actual UI (user interface) of your application. -It holds all the elements or the tools that you want to use in your application. Manifest XML: -Used to define all the components of your application. -It includes the names of your packages, your classes(Activities), ...
Components of Android
- Get link
- X
- Other Apps
A component is a piece of code that has a well-defined life cycle like Activity, Intent, Service etc. The fundamental components of Android are activities, views, intent, service, content providers, fragments and AndroidManifest.xml. Activity is a class that represents a single screen. It is like a Frame in AWT. View is the UI element such as Button, TextView, Label etc. Anything that you see on display screen is View. Intent is used to invoke the components. It is mainly used to: Start the service Launch an activity Display a webpage Broadcast a message Dial a phone call etc. Service is a background process that runs for a long time. There are two types of services local and remote. Local service is accessed from within the application and remote service is accessed remotely from another application running on the same device. Content Providers are used to share data between the applications. Fragments are part of an activity. An activity can display one or...
Android Versions and Android Architecture
- Get link
- X
- Other Apps
Android version names are very interesting. The names of android versions ranges from A to K currently such as, Aestro, Blender, Cupcake, Donut, Eclair, Froyo, Gingerbread, Honeycomb, Ice Cream Sandwich, Jelly Bean, Kitkat and Lollipop. Android versions having their own API (Application Programming Interface that is how software components interact with each other). Based on API, android versions divided as follows: Android 1.0 (API level 1) Android 1.1 (API level 2) Android 1.5 Cupcake (API level 3) Android 1.6 Donut (API level 4) Android 2.0 Eclair (API level 5) Android 2.0.1 Eclair (API level 6) Android 2.1 Eclair (API level 7) Android 2.2–2.2.3 Froyo (API level 8) Android 2.3–2.3.2 Gingerbread (API level 9) Android 2.3.3–2.3.7 Gingerbread (API level 10) Android 3.0 Honeycomb (API level 11) Android 3.1 Honeycomb (API level 12) Android 3.2 Honeycomb (API level 13) Android 4.0–4.0.2 Ice Cream Sandwich (API level 14) Android 4.0.3–4.0.4 Ice Cr...
Introduction
- Get link
- X
- Other Apps
Hi guys, I am Sagar Tahelyani. Right now I am learning about android technology.. First of all, I want to say something about this technology. In the world of smartphones, there are many more users using smartphones. They do their work like shopping, business, social work, etc. Such people need to be faster way to find something extra ordinary that make their work easy and fast. So they want apps or web based technology.. Smartphones work on mainly Android, iOS and Blackberry. Android is open source technology, so people can download android apps and also can customize it. So they choose android Smartphones.. Android is Linux based operating system for tablets and smartphones. It is developed by Google and OHA (Open Handset Alliance). Java language is mainly used to write the android code even though other languages can be used. What is OHA? It is an organization of 84 companies such as Google, Samsung, AKM, Synaptics, KDDI, Garmin, Teleca, Ebay, Intel etc. Fea...