Android - General

Card Set Information

Author:
javatomas
ID:
232459
Filename:
Android - General
Updated:
2013-09-12 17:54:46
Tags:
general concepts
Folders:

Description:
Android general concepts and terms
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user javatomas on FreezingBlue Flashcards. What would you like to do?


  1. What is the Android Architecture?
    • Linux Kernel 
    • Libraries
    • Android Framework
    • Android Applications
  2. What are the core components under the Android application architecture?
    There are 5 key components under the Android application architecture:

    • - services
    • - intent
    • - resource externalization
    • - notifications
    • - content providers
  3. What composes a typical Android application project?
    A project under Android development, upon compilation, becomes an .apk file. This apk file format is actually made up of the AndroidManifest.xml file, application code, resource files, and other related files.
  4. What is adb?
    • Adb is short for Android Debug Bridge. It allows developers the power to
    • execute remote shell commands. Its basic function is to allow and
    • control communication towards and from the emulator port.
  5. What is fundamental building blocks / components of Android ?
    • Activities
    • Services
    • Broadcast Receivers
    • Content Providers.
  6. What items are important in every Android project?
    These are the essential items that are present each time an Android project is created:- AndroidManifest.xml- build.xml- bin/- src/- res/- assets/
  7. What role does Dalvik play in Android development?
    Dalvik serves as a virtual machine, and it is where every Android application runs. Through Dalvik, a device is able to execute multiple virtual machines efficiently through better memory management.
  8. What is the AndroidManifest.xml?
    This file is essential in every application. It is declared in the root directory and contains information about the application that the Android system must know before the codes can be executed.
  9. What is the proper way of setting up an Android-powered device for app development?
    The following are steps to be followed prior to actual application development in an Android-powered device:

    -Declare your application as “debuggable” in your Android Manifest.

    -Turn on “USB Debugging” on your device.

    -Set up your system to detect your device.
  10. What is Activity?
    It provides the means to render a UI. Every screen in an application is an activity by itself. Though they work together to present an application sequence, each activity is an independent entity.
  11. What are the four essential states of an activity?
    • Active – if the activity is at the foreground
    • Paused – if the activity is at the background and still visible
    • Stopped – if the activity is not visible and therefore is hidden or obscured by another activity
    • Destroyed – when the activity process is killed or completed terminated
  12. Enumerate the three key loops when monitoring an activity
    Entire lifetime – activity happens between onCreate and onDestroy

    Visible lifetime – activity happens between onStart and onStop-

    Foreground lifetime – activity happens between onResume and onPause
  13. When is the onStop() method invoked?
    A call to onStop method happens when an activity is no longer visible to the user, either because another activity has taken over or if in front of that activity.
  14. What are the different states wherein a process is based?
    There are 4 possible states:

    • - foreground activity
    • - visible activity
    • - background activity
    • - empty process
  15. What is a visible activity?
    A visible activity is one that sits behind a foreground dialog. It is actually visible to the user, but not necessarily being in the foreground itself.
  16. When is the best time to kill a foreground activity?
    The foreground activity, being the most important among the other states, is only killed or terminated as a last resort, especially if it is already consuming too much memory. When a memory paging state has been reach by a foreground activity, then it is killed so that the user interface can retain its responsiveness to the user.
  17. What is a Fragment?
    A fragment is a part or portion of an activity. It is modular in a sense that you can move around or combine with other fragments in a single activity. Fragments are also reusable.
  18. Is it possible to use or add a fragment without using a user interface?
    Yes, it is possible to do that, such as when you want to create a background behavior for a particular activity. You can do this by using add(Fragment,string) method to add a fragment from the activity.
  19. What is a Service?
    It is a program that can run in the background for an indefinite period.
  20. what is Broadcast Receiver?
    A component that can receive and respond to any broadcast announcements.
  21. What is Content Provider?
    Content Providers are the only way to share data across Android applications. They store and retrieve data thus making it accessible to all. Android platform provides default implementations of content providers for data types like audio, video, images, contact information etc.
  22. What is Intent?
    Intents are messages that are passed between components. Intent is a bundle of information, a passive data structure that holds an abstract description of the operation to be performed.
  23. Types of intent?
    • Explicit Intent
    • Implicit Intent
  24. What is Explicit intent?
    Explicit intent, you actually specify the activity that is required to respond to the intent.
  25. what is Implicit intent?
    Implicit intent (the main power of the android design), you just declare an intent and leave it to the platform to find an activity that can  respond to the intent.
  26. What is Pending Intent?
    An application can create a Pending Intent, which is nothing but an intent and action to it, so that  it can passed to some other applications which can execute this pending intent as if original application executes it.


    • Pending Intents can be created of three types:
    • getActivity(Context, int, Intent, int) getBroadcast(Context, int, Intent,int)
    • getService(Context, int, Intent, int);
  27. How do you declare 4 components of android in manifest file?
    • <activity> 
    • <service> 
    • <receiver> 
    • <provider>
  28. What are intent filters?
    Intents filter are used to register activity, services, broadcast receiver as being capable of performing an action on a particular kind of action.
  29. What is the function of an intent filter?
    Because every component needs to indicate which intents they can respond to, intent filters are used to filter out intents that these components are willing to receive. One or more intent filters are possible, depending on the services and activities that is going to make use of it.
  30. How many ways data stored in android?
    • Shared preferences
    • Internal storage 
    • External storage 
    • Sqlite database 
    • Network connection
  31. User interface types?
    • Views 
    • Notifications
  32. Types of notification in android?
    • Toast notification 
    • Status bar notification 
    • Dialog notification
  33. How do you find any view element into your program?
    Findviewbyid
  34. What is handler class do in android?
    Handler allows you to send and process message and runnable objects associated with a thread’s message queue.
  35. Describe the APK format.
    The APK file compresses the AndroidManifest.xml file, application code (.dex files), resource files, and other files. A project is compiled into a single .apk file.
  36. What is an action?
    The Intent Sender desires something or doing some task
  37. What is a Sticky Intent?
    A Sticky Intent is a broadcast from sendStickyBroadcast() method such that the intent floats around even after the broadcast, allowing others to collect data from it.
  38. Example for sticky broadcast?
    When you call registerReceiver() for that action -- even with a null BroadcastReceiver -- you get the Intent that was last broadcast for that action. Hence, you can use this to find the state of the battery without necessarily registering for all future state changes in the battery.
  39. What is a resource?
    A user defined JSON, XML, bitmap, or other file, injected into the application build process, which can later be loaded from code.
  40. How will you record a phone call in Android? or How to handle on Audio Stream for a call in Android?
    Permissions.PROCESS_OUTGOING_CALLS: Will Allows an application to monitor, modify, or abort outgoing calls. So through that we can monitor the Phone calls.
  41. What's the difference between class, file and activity in android?
    Class - The Class file is complied from .java file. Android will use this .class file to produce the executable apk.

    File - It is a block of resources, srbitrary information. It can be any file type.

    Activity - An activity is the equivalent of a Frame/Window in GUI toolkits. It is not a file or a file type it is just a class that can be extended in Android for loading UI elements on view.
  42. Does Android support the Bluetooth serial port profile?
    Yes
  43. Can an application be started on powerup?
    Yes
  44. 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.
  45. What is the use of an activityCreator?
    An activityCreator is the first step towards the creation of a new  Android project. It is made up of a shell script that will be used to  create new file system structure necessary for writing codes within the  Android IDE.
  46. What is the importance of XML-based layouts?
    The use of XML-based layouts provides a consistent and somewhat standard means of setting GUI definition format. In common practice, layout details are placed in XML files while other items are placed in source files.
  47. What are containers?
    Containers, as the name itself implies, holds objects and widgets together, depending on which specific items are needed and in what particular arrangement that is wanted. Containers may hold labels, fields, buttons, or even child containers, as examples.
  48. What is Orientation?
    Orientation, which can be set using setOrientation(), dictates if the LinearLayout is represented as a row or as a column. Values are set as either HORIZONTAL or VERTICAL.
  49. What is a Context?
    As the name suggests, its the context of current state of the application/object. It lets newly created objects understand what has been going on. Typically you call it to get information regarding another part of your program (activity, package/application)

    You can get the context by invoking getApplicationContext(), getContext(), getBaseContext() or this (when in the activity class).
  50. Typical uses of context:
    • Creating New objects: Creating new views, adapters, listeners:
    • TextView tv = new TextView(getContext());
    • ListAdapter adapter = new SimpleCursorAdapter(getApplicationContext(), ...);

    • Accessing Standard Common  Resources:
    • Services like LAYOUT_INFLATER_SERVICE, SharedPreferences:

    • context.getSystemService(LAYOUT_INFLATER_SERVICE)
    • getApplicationContext().getSharedPreferences(*name*, *mode*);

    • Accessing Components Implicitly:
    • Regarding content providers, broadcasts, intent

    getApplicationContext().getContentResolver().query(uri, ...);
  51. When to use MyActivity.this (or this) to fill in the context parameter in the following:

    Intent i = new Intent(context, class)
    If you want to create a view that is restricted to that particular Activity you can use Activity.this

    Also if you want to create an AlertDialog in some inner class say AsyncTask, then you have to use Activity.this, because the AlertDialog is to be linked to Activity itself.
  52. When to use getApplicationContext() to fill in the context parameter in the following:
    Intent i = new Intent(context, class)
    If you are creating a method in a global class that extends Application to create a Toast that is used in every class of your Application you can use getApplicationContext() to create it.
  53. What is ANR?
    ANR is short for Application Not Responding. This is actually a dialog that appears to the user whenever an application have been unresponsive for a long period of time.
  54. How can the ANR be prevented?
    One technique that prevents the Android system from concluding a code that has been responsive for a long period of time is to create a child thread. Within the child thread, most of the actual workings of the codes can be placed, so that the main thread runs with minimal periods of unresponsive times.
  55. What are Toasts?
    A toast provides simple feedback about an operation in a small popup. It only fills the amount of space required for the message and the current activity remains visible and interactive. For example, navigating away from an email before you send it triggers a  "Draft saved" toast to let you know that you can continue editing later. Toasts automatically disappear after a timeout.
  56. Which elements can occur only once and must be present?
    Among the different elements, the and elements must be present and can occur only once. The rest are optional, and can occur as many times as needed.
  57. What is AIDL?
    AIDL, or Android Interface Definition Language, handles the interface requirements between a client and a service so both can communicate at the same level through interprocess communication or IPC. This process involves breaking down objects into primitives that Android can understand. This part is required simply because a process cannot access the memory of the other process.
  58. What data types are supported by AIDL?
    AIDL has support for the following data types:

    • -string
    • -charSequence
    • -List
    • -Map
    • -all native Java data types like int,long, char and Boolean
  59. How do you remove icons and widgets from the main screen of the Android device?
    To remove an icon or shortcut, press and hold that icon. You then drag it downwards to the lower part of the screen where a remove button appears.
  60. What is the importance of settings permissions in app development?
    • Permissions allow certain restrictions to be imposed primarily to protect data and code. Without these, codes could be compromised,
    • resulting to defects in functionality.
  61. What is the importance of Android in the mobile market?
    Developers can write and register apps that will specifically run under the Android environment. This means that every mobile device that is Android enabled will be able to support and run these apps. With the growing popularity of Android mobile devices, developers can take advantage of this trend by creating and uploading their apps on the Android Market for distribution to anyone who wants to download it.
  62. What do you think are some disadvantages of Android?
    Given that Android is an open-source platform, and the fact that different Android operating systems have been released on different mobile devices, there’s no clear cut policy to how applications can adapt with various OS versions and upgrades. One app that runs on this particular version of Android OS may or may not run on another version.

    Another disadvantage is that since mobile devices such as phones and tabs come in different sizes and forms, it poses a challenge for developers to create apps that can adjust correctly to the right screen size and other varying features and specs.
  63. Is there a case wherein other qualifiers in multiple resources take precedence over locale?
    Yes, there are actually instances wherein some qualifiers can take precedence over locale. There are two known exceptions, which are the MCC (mobile country code) and MNC (mobile network code) qualifiers.

What would you like to do?

Home > Flashcards > Print Preview