Thursday, June 11, 2015

Android Tutorial Lesson 3

What is a Theme ?
A set of properties (text size, background color, and so on)
bundled together to define various default display settings.
Android provides a few standard themes, listed in R.style
(starting with "Theme_").
What is an URIs?
Android uses URI strings both for requesting data (e.g., a
list of contacts) and for requesting actions (e.g., opening a
Web page in a browser). Both are valid URI strings, but
have different values. All requests for data must start with
the string "content://". Action strings are valid URIs that
can be handled appropriately by applications on the device;
for example, a URI starting with "http://" will be handled by
the browser.
Can I write code for Android using C/C++?
Yes, but need to use NDK
Android applications are written using the Java
programming language. Android includes a set of core
libraries that provides most of the functionality available in
the core libraries of the Java programming language.
Every Android application runs in its own process, with its
own instance of the Dalvik virtual machine. Dalvik has been
written so that a device can run multiple VMs efficiently.
The Dalvik VM executes files in the Dalvik Executable (.dex)
format which is optimized for minimal memory footprint.
The VM is register-based,and runs classes compiled by a
Java language compiler that have been transformed into
the .dex format by the included "dx" tool.
Android only supports applications written using the Java
programming language at this time.
What is an action?
A description of something that an Intent sender desires.
What is activity?
A single screen in an application, with supporting Java
code.
What is intent?
A class (Intent) describes what a caller desires to do. The
caller sends this intent to Android's intent resolver, which
finds the most suitable activity for the intent. E.g. opening a
PDF file is an intent, and the Adobe Reader is the suitable
activity for this intent.
How is nine-patch image different from a regular bitmap?
It is a resizable bitmap resource that can be used for
backgrounds or other images on the device. The NinePatch
class permits drawing a bitmap in nine sections.
The four
corners are unscaled; the four edges are scaled in one axis,
and the middle is scaled in both axes.
What languages does Android support for application
development?
Android applications are written using the Java
programming language.
What is a resource?
A user-supplied XML, bitmap, or other file, injected into the
application build process, which can later be loaded from
code.
How will you record a phone call in Android? How to get a
handle on Audio Stream for a call in Android?
Permissions.PROCESS_OUTGOING_CALLS: Allows an
application to monitor, modify, or abort outgoing calls.
What's the difference between file, class and activity in
android?
File - It is a block of arbitrary information, or resource for
storing information. It can be of any type.
Class - Its a compiled form of .Java file . Android finally
used this .class files to produce an executable apk
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.
What is a Sticky Intent?
sendStickyBroadcast() performs a sendBroadcast (Intent)
that is "sticky," i.e. the Intent you are sending stays around
after the broadcast is complete, so that others can quickly
retrieve that data through the return value of
registerReceiver (BroadcastReceiver, IntentFilter).
In all
other ways, this behaves the same as sendBroadcast
(Intent).
One example of a sticky broadcast sent via the operating
system is ACTION_BATTERY_CHANGED. 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.
Does Android support the Bluetooth serial port profile?
Yes.
Can an application be started on powerup?
Yes.
How to Remove Desktop icons and Widgets
A. Press and Hold the icon or widget.
The phone will vibrate
and on the bottom of the phone you will see anoption to
remove. While still holding the icon or widget drag it to the
remove button. Once remove turns red drop the item and it
is gone
Describe a real time scenario where android can be used?
Imagine a situation that you are in a country where no one
understands the language you speak and you can not read
or write. However, you have mobile phone with you.
With a mobile phone with 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.

1 comment:

  1. Do you desire Fame, Riches, Powers, Wealth and do you want all your dreams
    to come true in life within a twinkle of an eye? are you tired of
    oppression and want to leave your current stage in life? Are you an
    upcoming artist, dancer, politician, businessman, student, etc? do you want
    to be a legend or an icon in your time? the Great Illuminati Society offers
    you a lifetime opportunity of making your desires come to accomplishment.
    If you are interested contact us now for more information on how you will
    be fully initiated to the Illuminati and get all you need in life.
    Email: johnrishgroup@gmail.com
    WhatsApp +2347041743262

    ReplyDelete