Need help in adding image to sample snake game in SDK

by » Wed, 29 Apr 2009 01:07:49 GMT

Sponsored Links
 Hi All,
 I am new to this Android platform. So here I am trying to modify the
sample snake game given in android SDK.

 I am trying add a background image. I have already image capture and
stored as image.png. I want to add background image as the image.png.
Please let me know where to do the code changes. Please let me know
the API's and exact place in sample snake code in Android SDK.

Warm Regards,


Other Threads

1. A Problem about developing with GPS module

I have wri{*filter*} a program to check the location from GPS module and I need to
get a signal once two minitues.

So, I use the function

of class LocationManager

The code of setting the LocationManager is below:

               mLocationManager = (LocationManager)

mLocationPrivider = LocationManager.GPS_PROVIDER;

mLocation = mLocationManager.getLastKnownLocation(mLocationPrivider);

mLocationManager.requestLocationUpdates(mLocationPrivider, 1000*120,


updateGpsStatus(0, null);


but when I download my program to a GPhone, I find sometimes I will recive
the many data form GPS  in on minitues. sometimes I will not recive the data
in several minitues.

I have tried many way to solve it. But I finnally get a failiure.

Did anybody else devlelopped with the GPS module of GPhone ?

Please forgive my poor English.Wish your help!

thx ^.^


2. Is it worth writing a ContentProvider and using CursorAdapter for this case?

We are connecting to a number of WebServices and fetching a lot of
structured data(XML). We are parsing this data and storing them into
SQLite tables. This part of the application runs periodically in the
back ground.

On the foreground, the data fetched is displayed in ListViews. We have
used ArrayAdapter to back these lists up. The thing is, every time the
Actvity starts or data set is refreshed, we have to load the
ArrayLists by querying the database and call notifyDataSetChanged() on
the Adapter.
This slows down the application and affects the User experience.

1. I'd imagine using a CursorAdapter might result in performance gain,
since the framework will take care of managing the cursor. Is this
assumption valid?
2. Will the CursorAdapter take care of reflecting updates to the
database on the screen automatically?
3. Will I have to write a ContentProvider if I choose to use
4. Are there any other considerations that we need to make?

Please help.



3. List Item (a view) order changes unexpextedly while (fast) scrolling in a ListView

4. Default browser

5. Getting Thread ID/Phone# of an Open SMS Message?

6. obtain recently used app list programatically?

7. EndLess ListView