Wednesday, 11 December 2013

Sunday, 17 November 2013

Difference between Android AsyncTask,Thread,IntentService and Service


Service
Thread
IntentService
AsyncTask
When to use ?
Task with no UI, but shouldn't be too long. Use threads within service for long tasks.
- Long task in general.

- For tasks in parallel use Multiple threads (traditional mechanisms)
- Long task usually with no communication to main thread.
(Update)- If communication is required, can use main thread handler or broadcast intents

- When callbacks are needed (Intent triggered tasks). 
- Small task having to communicate with main thread.

- For tasks in parallel use multiple instances OR Executor
 
Trigger
Call to method
onStartService()
Thread start() method
Intent
Call to method execute()
Triggered From (thread)
Any thread
Any Thread
Main Thread (Intent is received on main thread and then worker thread is spawed)
Main Thread
Runs On (thread)
Main Thread
Its own thread
Separate worker thread
Worker thread. However, Main thread methods may be invoked in between to publish progress.
Limitations /
Drawbacks
May block main thread
- Manual thread management

- Code may become difficult to read
- Cannot run tasks in parallel.

- Multiple intents are queued on the same worker thread.
- one instance can only be executed once (hence cannot run in a loop) 

- Must be created and executed from the Main thread

Content from : techtej

Thursday, 17 October 2013

List of open source Game Engines for Android(Android Game Development)

Here below is list of Game Engine used in Android Game Development

  • Open Source Android Apps for Developers: jMonkeyEngine (Java Based 3D Game Engine)
  • Open Source Android Apps for Developers: Android-2D-Engine (Android Game)
  • Open Source Android Apps for Developers: YoghurtGum (Android Game Engine)
  • Open Source Android Apps for Developers: Catcake (Android Game Engine)
  • Open Source Android Apps for Developers: jPCT-AE (Android Game 3D Engine)
  • Open Source Android Apps for Developers: Dwarf-fw (Android 3D Framework)
  • Open Source Android Apps for Developers: Mages (Android Game Engine)
  • Open Source Android Apps for Developers: AndEngine (Android Game Engine)
  • Open Source Android Apps for Developers: Angle (Android Game Engine)

Thursday, 10 October 2013

Tuesday, 1 October 2013

Android GridLayout Example (New Feature in 4.0)

Here The Below Example shows How to create GridLayout in Android ?

GridLayout induced in Android 4.0 as New Feature.

LinearLayout and RelativeLayout are the most common layouts used in user
interface design in Android. For simple user interfaces they are a good choice but
when the user interface gets complicated, the use of nested LinearLayout tends
to increase. Nested layouts (of any type) can hurt performance, and furthermore
nested LinearLayout deeper than 10 may cause a crash in your application.
Thus, you should either avoid using too many nested LinearLayout blocks or
you should use RelativeLayout in order to decrease nested LinearLayout blocks.
Another drawback of these layouts for complicated user interfaces is the difficulty
in readability. It is difficult to maintain nested LinearLayout or RelativeLayout
layouts that have many views. It is a good choice to use GridLayout in these
cases. Too many nested LinearLayouts could be avoided by using GridLayout.
Furthermore, it is much easier to maintain GridLayout. Many of the user interfaces
that use LinearLayout, RelativeLayout, or TableLayout can be converted to
GridLayout where GridLayout will provide performance enhancements. One of
the major advantages of GridLayout over other layouts is that you can control the
alignment of a view in both horizontal and vertical axes.

Example GridLayout:

<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:columnCount="3"
    android:rowCount="3" >
    <Button android:text="1,1" />
    <Button android:text="1,2" />
    <Button android:text="1,3" />
    <Button android:text="2,1" />
    <Button android:text="2,2" />
    <Button android:text="2,3" />
    <Button android:text="3,1" />
    <Button android:text="3,2" />
    <Button android:text="3,3" />
</GridLayout>

Output Screen:








Monday, 30 September 2013

How to connect the micromax Phone to the eclipse?

Hi friends to detect micromax mobile to the eclipse for Development purpose .Just download this below Driver and install .Then you can see Your Device in Eclipse Devices List.

Note: Don't forget to enable USB Debug mode in Developer Options in Settings.

Click on Globe to Download Driver.

If your Unable to find Developer option in your micromax mobile just follow below post for enable for find Developer option in your mobile.


Thursday, 12 September 2013

IPhone Dialog in Android

Hi friends here below i created same iphone dialog view in android, with different types of views.if you want u can download .and plz add your valuable comments in below.

Output Screenshots:









































































Tuesday, 10 September 2013

New Features For Android Application Development Explanation with Source

This below  book is a practical and hands-on guide for developing Android applications
using new features of Android Ice Cream Sandwich (Android 4.0), with a step-by-step
approach and clearly explained sample codes. You will learn the new APIs in Android
4.0 with these sample codes.

This Book covers these Below points.

Action Bar
New Layout(GridLayout)
Social APIs
Calendar APIs
Fragments
Supporting Different Screen Sizes
Android Compatibility Package
New Connectivity APIs





Android SQLite Database Viewer or Debuging with Stetho

Every Android Developer uses SQLite Database to store data into the Android Application data. But to view the data in SQLite have a lot of...