how to preload an android application

by Lawrence » Fri, 06 Mar 2009 05:13:46 GMT


Sponsored Links
 Hi,
    i am now wondering how to preload an application. Does it work if
only place it under /system/app/?

    Thanks,

Lawrence

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



Other Threads

1. Changing background

Hi there,
I am trying to set the background dynamically as I play music.

1) I am able to set the background using the setBackground
(Color.GREEN) method.
2) Then I play a MP3 file (audio) using the MediaPlayer.
3) when I call myPlayer().isPlaying(), I would like to keep changing
the background color continiously till the music stops.  I tried this
way,

setContentView(R.layout.main);
                //startStreamingAudio();
                tv = new TextView(this);
        tv.setBackgroundColor(Color.GREEN);
        tv.setTextColor(Color.WHITE);
        tv.setText("Do you hear me!");
        setContentView(tv);
                mp = MediaPlayer.create(getApplicationContext(),
                                R.raw.organ_1);
                mp.start();
                while(mp.isPlaying()){
                        i += 20;
                        tv.setBackgroundColor(Color.rgb(i, 100, 100));
                        setContentView(tv);
                }

It changes only at the end of the sound file. Can someone help me find
the right way towards this ?
thanks
Di

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

2. Parcel/unparcel Bundle classloader bug?

I have a parcelable class whose writeToParcel() method puts some data
in a Bundle and writes it to the parcel.
This parcel gets sent from a client process to a service process.

At the side of the service, the readFromparcel() method tries to read
this Bundle from the parcel. A strange thing happens here.

First of all, I got a ClassNotFoundException for one of the objects
inside the Bundle. I "fixed" this by using readBundle(this.getClass
().getClassloader()) to force it to use the application's
classloader.

After this, I no longer got the ClassNotFoundException, but I did get
a different bundle, containing only the following entry:
mParcelledData.dataSize=376

This is not what's supposed to be in the bundle.

In the sourcecode Parcel.java I see this, in the readBundle
(Classloader) method:

final Bundle bundle = new Bundle(this, length);
if (loader != null) {
  bundle.setClassLoader(loader);
}


So the classloader is set after reading the bundle, instead of before.
Shouldn't that be the other way around?


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

3. 0xdroid beagle-cupcake-0x1 release note

4. AirplaneMode notifications

5. AsyncTask reuse

6. Logcat syntax highlighting for vim

7. Simulate a tap