Question:- Android offers several different options for data persistence. Shared Preferences – Store private primitive data in key-value pairs. This sometimes gets limited as it offers only key-value pairs. You cannot save your own java types. Internal Storage – Store private data on the device memory.
Answer:- In Android, an action is a description of something that an intent sender desires. Syntax: < action android:name="string" /> Contained in: < intent-filter> Description: It adds an action to an intent filter. An < intent-filter> element must contain one or more < action> elements. If it doesnt contain any, no Intent objects will get through the filter.
Question:- What is an ANR notification in Android?
Answer:- ANR is a short form for ‘Application Not Responding’. Android systems show this dialog if an application is performing too many tasks on the main thread and has been unresponsive for a long time.
Question:- Define the three key loops when monitoring an activity.
Answer:- • Entire lifetime: An activity that happens between onCreate and onDestroy • Visible lifetime: An activity that happens between onStart and onStop • Foreground lifetime: An activity that happens between onResume and onPause
Question:- How do you find a view element in your program?
Answer:- Findviewbyid is a method that is used to find a view that is identified by the ID attribute from the XML processed inActivity.OnCreate(Bundle).
Question:- Which dialog boxes can you use in your Android application?
Answer:- • AlertDialog: It is an alert dialogue box that supports 0 to 3 buttons and a list of selectable elements. • ProgressDialog: It is an extension to AlertDialog. We can add buttons to it. It shows a progress wheel or a progress bar. • DatePickerDialog: It is used for selecting a date by the user. • TimePickerDialog: It is used for selecting time by the user.
Question:- Name the resource that is a compiled visual resource, which can be used as a background, title, or in other parts of the screen.
Answer:- Drawable is the virtual resource that can be used as a background, title, or in other parts of the screen. It is compiled into an android.graphics.drawable subclass. A drawable resource is a general concept for a graphic that can be drawn. The simplest case is a graphical file (bitmap), which would be represented in Android via a BitmapDrawable class. Drawable is stored as an individual file in one of the res/drawable folders. The ADT project creation wizard creates these folders by default. You would store bitmaps for different resolutions in the -mdpi, -hdpi, -xhdpi, and -xxhdpi subfolders of res/drawable. If these bitmaps are provided in a different folder, the Android system selects the correct one automatically based on the device configuration.
Question:- How can two Android applications share the same Linux user ID and the VM?
Answer:- The applications must sign in with the same certificate in order to share the same Linux user ID and the VM.
Question:- Can you deploy executable JARs on Android? Which packaging is supported by Android?
Answer:- No, the Android platform does not support JAR deployments. Applications are packed into Android Package (.apk) using Android Asset Packaging Tool (AAPT) and then deployed onto the Android platform. Google provides Android Development Tools for Eclipse that can be used to generate the Android Package.
Question:- Is it okay to change the name of an application after its deployment?
Answer:- It is not recommended to change the application name after its deployment because this action may break some functionality. For example, shortcuts will not work if you change the application name.
Question:- How can ANR be prevented?
Answer:- One technique that prevents the Android system from concluding a code that has been unresponsive for a long period of time is to create a child thread. Within the child thread, most of the actual tasks of the codes can be placed so that the main thread runs with minimal periods of unresponsive time.
Question:- How can your application perform actions that are provided by another application, e.g., sending an email?
Answer:- Intents are created to define an action that we want to perform, and they launch the appropriate activity from another application. Syntax: Intent intent = new Intent(Intent.ACTION_SEND);intent.putExtra(Intent.EXTRA_EMAIL, recipientArray); startActivity(intent);
Question:- How will you pass data to sub-activities?
Answer:- We can use bundles to pass data to sub-activities. There are HashMaps that take trivial data types. These bundles transport information from one activity to another.
Question:- How is UX Design different from UI Design?
Answer:- The terms UI and UX designers are usually dumped together. What they really want to know is that you really understand what UX Design is and what it isn’t. A lot of companies have a combined UI/UX Design team. You need to be able to communicate the difference between the two very distinct roles. While the UI team makes sure the product is looking good, the UX team makes sure that the product is working effectively and efficiently. You can also use this opportunity to talk about your previous experience of working with a UI team, the collaboration, and different roles.
Question:- What is meant by design-thinking?
Answer:- This is where the interviewer is trying to understand your approach to design. You should explain your approach to design and take them through your design process. Tell them about your strategy for good design and how you develop your design concepts. Talk about the different stages involved in the process of design thinking. • Empathize – The first step is to empathically understand the problem that needs solving. Here, you would consult experts and observe people’s experiences to fully empathize with them. • Define – In the second step, you combine the information you collected in the first step. Then you analyze it to define the main problem. • Ideate – In this step, you start coming up with ideas while keeping the user’s needs in mind. • Prototype – In the fourth step, the design team comes up with scaled-down versions of the product or the features to see if the solutions work. • Test – In the final step, you test the product and the features, utilizing the best solutions that were identified in the previous stage.
