cupcake 1.5 r1 surfaceCreated is not called!!!

by ad » Tue, 28 Apr 2009 19:58:30 GMT


Sponsored Links
 I've created game,
everything works fine on all previous android versions except current
cupcake 1.5.
It works even on cupcake pre release.I'm using exact the same
build.xml, sources and resources.
The problem is that surfaceCreated is not called :
                SurfaceHolder mSurfaceHolder = getHolder();
                mSurfaceHolder.addCallback(this);
                setFocusable(true);

                waitForScreen(); - here I untill surfaceCreated change variable 
that
it's ready,but it's never called.
I just can explain that I'm running SurfaceView activity after
stopping regular View activity (for the game menu - it was easier to
create it).

 Please help me if you can figure out something. I'm just a developer
not a Android engine tester. If they are putting such stuff to the
market they should test it a little bit (not talking about discovered
VM crashes instead of exceptions).

AA


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Animations and Threads

Hello,

with AnimationDrawable I can handle animations well. But this class
doesn't pay when I use a thread which draws on the canvas because it
has no sense to draw with AnimationDrawable to the background of a
View when there are a lot of animations to draw (http://
developer.android.com/intl/fr/reference/android/graphics/drawable/
AnimationDrawable.html). So my guess is it to not use
AnimationDrawable but to read every single png file in an array of
BitMaps and draw the right offset to the canvas to the right time.

Is there a better way to use animations with threads?

Regards.

-- 

2. Retrieving PackName from RecentTaskInfo

I'm  trying to the the application and icons for Recent Tasks, but I
can't seem to get the appInfo using the RecentTaskInfo.  The
getApplicationInfo call is what is failing due to the getPackageName()
returning null.


 ActivityManager manager =
(ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
 List<RecentTaskInfo> tasks = manager.getRecentTasks(50, 1);
        for (int counter = 0; counter < tasks.size(); counter++)
        {
                RecentTaskInfo task =  tasks.get(counter);
                PackageManager pm = this.getPackageManager();

try {

                        ApplicationInfo appInfo  =
pm.getApplicationInfo(task.origActivity.getPackageName(),0);
                       String applicationName =
getPackageManager().getApplicationLabel(appInfo).toString();
                       Drawable icon = appInfo.loadIcon(pm);
.....

I've also tried:

ApplicationInfo appInfo  =
pm.getApplicationInfo(task.baseIntent.getPackage(),0);

In which getPackage() is returning null.. maybe I'm going about this
the wrong way and was hoping for some tips?

-- 

3. Hard to describe ... How to quickly scan through all rows?! How to pass a cursor between two activities?!

4. Beda new radio dan old radio pada Magic

5. AsyncTask : java.util.concurrent.RejectedExecutionException

6. combining 1.5 and 1.6

7. Calling close() on a Cursor that's backing a ListView