Thursday, 28 June 2012

How to get a Sprite by tag in Cocos2D ?


Sometimes you may need to get a sprite using tag while doing a project using Cocos2D. It's easy to get a sprite by a tag in Cocos2D, use the following code to get it.

[java]tempSprite = (CCSprite*)[self getChildByTag:7];[/java]

Here 'tempSprite' is your CCSprite and it will get the sprite with tag 7.


Tuesday, 19 June 2012

How to explicitly free memory in android OR Release unwanted memory in Android?

public void freeMemory(){

Visit for more information.

Saturday, 16 June 2012

Placing Controls in a Widget in Android and Listening to the events from them.

Now in today’s tutorial I am going to show how to place controls like buttons inside the widget and listen to their events and respond to it.

I am proceeding the same as the previous tutorials.
First I will create a new project named “ControlsInWidget” and name the activity “”.
Now we will create a layout for this main activity. settings.xml
These are the contents of settings.xml
<TableLayout android:id="@+id/TableLayout01"
<TextView android:layout_width="wrap_content"
    android:text="CoderzHeaven Widget Settings Activity"

Read the complete post from here.

Wednesday, 13 June 2012

How to get Notified when a widget is deleted?

I have already covered a tutorial on how to start with widgets and how to create a simple widget here..

<a href="" title="Create a Widget" target="_blank"></a>

Today I will show you how to get notified when a widget is deleted.

if you have already gone through my <a href="" title="Create a widget" target="_blank">previous post</a>, then there is only a small change in the "" file.

we have to add the onReceive() method to the class like this.

Read complete post from here...

Android hits 900k activations per day

The Google Android Army is coming again...

Google’s Android platform sees 900,000 activations a day, according to a tweet from Android head Andy Rubin. The statistic, of course, doesn’t distinguish between smartphones and tablets, so it’s hard to get a clear picture of the Android ecosystem.

<img src="" alt="Google Android" />

See more about this new from here.

Sunday, 10 June 2012

CoderzHeaven on Facebook, New Fan Page

Please find us on Facebook for more updates.

This is our new Fab page Url.

By adding us on Facebook, you can get access to our new updates fast and get answers to your questions quickly.

So please add us on Facebook.

Please find us on Twitter also..

Monday, 4 June 2012

How to read a text file in ANDROID?

Hi all…..

In this post I will show you how to read a text file in ANDOID.
Let your file is in the assets folder of your ANDOID project.
The file is named “myfile.txt”

This example reads the file line by line using readLine() function till the end of the file. Here your need two classes named “InputStreamReader” and “BufferedReader”. For writing into the file you need “OutputStreamReader” class. The result is displayed in a Toast. Make sure you notice it.

Read more from here...