Search This Blog

Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

18 February, 2012

Android Breathes New Life Into "Made In China" ..

mic
Editor’s noteBenjamin Dolgin-Gardner is the founder of szceit.com in Shenzhen, China.
How do you end up with millions of new sales overnight with low development and implementation costs? In the case of Chinese electronics companies Rock Chips and Box Chips the answer has been simple – hitch a ride on Android.
China’s economy is booming thanks to low cost assembly, the country’s key advantage when competing on the global playing field. Manufacturers deliver low cost laborers who are able to follow processes and procedures to a reasonable degree of accuracy at very reasonable rates, and thus gain an edge over Western manufacturers.
In my years in China I’ve seen technologies come and go, but none have excited these manufacturers like the prospect of Android. It’s a solid, “open” operating system that lets them do a number of interesting things without many risks.
The West in turn has provided the “design” element of the process, enabling the overall product to be reliable and aesthetically pleasing. Chinese companies aren’t yet geared to competing in this arena. In order to undertake the gamble of developing an OS that gave them an exclusively Chinese platform (a la Microsoft or Apple for the US), Chinese firms would need an extensive process of re-education.
Then there’s the problem of IP. While Western competitors have strong rules in place (and real penalties) for infringement of their IP – Chinese companies face a business environment where their development costs would be lost overnight as soon as another company could clone their product. Success, then, often led to copying.
This of course doesn’t mean that Western companies in China get an easy ride. In fact Apple, a strong defender of its IP everywhere, has been unable to prevent clones and copies from flooding the market, all guaranteed to look similar to the original, though never approaching the same quality or usability.
So it becomes clear why Android is so appealing to the Chinese marketplace: it enables companies to move into the usability “design” space that they’ve previously been unable to access. Here you have a strong, internationally accepted operating system, with an open license to be copied (at no cost) and installed and used on any device you like. In fact the OS developer positively encourages you to do so.
It’s a stable platform with the weight of Google behind it and the thousands of talented computer science graduates in the country can play with it, adapt it and improve it – without having to design a system from the ground up. The market entry costs are limited to wages, so there’s a huge incentive for Chinese firms to get involved.
This means that the traditional IC players now face stiff competition from China, with Rock Chips and Box Chips already selling millions and another local firm, Actions, about to enter the fray. These companies can focus on the Android platform and develop newer and faster processors to support the latest hardware and Android updates. As the OS gains further market traction and the Chinese companies find a growing talent pool of skilled engineers to work with it, this competition is going to get stronger.
Niche developers in China will benefit, too. They’ll have local chip sets for reasonable costs, and a versatile workforce to draw on – moving more in the long-term to a quality model, based on customization opportunities and away from a volume pricing model.
Currently there’s still a defined lag from Chinese firms in the commodity technology market, and when Android first launched this lag was a year or more over developed nation equivalents, but today this is down to 3 or 4 months. Soon Chinese companies, playing to their own strengths in the supply chain, will close this gap to make it negligible or even begin to take a leading role.
For Google this is a big win too. The Chinese consumer market is a huge one and the trade-off for using a free Google service is that the user agrees to share data with Google. Of course Google’s ability to aggregate massive amounts of personal data directly relates to the quality of their products and services, but it matters more how they can exploit the information they gain from their use.
China has only 40 million credit card users (based on slightly outdated figures released in 2010) and over 500 million computer users. This means that if the Android system were to appear on just 10% of all devices in the country, Google could conceivably, but probably won’t be able to access, more information on Chinese consumers than the country’s credit agencies! The rub is that the Android these firms are running is not “official” and as such rarely communicates with Google’s servers.
As the price of Android tablets and phones continues to decrease, the percentage of users is likely to grow exponentially.
This model of quality firmware partnered with lower-cost, mid-quality hardware, enables companies like Rock Chips and Box Chips to make millions of unit sales, and to win over not only the traditional “value” customer, but also the more discerning customers, domestically and overseas. It also encourages other IC manufacturers to come to the party and many will soon be joining them in an Android led technology revolution.

23 September, 2011

