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

Friday, March 7, 2014

Android Application Life Cycle

Android Application Life Cycle


The Android application life cycle is unique in that the system controls much of the life cycle of the application. All Android applications, or Activities, are run within their own process. All of the running processes are watched by Android and, depending on how the activity is running (this is, a foreground activity, background activity, and so forth), Android may choose to end the activity to reclaim needed resources.
Some of the specific methods called during the life cycle of an android activity are
  • onCreate
  • onStart
  • Process-specific events (for example: launching activities or accessing a database)
  • onStop
  • onDestroy
Following the same logic as other application life cycles, an Android application is created, the processes are started, events are fired, processes are stopped, and the application is destroyed. Though there are a few differences, many application developers
should be comfortable with the steps in the life cycle.

Wednesday, February 26, 2014

Features of Android



Features of Android

  • Beautiful UI


Android OS basic screen provides a beautiful and intuitive user interface.

  • Connectivity


GSM/EDGE, IDEN, CDMA, EV-DO, UMTS, Bluetooth, Wi-Fi, LTE, NFC and WiMAX.

  • Storage


SQLite, a lightweight relational database, is used for data storage purposes.

  • Media support


H.263, H.264, MPEG-4 SP, AMR, AMR-WB, AAC, HE-AAC, AAC 5.1, MP3, MIDI, Ogg Vorbis, WAV, JPEG, PNG, GIF, and BMP

  • Messaging


SMS and MMS

  • Web browser


Based on the open-source WebKit layout engine, coupled with Chrome's V8 JavaScript engine supporting HTML5 and CSS3.

  • Multi-touch


Android has native support for multi-touch which was initially made available in handsets such as the HTC Hero.

  • Multi-tasking


User can jump from one task to another and same time various application can run simultaneously.

  • Resizable widgets


Widgets are resizable, so users can expand them to show more content or shrink them to save space

  • Multi-Language


Supports single direction and bi-directional text.

  • GCM


Google Cloud Messaging (GCM) is a service that lets developers send short message data to their users on Android devices, without needing a proprietary sync solution.

  • Wi-Fi Direct


A technology that lets apps discover and pair directly, over a high-bandwidth peer-to-peer connection.

  • Android Beam


A popular NFC-based technology that lets users instantly share, just by touching two NFC-enabled phones together.


Monday, February 24, 2014

Google Cloud Messaging(GCM) for Android

Google Cloud Messaging for Android

Google Cloud Messaging for Android (GCM) is a service that allows you to send data from your server to your users' Android-powered device, and also to receive messages from devices on the same connection. The GCM service handles all aspects of queueing of messages and delivery to the target Android application running on the target device. GCM is completely free no matter how big your messaging needs are, and there are no quotas.

You might have heard of C2DM (Cloud-to-Device Messaging), which basically allowed third-party applications to send (push) lightweight messages to their Android applications. Well, C2DM as such is now deprecated and replaced with its successor up the evolutionary ladder: GCM, or Google Cloud Messaging.

Key Features = 

  • Send data from your server to users' Android-powered devices
  • Send "send-to-sync" messages
  • Send messages with payload
  • Faster, easier GCM setup
  • Upstream messaging over XMPP
  • Seamless multi-device messaging
  • Get Started
The set-up process will provide you with the two most essential pieces of information needed to run GCM:
  1. An API key, needed by your server to send GCM push notifications
  2. Sender ID, needed by your clients to receive GCM messages from the server

Android Package Series : ppt2


Android Package Series : ppt1

Android Book for Absolute Begineers

Tuesday, September 17, 2013

Some of our idea for AAKASH tablet

Some of our idea for AAKASH tablet


1.  Virtual Classroom ( Online Attendance, online Assignment)

2. All in One player(Audio/Video play in one application and can support all extensions).

3. Online Office Document Application

4. Ad-hoc for AAKASH tab.

5. if Ad-hoc implemented then chat on Ad-hoc.

