Sei sulla pagina 1di 11

Definition Q=1 What is Mobile computing Ans :- Mobile computing is a generic term used to refer to a varity of device that

allow people to access data and information It is a device that portable and compute on data

Q=2 What is mobile? Ans Mobile is a thing that is capable of moving or of being moved easily from place to place. Our wrist watch is mobile we can carry it easily whenever we take with us.

Q=3 What is computation? How it different from calculation? Ans Computation is the process of calculating in a predefince flow. Any calculations that do in with a flow is known as computation. In the following ways the computation is different from calculation. It follows flow in each and every steps followed in computation It can operate logical as well as conditional operation also.

Q=4 What is application? Ans :Applications is a s/w or piece of code that accepts some inputs from the user prcess on it and generate useful information for the uses. It simplifies user work.

Q=5 What is context in android? Ans The context is the central command center for an android application. All application specific functionality can be accessed through the context.

Q=6 What is activity in android? Ans :- An android application is collection of task each of which called and activity.

Q=7 What is service in android? Ans :Task that does not require uses interaction can be encapsulated in a service. A service is most useful when the operation on length or need to be don regularly.

Q=8 What is activity stack in android? Ans :The android operating system keeps of all activity objects running by placing them on an activity stack. When a new activity stack the activity on the top of the stack if will current foreground activity. The new activity pushed on to the top the stack. When that activity pushes that stack and previous activity in the stack resume. Android applications are responsible for managing their state and their memory resource and data.

Q=11 What is intent? What is use of android.context.intent? How are they used to broadcast and receive event? Ans Android OS uses and asyncrounized message passing mechanism to mathc request with appropriate activity. Each request is package inn intent. In short intent message passing between tow activities. Android.context.intent class includes the android activity to send and receive the actual message. We can declare its object at sender side. For eg Intent I = new intent(sender.this,receiver.class); And at receiver side Intent I = getIntent(); At broadcast we can use i.putExtra(variable name,value);

And at receiver side String n = i.getStringExtra(variable name);

Q=12 Describe low level memory management is one of the core function of Linux kernel? Ans Android relies on Linux version 2.6.x for core system services. Such as security, memory management, process management, network stack and driver model. - Android use software stack and android stack 1) Software stack:Software stack is a type of stack in which different running application are pushed into the stack in LIFO manner. The latest opened application reside at the top of the stack. And each software contains much activity.

2) Activity stack :Activity stack is a stack which contains many activities for different - different application. The latest activity of any application resides at the top of the stack. Low level memory management is done in android by killing any application or by killing any activity from application stack or activity stack respectively. When there is no memory available first the application which are not given much priority is killed for the new activity to be open. But when there is no application which can be killed then some application which can be killed then some processor or activities of that application which are given less priority for specific application will be killed for new activity for the execution.

Q=13 WAP (Wireless Application Protocol) ans Earlier application developed for one device doesnt work on other device without n or change. For saving that problem a protocol known as WAP is introduced which a provides a rule or way to work to make communication same for the entire device. WAP provides a way of doing communication between application developed in different language and application.

Q=14 What is difference between service and activity in android? Ans Activity It requires user interaction Activity must start by the user. Activity can start or stop service Activity has a activity stack Activity can pause or resume Activity has looping When activity stop it can be restart Service It cant require user interaction Service may require start by the user. Service cant start or stop activity. Service hasnt any stack. Service cant p Service cant have looping When service stop then cant restart

Q=15 explain the method of the class android.util.log to support android application? Ans

Log.e Log.w Log.i Log.d Log.v -

Log error Log warning Log information Log debugging message Log verbos message

Log.e():Used to display the error message if occur Log.w():Used to display the wringing message if occurs. Log.i():This method is used to display log information message. Log.d():Its not generate the break poit but give the log debug message. Log.v():Use to display the log verbose message.

Q=16 Explain life cycle of service with suitable diagram and explain about the context. Ans Service is called by the activity during the process. Its not require user intaction accepted in some cases. It is start and stop by the activity and not looping state.

1) Start service :2) OnCreate():When ever this method is called the service is get place into the memory and the new object of the service is created same as constructor and init() 3) On starts():The method is used to allocate the cpu to the service when the on start() is called the service is running. Service is stoped:Here the stop() method is not available in this lifecycle because this is not looping. 4) OnDestroy():This method is called when the service is stop it directly called and the service is being shutdown. Here the resume(), pause() and stop() method are not available so we cannot call start directly we must have to create the new service object.

Start service()

OnCreate()

OnStart()

Service is Running

Service is stopped (no callable) ( OnDestroy()

Service is Shutdown

Q=1 what is the use of <activity> tag and <intent > tag and <intent filter> tag? How many permission android applications has by default? What should be added and where to gain access to building camera. Ans <activity > tag :Declares an activity that implement part of the application visual user interface. All activities must be represented by <activity> elements in the manifest.xml file. Any that are not declare there will not seen by the system and will never be run. <intent-filter> tag It specifies the types of intent that an activity service or broadcast receiver can respond it. An intent filter declares the capabilities of its parent. Component what types of broadcasts a receiver can receive intent of advertised type while filtering out those that are not meaing full for the component. Android has permission by default we have to give permission. Permission 1) Android.permission.RECORD_AUDIO :it allows an application to record audio. 2) Android.permission.SEND_SMS:Allows an application to send sms message. 3) Android.permission.SET_ACTIVITY_WATCHER:Allows an application to watch and control activities are started globally in the system. Only for in debugging not use by third party application. 4) Android.permission.CAMERA:Required to be able to access the caera device.

This will automatically enforce the <user-feature> manifest element for all camera feature. If you dont require all camera features or can properly operate if a camera is not available then you must modify to install on device that dont support all camera feature.