Android Interview Question and answers


Introduction Android:
Android is an operating system for mobile devices that includes middleware and key applications, and uses a modified version of the Linux kernel. It was initially developed by Android Inc..It allows developers to write managed code in the Java language, controlling the device via Google-developed Java libraries…..
The Android SDK includes a comprehensive set of development tools . These include a debugger, libraries, a handset emulator (based on QEMU), documentation, sample code, and tutorials. Currently supported development platforms include x86-architecture computers running Linux (any modern desktop Linux distribution), Mac OS X 10.4.8 or later, Windows XP or Vista.
Android does not use established Java standards, i.e. Java SE and ME. This prevents compatibility among Java applications written for those platforms and those for the Android platform. Android only reuses the Java language syntax, but does not provide the full-class libraries and APIs bundled with Java SE or ME
What is android?
Android is a stack of software for mobile devices which has Operating System, middleware and some key applications. The application executes within its own process and its own instance of Dalvik Virtual Machine. Many Virtual Machines run efficiently by a DVM device. DVM executes Java language?s byte code which later transforms into .dex format files.
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 AT&T and Orange 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.
Components can be reused and replaced by the application framework.
*Optimized DVM for mobile devices
*SQLite enables to store the data in a structured manner.
*Supports GSM telephone and Bluetooth, WiFi, 3G and EDGE technologies
*The development is a combination of a device emulator, debugging tools, memory profiling and plug-in for Eclipse IDE.
Features of Android
 Application framework enabling reuse and replacement of components
 Dalvik virtual machine optimized for mobile devices
 Integrated browser based on the open source WebKit engine
 Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional)
 SQLite for structured data storage
 Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)
 GSM Telephony (hardware dependent)
 Bluetooth, EDGE, 3G, and WiFi (hardware dependent)
 Camera, GPS, compass, and accelerometer (hardware dependent)
 Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE.