6. Graphical Chatting on Wi-Fi or Ad-hoc(Chatting Audio,Video or Text).

7. Paint in Android.

8. Projector handling by AAKASH tab.

9. Automatic slide changer using Bluetooth.

10. Spend Spreasheet.

11. Theme Creator.

12. Advanced Call Manager.

13. Emergency Task Manager.

14. School Profile Mode.

15. Advanced Profile Manager.

16. Voice Commmands.

17. Bitlocker / Data Encryption app in android.

18. Advanced Image Viewer.

19. Contact Backup app.

20. Timer App.

21. Salary Calculator.

22. Event Manager.

23. Location remainder.

24. Tutorial apps/Books/Examples/Videos.

25. Remote Desktop Connection in Android.

26. Advanced Equilizer in Android.

27. Scientific Calculator.

28. Virtual Machine on Android.

29. Call Reminder.

30. Hospital Finder by Disease, area etc.

Friday, August 2, 2013

Android Installation in Ubuntu


Follow the following Six steps to Install Android SDK:

Step 1: In Download Eclipse version 32/64 bit (verify your OS’s bit) HERE YOU DON’T NEED TO INSTALL ECLIPSE. Open the containing folder and double click the eclipse.

Step 2: Download Android SDK (.tgz file) , unpack it and locate it in safe place in your machine.

Step 3: Open a terminal and navigate to the tools/ directory in the Android SDK, then execute android sdk. 


Step 4: Now in eclipse, Open
Help -> Install New Software -> Add
Name : <any name for sdk>
Location : https://dl-ssl.google.com/android/eclipse/
Then Click “OK”.  



Step 5: Select All Packages in BOX, Click next, again next, select radio button (Accept) and Click Finish button.
Some error will occur install SDK, Click OK Button.

Step 6: Window -> Preference -> Android -> click OK

Architecture of Android

Here you can understand two things :
  •         How Android works ?
  •         What are layers in Android OS ?
Figure: Architecture of Android

The Android OS is roughly divided into five sections in four main layers :
Red Layer :

Linux kernel:- This is the kernel on which Android is based. This layer contains all the low- level device drivers for the various hardware components of an Android device.
Green Layer :

 Libraries:- These contain all the code that provides the main features of an Android OS. For example, the SQLite library provides database support so that an application can use it for data storage. The WebKit library provides functionalities for web browsing.

Android runtime:- At the same layer as the libraries, the Android runtime provides a set of core libraries that enable developers to write Android apps using the Java programming language. The Android runtime also includes the Dalvik virtual machine, which enables every Android application to run in its own process, with its own instance of the Dalvik virtual machine (Android applications are compiled into the Dalvik executables). Dalvik is a specialized virtual machine designed specifically for Android and optimized for battery-powered mobile devices with limited memory and CPU.
Blue Layer :

Application framework:- Exposes the various capabilities of the Android OS to application developers so that they can make use of them in their applications.

Applications:- At this top layer, you will find applications that ship with the Android device (such as Phone, Contacts, Browser, etc.), as well as applications that you download and install from the Android Market. Any applications that you write are located at this layer.

Saturday, May 25, 2013

Ten Tips for Android Application Development

Beginner tips

1: Learn SQL

Android has an excellent persistence system; use it to make your applications more robust in case of failure or shutdown, and to make suspending and resuming more efficient. Android's SQLite-based storage system is thoroughly integrated with Android's user interface classes.

Android supports the observer pattern in Cursor, Adapter, and View classes, enabling the user interface to connect directly to the results of database queries. Using these capabilities means less work when Android wants to stop your application because you have little or no data that needs to be to be explicitly saved, and more reliability in running on mobile devices that can be out of battery at any time.

The database classes in the Android framework manage caching and are more efficient than reading a whole data model into objects in memory. But, in oder to take maximum advantage of the Android way of designing data models, you will need to know some SQL.

2: Learn XML

