Most Asked Android Interview Questions and Answers
What is APK format
The APK file is compressed AndroidManifest.xml file with extension .apk, Which have application code (.dex files), resource files, and other files which is compressed into single .apk file.
How to Translate in android?
The Google translator translates the data of one language into another language by using XMPP to transmit data. You can type the message in English and select the language which is understood by the citizens of the country in order to reach the message to the citizens.
What is an action?
A description of something that an Intent sender desires.
What are the advantages of Android?
The following are the advantages of Android:
* The customer will be benefited from wide range of mobile applications to choose, since the monopoly of wireless carriers like Orange and AT&T will be broken by Google Android.
* Features like weather details, live RSS feeds, opening screen, icon on the opening screen can be customized innovative products like the location -aware services, location of a nearby convenience store etc., are some of the additive facilities in Android.
What is the TTL (Time to Live)? Why is it required?
TTL is a value in data packet of Internet Protocol. It communicates to the network router whether or not the packet should be in the network for too long or discarded. Usually, data packets might not be transmitted to their intended destination within a stipulated period of time. The TTL value is set by a system default value which is an 8 -bit binary digit field in the header of the packet. The purpose of TTL is, it would specify certain time limit in seconds, for transmitting the packet header. When the time is exhausted, the packet would be discarded. Each router receives the subtracts our when the packet is discarded, and when it becomes zero, the router tests the discarded packets and sends a message, Internet Control Protocol message back to the originating host.
How is nine-patch image different from a regular bitmap?
It is a resizeable bitmap resource that can be used for backgrounds or other images on the device. The Nine Patch class permits drawing a bitmap in nine sections. The four corners are unscaled; the four edges a re scaled in one axis, and the middle is scaled in both axes.
Explain IP datagram, Fragmentation and MTU?
IP datagram can be used to describe a portion of P data. Each IP datagram has set of fields arranged in an order. The order is specific which helps to decode and read the stream easily. IP datagram has fields like Version, header length, Type of service, Total length, checksum, flag, protocol, Time to live, Identification, source and destination ip address, padding, options and payload.
MTU:- Maximum Transmission Unit is the size of the largest packet that a communication protocol can pass. The size can be fixed by some standard or decided at the time of connection Fragmentation is a process of breaking the IP packets into smaller pieces. Fragmentation is needed when the datagram is larger than the MTU. Each fragment becomes a datagram in itself and transmitted independently from source. When received by destination they are reassembled.
Explain about the exceptions of Android?
The following are the exceptions that are supported by allow:
- InflateException : When an error conditions are occurred, this exception is thrown
- Surface.Out0fResourceException: When a surface is not created or resized, this exception is thrown
- SurfaceHolder.BadSurface TypeException: This exception is thrown from the lockCanvas() method, when invoked on a Surface whose is SURFACE_TYPE_PUSH_BUFFERS I WindowManager.BadTokenException: This exception is thrown at the time of trying to add view an invalid WindowManager.Layou tParamstoken.