Explain about the exceptions of Android?
The following are the exceptions that are supported by Android
* InflateException : When an error conditions are occurred, this exception is thrown
* Surface.OutOfResourceException: When a surface is not created or resized, this exception is thrown
* SurfaceHolder.BadSurfaceTypeException: This exception is thrown from the lockCanvas() method, when invoked on a Surface whose is SURFACE_TYPE_PUSH_BUFFERS
* WindowManager.BadTokenException: This exception is thrown at the time of trying to add view an invalid WindowManager.LayoutParamstoken.
Describe the APK format.
The APK file is compressed the AndroidManifest.xml file, application code (.dex files), resource files, and other files. A project is compiled into a single .apk file.
What is .apk extension? 
The extension for an Android package file, which typically contains all of the files related to a single Android application. The file itself is a compressed collection of an AndroidManifest.xml file, application code (.dex files), resource files, and other files. A project is compiled into a single .apk file.
What is .dex extension 
Android programs are compiled into .dex (Dalvik Executable) files, which are in turn zipped into a single .apk file on the device. .dex files can be created by automatically translating compiled applications written in the Java programming language
What is an adb ?
Android Debug Bridge, a command-line debugging application shipped with the SDK. It provides tools to browse the device, copy tools on the device, and forward ports for debugging.
What is an Application ?
A collection of one or more activities, services, listeners, and intent receivers. An application has a single manifest, and is compiled into a single .apk file on the device.
What is a Content Provider ?
A class built on ContentProvider that handles content query strings of a specific format to return data in a specific format. See Reading and writing data to a content provider for information on using content providers.
What is a Dalvik ?
The name of Android’s virtual machine. The Dalvik VM is an interpreter-only virtual machine that executes files in the Dalvik Executable (.dex) format, a format that is optimized for efficient storage and memory-mappable execution. The virtual machine is register-based, and it can run classes compiled by a Java language compiler that have been transformed into its native format using the included “dx” tool. The VM runs on top of Posix-compliant operating systems, which it relies on for underlying functionality (such as threading and low level memory management). The Dalvik core class library is intended to provide a familiar development base for those used to programming with Java Standard Edition, but it is geared specifically to the needs of a small mobile device.
What is an DDMS 
Dalvik Debug Monitor Service, a GUI debugging application shipped with the SDK. It provides screen capture, log dump, and process examination capabilities.
What is Drawable? 
A compiled visual resource that can be used as a background, title, or other part of the screen. It is compiled into an android.graphics.drawable subclass.
What is an Intent?
A class (Intent) that contains several fields describing what a caller would like to do. The caller sends this intent to Android’s intent resolver, which looks through the intent filters of all applications to find the activity most suited to handle this intent. Intent fields include the desired action, a category, a data string, the MIME type of the data, a handling class, and other restrictions.
What is an Intent Filter ?
Activities and intent receivers include one or more filters in their manifest to describe what kinds of intents or messages they can handle or want to receive. An intent filter lists a set of requirements, such as data type, action requested, and URI format, that the Intent or message must fulfill. For Activities, Android searches for the Activity with the most closely matching valid match between the Intent and the activity filter. For messages, Android will forward a message to all receivers with matching intent filters.
What is an Intent Receiver? 
An application class that listens for messages broadcast by calling Context.broadcastIntent
What is a Layout resource?
An XML file that describes the layout of an Activity screen.
What is a Manifest ?
An XML file associated with each Application that describes the various activies, intent filters, services, and other items that it exposes.
What is a Resource 
A user-supplied XML, bitmap, or other file, entered into an application build process, which can later be loaded from code. Android can accept resources of many types; see Resources for a full description. Application-defined resources should be stored in the res/ subfolders.
What is a Service ?
A class that runs in the background to perform various persistent actions, such as playing music or monitoring network activity.
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.
How to select more than one option from list in android xml file? 
Give an example.
Specify android id, layout height and width as depicted in the following example.
What languages does Android support for application development?
Android applications are written using the Java programming language.
Describe Android Application Architecture.
Android Application Architecture has the following components:
• Services – like Network Operation
• Intent – To perform inter-communication between activities or services
• Resource Externalization – such as strings and graphics
• Notification signaling users – light, sound, icon, notification, dialog etc.
• Content Providers – They share data between applications
Common Tricky questions
 Remember that the GUI layer doesn’t request data directly from the web; data is always loaded from a local database.
 The service layer periodically updates the local database.
 What is the risk in blocking the Main thread when performing a lengthy operation such as web access or heavy computation? Application_Not_Responding exception will be thrown which will crash and restart the application.
 Why is List View not recommended to have active components? Clicking on the active text box will pop up the software keyboard but this will resize the list, removing focus from the clicked element.

13 September, 2011

Google announces next Android OS, Jelly Bean


Google announces next Android OS, Jelly Bean






Close on the heels of GoogleExecutive Chairman Eric Schmidt announcing the arrival of the upcoming version of AndroidOS termed Ice Cream Sandwich in October or November, speculations have started on the next version of Android. 

According to a report citing trusted sources in 'This is My Next', Jelly Bean is the working name for next incarnation of Android. 

The name follows Google's tradition of calling its Android operating systems after sweets in alphabetical order. Earlier versions of Android follow a typical order -- Cupcake 1.5, Donut 1.6, Eclair 2.1, Froyo 2.2, Gingerbread 2.3,Honeycomb 3.0 and the upcoming Ice Cream Sandwich. 

The report quotes industry source saying, that the "game-changing stuff" that had originally been scheduled for Ice Cream Sandwich will be being pushed to Jelly Bean. Jelly Bean could be dubbed Android 4.5 or Android 5.0, depending on the amount of features packed, says the report.

Ice Cream Sandwich is expected to be a universal operating system that will work on phones, tablets, TVs, and even phones that transform into laptops. Among other things, the OS is likely to bring an updated app launcher, holographic user interface, interactive and new homescreen widgets and a multi-tasking panel. 

----------------------------------------------------------------------------------

09 September, 2011

R.layout.main cannot be resolved Problem


Problem :- R.layout.main cannot be resolved 



Solution:-

-------------------------------------------------------------------------------------------------------------

Meetme@