Archive for June 2014
Generate signed APK for Android Application
Generate signed APK for Android Application
After you finished your Android application development, you must generate signed APK for that Application because only signed APK will be accepted by Google Play store.So before uploading APK into Google play you have to sign it.
Android APK Sign Process:
Step 1:- In Eclipse IDE, right click on your project in Package Explorer. -> Select Android Tools -> Select Export Signed Application Package
Step 2:- Then Project Checks Window will be open ->Click on Browse -> Make sure the correct project is selected -> and click Next
Step 3:-Keystore Selection window will open ->there we have 2 radion buttons one is Use existing keystore and another one is Create new keystore -> If you are already created keystore then browse and select it or else you can create one keystore for that app.(Note:-For each and every Android app have one unique keystore.) ->Select the keystore file location, and enter password. Then click Next.
Note:-If you are not created Keystore select create new keystore radio button and browse where you need to save that keystore then enter password and confirm password,then click Next .
Step 4:-Key Creation window will open -> Enter Alias, password, confirm, number of validity years, and at least one Certificate issuer field. -> then click Next
Step 5:-Destination window will open -> Select destination of the APK file(Storage Location of Signed APK file). and click Finish.
Android FAQs
ANDROID FAQs
INTRODUCTION TO ANDROID:
Android is a software stack for mobile devices that includes an operating system, middle ware and key application. Android is a software platform and operating system for mobile devices based on the Linux operating system and developed by Google and the Open Handset Alliance.
The unveiling of the Android platform on 5 November 2007 was announced with the founding of the Open Handset Alliance, a consortium of 34 hardware, software and telecom companies devoted open standard for mobile devices. When released in 2008, most of the Android platform will be made available under the Apache free-software and Open-source-license.
THE BIRTH OF THE ANDROID:
Google Acquire Android Inc.
In July 2005, Google acquire Android Inc, a small company based in PolaAlto, CA. Android co-founder who went to work with Google included Andy Rubin(co-founder of Danger), Rich Miner(co-founder of Wildlife communication, Inc), Nick Seares(once VP @ T-Mobile), and Chris White(one of the first engineer at WebTV). At the time, little was about the function of Android Inc. other than they made software for mobile-phones.
OPEN HANDSET ALLIANCE FOUNDED:
On 5 November 2007, the open Handset Alliance, a consortium of several companies which included Google, HTC, Intel, Qualcomm, T-Mobile, Sprint Nextel and NVIDIA, was unveiled with the goal to develop open standards for mobile devices. Along with the OHA also unveiled their first product, Android, an open source mobile devices platform based on the Linux operating system.
1.What are the prerequisites to learn the Android?
Ans:-Core Java
OOPS Concepts, Exception Handling, Multithreading, IOStreams, Collection Frame Work….
2.What is Android?
Ans:-android is a mobile application development platform, that consist mobile operating system, middle ware Services and android key applications.
What is platform?
Platform is an environment using which we can able to run an application…
3.What is mobile Operating System?
Ans: - A mobile operating system (mobile OS) is the operating system that controls a smart phone, tablet, PDA, or other mobile device.
- It will occupy 20MB-40MB
- If u wants to run an application in hardware we need one OS.
- Modern mobile operating systems combine the features of a personal computer operating system with touch screen, cellular, Bluetooth, Wi-Fi, GPS mobile navigation, camera, video camera, speech recognition, voice recorder, music player, near field communication, personal digital assistant (PDA), and other features.
Different Mobile Operating Systems:
Android from Google.
Symbian OS from Nokia.
Black Berry from RIM
IOS from Apple.
Windows Phone from Microsoft.
Symbian OS from Nokia.
Black Berry from RIM
IOS from Apple.
Windows Phone from Microsoft.
Fire OS from Amazon
Tizan OS
Firefox OS
4.What are the advantages and Features of Android?
Ans: - 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.
The following are the 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 Web Kit 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 Wi-Fi (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 plug-in for the Eclipse IDE.
5.Describe Android Application Architecture.
Ans:- 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
6. Describe the APK format.
Ans:- 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.
7. 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.
8. What is .dex extension ?
Ans:- 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
9. What is an ADB ?
Ans:- 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.
10. What is an Application ?
Ans:- 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.
11. What is a Content Provider ?
Ans:- 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.
12. What is a Dalvik ?
Ans:- 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.
13. What is an DDMS?
Ans:- Dalvik Debug Monitor Service, a GUI debugging application shipped with the SDK. It provides screen capture, log dump, and process examination capabilities.
14. What is Drawable?
Ans:- 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.
15. What is an Intent?
Ans:-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.
16. What is an Intent Filter ?
Ans:-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.
17. What is an Intent Receiver?
Ans:- An application class that listens for messages broadcast by calling Context.broadcastIntent
18. What is a Layout resource?
Ans:- An XML file that describes the layout of an Activity screen.
19. What is a Manifest ?
Ans:- An XML file associated with each Application that describes the various activies, intent filters, services, and other items that it exposes.
20. What is a Resource ?
Ans:- 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.
21. What is a Service ?
Ans:- A class that runs in the background to perform various persistent actions, such as playing music or monitoring network activity.
22. What is a Theme ?
Ans:-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_”).
23. What is an URIs?
Ans:-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.
24. Can I write code for Android using C/C++?
Ans:-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.
25. What is an action?
Ans:-A description of something that an Intent sender desires.
26. What is activity?
Ans:-A single screen in an application, with supporting Java code.
27. What is intent?
Ans:-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.
28. How is nine-patch image different from a regular bitmap?
Ans:-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.
29.What languages does Android support for application development?
Ans:-Android applications are written using the Java programming language.
30. What is a resource?
Ans:-A user-supplied XML, bitmap, or other file, injected into the application build process, which can later be loaded from code.
31. How will you record a phone call in Android? How to get a handle on Audio Stream for a call in Android?
Ans:-Permissions.PROCESS_OUTGOING_CALLS: Allows an application to monitor, modify, or abort outgoing calls.
32.What’s the difference between file, class and activity in android?
Ans:-File – It is a block of arbitrary information, or resource for storing information. It can be of any type.
Class – It’s 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.
33. What is a Sticky Intent?
Ans:-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.
34.Does Android support the Bluetooth serial port profile?
Ans:-Yes.
35. Can an application be started on powerup?
Ans:-Yes.
36. How to Remove Desktop icons and Widgets?
Ans:-A. Press and Hold the icon or widget. The phone will vibrate and on the bottom of the phone you will see an option 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
37.Describe a real time scenario where android can be used?
Ans:-Imagine a situation that you are in a country where no one understands the language you speak and you cannot 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.
38.How to select more than one option from list in android xml file?
Ans:-Give an example.
Specify android id, layout height and width as depicted in the following example.
39. Explain about the exceptions of Android?
Ans:-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.
40. What are the steps in creating a bounded service through AIDL?
Ans:-1. create the .aidl file, which defines the programming interface
2. implement the interface, which involves extending the inner abstract Stub class as well as implanting its methods.
3. expose the interface, which involves implementing the service to the clients.
41. What data types are supported by AIDL?
Ans:-AIDL has support for the following data types:
string
charSequence
List
Map
all native Java data types like int, long, char and Boolean
42. What is portable Wi-Fi hotspot?
Ans:-Portable Wi-Fi Hotspot allows you to share your mobile internet connection to other wireless device. For example, using your Android-powered phone as a Wi-Fi Hotspot, you can use your laptop to connect to the Internet using that access point.
43. What are the advantages of having an emulator within the Android environment?
Ans:-
- The emulator allows the developers to work around an interface which acts as if it were an actual mobile device.
- They can write, test and debug the code.
- They are safe for testing the code in early design phase
44. What do you think are some disadvantages of Android?
Ans:-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.
Android Libraries
Free libraries and tools for Android
Action Bars:
If you're new to writing Android apps, note that the action bar is one of the most important design elements you can implement. Read More.
Following are some useful Libraries for Action Bars
Advertisements:
Monetize, Promote and Analyze your apps with different ads companies.Following are some of the companies provides SDK for Advertisements.
Analytics:
Following Google Analytics provides
a powerful platform to measure and optimize all of your application marketing efforts.
Animations:
Animations can add subtle visual cues that notify users about what's going on in your app and improve their mental model of your app's interface. Animations can also add a polished look to your app, which gives your app a higher quality feel.Read More.
Following are some useful Libraries for Animations
Audio:
Following are useful Libraries for Android Audio
Background Processing:
Following are background Processing Libraries for Android
Backward Compatibility:
Following are backward Compatibility Libraries for Android
Bar Codes/QR Codes:
Following are Barcode scanning related Libraries for Android.
- Android Barcode Generator
- BarCode Fragment
- ZBar
- ZXing
- android-quick-response-code
- Barcode Scanner (ZXing)
- ZXScanLib
Buttons:
Following are Button widget related Libraries for Android.
- Android Circle Button
- Android-Bootstrap
- Circular Progress Button
- Flat Button
- Process Button
- ProgressButton
- PSGradientButtons
- TH-ProgressButton
Caching:
Following are Caching Libraries for Android.
Content Providers:
Curl/Flip Effects:
File/Directory Choosers:
Graphics:
Image Loaders:
Image Views:
Mails:






