Emulator too slow to start - DDK 8, Ubuntu 10.10, Eclipse 3.5.

by schibbl » Fri, 14 Jan 2011 21:19:56 GMT


Sponsored Links
 Hi,

I just started playing a bit with the Android SDK

Eclipse SDK

Version: 3.5.2
Build id: M20100211-1343

Intel(R) Pentium(R) Dual  CPU  T3400  @ 2.16GHz

-- 



Other Threads

1. BroadcastReciver in service

my BroadcastReciver is not getting called from serive ??
my service is running perfectly (as i can seee the log statements in
LogCat)
following is my code



public class ServiceExample extends Service {


        @Override
        public void onCreate() {
                super.onCreate();
                startservice();
        }

        @Override
        public void onDestroy() {
                stopservice();
                super.onDestroy();
        }

        @Override
        public void onStart(Intent intent, int startId) {
                super.onStart(intent, startId);
        }

private void startservice() {
                broadcastReciver = new ABC();      // here my class is there
                intentFilter = new IntentFilter();
                intentFilter.addAction(Intent.ACTION_ANSWER);
                intentFilter.addAction(Intent.ACTION_CALL_BUTTON);
                intentFilter.addAction(Intent.ACTION_DIAL);
                intentFilter.addAction(Intent.ACTION_NEW_OUTGOING_CALL);
                registerReceiver(broadcastReciver, intentFilter);
                broadcastReciver.setOrderedHint(true);
                ....      // here my mussiness logic is there
}
}

public class ABCextends BroadcastReceiver {
        public void onReceive(Context context, Intent intent) {
        TelephonyManager tManager = (TelephonyManager) context
                                .getSystemService(Context.TELEPHONY_SERVICE);
              CallStateListener callStateListener = new
CallStateListener();
                tManager
                                .listen(callStateListener, 
PhoneStateListener.LISTEN_CALL_STATE);
}
}


-- 

2. Application design - using threads

Hi all. I've been reading the developer guide, the sections on
designing for performance and responsiveness. It's great stuff, and
I'm going to go through all my code and refactor everything I can to
meet these suggestions.

One line stood out for me: "For games specifically, do calculations
for moves in a child thread."

Could someone possibly elaborate on this a little? If you had a game
where the screen was being refreshed continuously, with calculations
being made on every refresh, does this mean starting and ending a
thread every time this happens? Or is one thread created at the start,
which stays open for the duration of the game?

And would this be an inner class extending Thread with a run() method
as usual, or are there better ways of handling it? I recently used an
"AsyncTask" to handle a background task, would that be something that
could be of use here?

Many thanks for any help.

-- 

3. Tutorials: creating 9-patch drawables using SDK tools

4. Building opencore 2 outside android

5. Need Help: Is widestrings like L"String" allowed in Android?

6. Need Help: Is widestrings like L"String" allowed in Android?

7. 绛斿: how to stop BroadcastRe ceiver after some point