You don't have to know much about XML to use the visual editing tools for defining layouts and other resources. You are, in theory, hardly ever required to edit XML "by hand." But these tools are imperfect. The more you know about how Android uses XML, and about the Android XML schema, the easier it is to fix problems that occur in XML in Android applications, and the more comfortable you will be using XML to maximum effect in developing Android applications. A general XML book, like XML in a Nutshell (O'Reilly), or Learning XML (O'Reilly) can be useful.

3: Learn Eclipse IDE

Java can be a verbose language, and without code completion, Javadoc pop-ups, and advanced refactoring, it can be a drag compared to dynamic languages. In other words, Java without Eclispe's productivity features would be no fun at all.

Eclipse, however, can have a steep learning curve for beginners. Getting comfortable with this big, powerful, and sometimes perplexing IDE is a big part of being productive in Android application development. Steve Holzner's book Eclipse (O'Reilly) is an excellent introduction and will get you up to speed.

Within the Eclipse documentation pages, you can get a good start by reading the pages covering Eclipse concepts. Get to know these concepts early on, otherwise the Eclipse menus and documentation will seem full of jargon. Then go on to thebasic tutorial in the Java development section.

4: Use automated testing

Use the Monkey to stress test your application. It generates a stream of events, simulating random inputs, and reports application crashes or lack of response. Use the Instrumentation Framework and JUnit to write unit tests that can be run from Eclipse using adb and the InstrumentationTestRunner.

Learn and use the application and service lifecycles effectively. Enable your application to be efficiently stopped and restarted by the Android system. Unlike many runtime environments with almost trivial application lifecycles, Android's runtime environment frequently stops or terminates processes to keep application resource consumption low, being prepared to restart them if the user navigates back to an application.

Android expects applications to override and respond to a set of application lifecycle methods and cooperate with the way Android manages applications as they become visible on the screen or are obscured by other applications. Get this code into your application early on in its development, so that you do not end up retro-fitting these method overrides. Use the debugger to set breakpoints in the application lifecycle methods so that you get a feel for how the Android application lifecycle works.

Advanced tips

5: Use static analyzers

Java lends itself well to meaningful compiler warnings, and to warnings and "advice" based on static analysis. Every potential bug you kill before your application leaves development brings you closer to a 4-star user rating instead of a 2-star one. Use the compiler warnings, FindBugs, and try other static analyzers, like PMD available as Eclipse plug-ins to find the tools that find the most problems and the fewest false positives.

6: Use and be used

Use Intent objects and StartActivity (and related methods) to "borrow" functionality from other applications, and write your application to respond to Intent filter matches and provide functionality to other applications. Appications can also share data through the ContentProvider system and through remote method interfaces.

7: Divide large applications

If you are writing a large application, consider dividing it into a suite of applications and services. Smaller applications load faster and use fewer resources. Making a suite of applications, content providers, and services makes your code more open to incorporation into other applications as described the "Use and be used" tip.

8: Design for low power consumption

Things that are benign on a personal computer, like polling a server every 10 minutes, can cut a handset's battery life in half or worse. Code your application to do as little as possible until the user brings it to the foreground or some external information arrives that requires action. Use the "Battery use" in the "About phone" menu in "Settings" to find the applications and other system functions using the battery.

9: Use the NDK to access library functions

The Android NDK is an optional companion to the Android SDK that enables use of native compiled code. Use the NDK to incorporate existing C and C++ libraries where they provide useful functionality. Code CPU-intensive computations, if they must be done on the handset, in C or C++. Use the NDK's tools to call that code from Java using the Java Native Interface (JNI).

10: Avoid hierarchy

Don't design your application around a central location, "home" screen, or fixed starting place. Mobile device users want instant access to functionality. They won't tolerate moving up and down menu hierarchies. Furthermore, you want to provide stand-alone activities that are easy for other applications to invoke through the Intent interface. Allow each activity to be used independently, and include a menu in it that allows access to every other activity. In short, embed your application into a seamless Android user experience.