|
I've not found an elegant solution for including a populated database with an app. Anyone have any experience or do you always check for a database and create it on a first run?
|
# ¿ Aug 7, 2012 02:49 |
|
|
# ¿ May 2, 2024 23:45 |
|
So I have my first app that I'm building and I've run into a asynctask issue in that I think I need to use it but I don't know just how to do it. I have a doFirstRun method that is called and run if a setting isn't found in the sharedprefs code:
However, the message is never really displayed and it hangs while adding them. The way they are added is by passing player information to a object method... 150 of them. This hangs the app for a few seconds until that is finished. example: code:
http://labs.makemachine.net/2010/05/android-asynctask-example/
|
# ¿ Aug 8, 2012 23:43 |
|
Doctor w-rw-rw- posted:Shouldn't the progressdialog be a member of the asynctask and be started in onPreExecute? I'm getting: Type mismatch: cannot convert from void to ProgressDialog Would this be why? edit: I changed it to code:
The method show(Context, CharSequence, CharSequence) in the type ProgressDialog is not applicable for the arguments (ViewPlayers.AddPlayersTask, String, String) edit2: Nevermind, I added changed the context from this to ViewPlayers.this (activity name) and it cleared the error. edit3: Got it all up and running. Works great. Thanks for the code help gentlemen! rotaryfun fucked around with this message at 18:30 on Aug 10, 2012 |
# ¿ Aug 10, 2012 15:10 |
|
Doctor w-rw-rw- posted:are you not using an IDE to edit? You should be able to autocomplete most of that in seconds. Yeah I'm using Eclipse but for whatever reason it autocompleted to just this
|
# ¿ Aug 10, 2012 22:59 |
|
That's odd. Doesn't the resource class get built during compile?
|
# ¿ Aug 19, 2012 05:00 |