Q=2 in which directory the resources are stored? List different type of resources with required directory file name and xml tags supported by android SDK. Ans All resources must be stored under the /res project directory in specially named subdirectory that must be because.

Resource type string String Array of string Booleans Colors Color state list dimension integer Array of integer Mixed type array Drawables Menus

Required directory /res/values /res/values /res/values /res/values /res/values /res/values

File name Strings.xml Strings.xml Strings.xml Bools.xml Colors.xml Examples include Buttonstate.xml Indicatiors.xml Dimens.xml Integer.xml Integer.xml Array.xml Drawablelosss.xml Example include mainmenu.xml Helpmenu.xml Examples include Data.xml Example include *.mp3,*.mp4,help.txt Samples include Main.xml Help.xml Styles.xml Themes.xml

Xml tag <string> < >,<item> <string-array><item> <bool> <color> <selector><item>

/res/values /res/values /res/values /res/values /res/values /res/values

<dimen> <integer> <integer-array><item> <array><item> < Drawables > <menu>

Xml files Raw files Layouts

/res/values /res/values /res/values

Defined by the developer Defined by the developer Various must be a lay out

Styles and /res/values themes

<style>

Q=3 what is the use of string .xml files. List image features supported by android. Ans String.xml file is used to store the string resources. A string resource provides text for you application with optionaltext styling and formatting. There are three type of resources that can provide your application with string.

String ;Xmlresoure that provide an single string. String array :Xml resource that provides an array of string. Quantity strings:Xml resources that carries different string for puralisation. All strings are capale of applying some styling markup and formatting arguments. Image format supported in android Format Portable n/w graphic(png) Nine put ch strachable image Joing photographic experts group Graphic interchange formate Description Preferred format Preferred format(loss less) Acceptable formate(lossy) Discouraged formate Required extension .png .q.png .jpg , .jpeg .gif

Q=4 write down all dimension unit measurement supported by android sdk. Explain following color formate. Ans Dimension unit measurement supported by android Unit Pixels Inches Point milli meter Millimeter Screen density independent pixels Scale independent pixels Description Actual screen pixel Physical measurement Common font measurement unit Physical measurement Pixels relative to 160 dpi screen Resource required Px In Pt Mm Dp tag Example 20px 1in 14pt 1mm 1dp #RGB #ARGB #RRGGBB #AARRGGBB

Best for scalable font display

Sp

14sp

Color formats #RGB #ARGB #RRGGBB -> 12 bit -> 12 bit with alpha -> 24 bit

#AARRGGBB -> 24 bit with alpha

3 types of color formats are available in android 12bit 24 bit 64 bit

12 bit format is less scale doters 24 bit format color gives better look then 12bit format color. And 64 bit color are the real color which gives high definition quality.

Working with controls 1) Progress bar 2) Seek bar 3) Rating bar 4) Video view 5) Nanometer 6) Image view 7) Toggle button 8) List 9) Spinner 10) Auto complete text view 11) Multiauto complete view 12) Check box 13) Radio button 14) Image button

Q=5 write down in detail about applying style and themes in android application Ans Styles are tagged with the <style> tag and should be stored in the /res/values directory style resources are define in xml and compiled into the application binary at built time. File :- res/values/styles.xml <resources> <style name=arial> <item name=android.padding>3px </item> <item name=android.textresize>8px </item> </style> </resources> Styles can be applied to specific layout controls such as textview and button objects usually use supply the style resources id where you can the controls constructor. For example style would be represent to as R.style.arial

Themes There are much like syles but instead of being applied to one layout element at a time they are all apllied to all element of a given activity. Themes are define in exactly the same way as styles. Themes use the <style> tag and should in the res/values/ directory. The only difference is that instead of applying the named style to layout element use define it as the theme attribute of an activity in the android manifest.xml file.

Q=6 discuss different controls? Ans 1) Image view :It display an arbitrary image the image view class can load images from various sources such as resources or context provides. Take care of computing its measurement from

the image so that it can be used in any layout, message and provide various display option scaling and timing It has same methods , listed below :Int getMaxLength(); Int getMaxWidth(); Matrix getImageMatrix(); Int getBaseline(); 2) Toggle button A toggle button allows the user to change a setting between two state. We can called basic toggle button to your layout with the toggle button objects android 4.0 introduces another kind of toggle button called a switch that provides a slider which you can ad with a switch objects. The toggle button and switch controls are subclasses of compound button and function in the same manner. So you can import their behavior the same way. 3) Auto complete text view An editable textview that shows completion suggestion automatically while the user is typing the list of suggestion is displayed in dropdown list from which the user can choose an item to replace the content of the edit box with. The drop down can be dismissed at any time by pressing the back key or if no item is selected in the dropdown by pressing the enter/dpad center key. The list of suggestion is obtain from data adapter and appear only after a given number of characters defined by the threshold. 4) Multi auto complete text view An editable text view extending the auto complete text view that can show completion of suggestion for the substring of the text. Where the user is typing instead of necessarily the entire things. You must provide a multi auto complete text view to distinguish the various substring. 5) Check box A check box is a specific type of two stage button that can be either checked or unchecked. Check box is used for selecting of choices. 6) Radio button A radio button is a two states button that can be either checked or unchecked when the radio button is unchecked the user can press or click to checked it how ever to a check box the radio button cannot be unchecked by the user once checked. 7) Image button Display button with an image that can be pressed or clicked by the user. By default an image button looks like a regular button with the standard button background that changes color drawing different buttons states. The image on the surface of the button is define either by android:src attribute in xml element or by the setImageResources(int) method. To remove the standard button background image define you own background image or set the background color to be transparent.

Potrebbero piacerti anche