How to do some init operation immediately after install

by zhiyazw » Wed, 30 Sep 2009 01:37:14 GMT


Sponsored Links
 There is a big database(15M) in my application,
it is too big to download the apk if I publish the source database in
myapp.apk.
So I encode the db to binary files(300k).

But the new problem is I should decode binary files and create the
database(with data), this procedure take about several minutes, so I
can NOT do this in SQLiteOpenHelper.onCreate(), this is too slow for
user experience(though it is a one time procedure, it is still
unacceptable).

My application has NO main activity entry in launcher, the main entry
is BroadcastReceiver.onReceive, the infomation should display to user
immediately when receiving the broadcast, so I have no chance to
display a several minutes "Initializing, please waiting..." UI.

The best chance to create database and init data immediately after
install, but how to do this, is there any broadcast? or is there any
AndroidManifest attribute?

pls help!

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



How to do some init operation immediately after install

by zhiyazw » Sat, 03 Oct 2009 12:44:14 GMT


 Anybody help?
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How to do some init operation immediately after install

by Beowolve » Sat, 03 Oct 2009 16:47:52 GMT


 You could add an extra activity to your apk that does the init stuff
if the database does not exist and otherwise closes without showing
anything.
It might be a good idea to inform the user that you are going to
create a 15mb db on his device. Telling the user why this is needed
might be a
good thing anyway *g*



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



Other Threads

1. Accelerometer frequency

Hey, I wanted to get the frequency of accelerometer output.  How many
readings can I get per second?  And to what precision do I get?  Thanks
--~--~---------~--~----~------------~-------~--~----~

2. How to access gdata (Gmail contacts) from Android

Hi,
I recently started developing Android application. I need to search
for a particular contact in gdata (Gmail contacts) of a user by
providing username and password of the user.

Please guide me about how to proceed with this. Any sample code will
be of great help.

Thanks and Regards,
Maitreyee

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

3. Who will call AddDataSink to use custom MIO node.

4. LocationListener and location api working in Android Dev Phone (G1)

5. TextView with autoLink

6. SMS sync with Gmail or something else

7. problem with "Could not find helloAndroid.apk!"