1:-What is the difference between Android units of measure? px dip dp sp
- px Pixels– corresponds to actual pixels on the screen.
- in Inches – based on the physical size of the screen.1 Inch 2.54 centimeters
- mm Millimeters – based on the physical size of the screen.
- pt Points – 1/72 of an inch based on the physical size of the screen.
- dp or dip -Density-independent Pixels – an abstract unit that is based on the physical density of the screen. These units are relative to a 160 dpi screen, so one dp is one pixel on a 160 dpi screen. The ratio of dp-to-pixel will change with the screen density, but not necessarily in direct proportion. Note: The compiler accepts both “dip” and “dp”, though “dp” is more consistent with “sp”.
- sp– Scale-independent Pixels – this is like the dp unit, but it is also scaled by the user’s font size preference. It is recommended you use this unit when specifying font sizes, so they will be adjusted for both the screen density and user’s preference.
2:-Is there a unique Android device ID?
Yes -import android.provider. Settings.Secure, private String android_id =Secure.getString(getContext().getContentResolve
3:-Is there a way to run Python on Android?
Open source Python library for rapid development of applications that make use of Innovative user interfaces, such as multi-touch apps.
Kivy runs on Linux, Windows, OS X, Android and iOS. You can run the same code on all supported platforms.
4:-How do I get screenWidth and screenHeight in the main Activity?
- If you want the display dimensions in pixels you can use getSize:
- Display display = getWindowManager().getDefaultDisplay();
- Point size = new Point();
- int width size.x;
- int height = size.y:
5:-What are the supported languages of the Android System.
Android supports C,Java and more recently Kotlin as main languages..
6:-What is an .apk file?
The Android Package file(.apk) is a format used to package android applications for distribution and installation.It contains all the source code, resources, assets etc that the Android app needs to run.
7:-What is a compiler?
A Java compiler is a program that takes the text file work of a developer and compiles it into a platform independent Java file.
8:- Is Java compiled or interpreted?
Java implementations typically use a two step compilation process. Java source code is compiled down to bytecode by the Java compiler.The bytecode is executed by a Java Virtual Machine (JVM).
9:-What is a Virtual Machine?
A Java Virtual Machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compliled to Java bytecode..
10:-What is the principle of least privilege?
Each app, by default, has access only to the components that it requires to do its work and no more. The reason for this s that this creates a very secure environment in which an app cannot access parts of the system for which it is not given permission.
11:-What are some of the Android security features for apps?
- By default Android provides several security features for every running app
- Different app user
- Unique Linux User ID
- Unique VM
- Separate process for each app
12:-What is the Android NDK?
The Android Native Development Kit(NDK) is a set of tools that allows you to use C and C++ code with Android and provide libraries that can be used to manage native activities and access physical device components, such as sensors and touch inputs
The NDK is useful if
- Extra performance and optimisations are required
- There is a need to reuse same libraries across ap
- 20 ANDROID DEVELOPMENT INTERVIEW QUESTIONS AND ANSWERS FOR FRESHERS #1
- ANDROID DEVELOPMENT INTERVIEW QUESTIONS AND ANSWERS FOR FRESHERS #2
- ANDROID DEVELOPMENT INTERVIEW QUESTIONS AND ANSWERS FOR FRESHERS #3
- ANDROID DEVELOPMENT INTERVIEW QUESTIONS AND ANSWERS FOR FRESHERS #4
- ANDROID DEVELOPMENT INTERVIEW QUESTIONS AND ANSWERS FOR FRESHERS #5
- ANDROID DEVELOPMENT INTERVIEW QUESTIONS AND ANSWERS FOR FRESHERS #6