[android-developers] Re: Installing APK + DB
hi guys, thanks for comments, i've strongly reduced the size of my DB :-) and thigs are better now! btw, 1 . I am working in improving the activity lifecycle and i am getting also a message like appl is not responding, force quit OR WAIT. by typing WAIT the process continues ... is there a timer somewhere ? or it is also an activity change related issue ? 2. may somebody send me a :memory: database example ? thanks in advance, On Jul 11, 7:14 am, lbendlin l...@bendlin.us wrote: Or just include it as a raw resource (give the file a silly name so Android doesn't think it is a database) and then upon the initial program run/ database version update use your copy routine to place the (large) database stub where you need it. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Installing APK + DB
Or just include it as a raw resource (give the file a silly name so Android doesn't think it is a database) and then upon the initial program run/ database version update use your copy routine to place the (large) database stub where you need it. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Installing APK + DB
hey guys, i am getting problems, again, with the DB; it happens when the DB size is great than 1MB. i have my DB in the assets folder and first time is copied to the data/ data/APPL/databases directory. i wonder if the 1MB restriction for the assets folder is still an application constraint ? i am asking because somewhere i found that it was solved ... my appl is android 2.2. x sansung galaxy S. regards On Jul 8, 11:20 am, hectordu...@yahoo.com hectordu...@yahoo.com wrote: hi kostya, i get your point, i'll try to find the bug; btw, if you have any advice on how to deal with it, i willl apreciate it very much. soo, i will post what happened! regards hector pd.about the double click conflict, i used setOnLongClickListener instead of onDblClick. On Jul 7, 1:10 pm, Kostya Vasilyev kmans...@gmail.com wrote: Hector, What I was hinting at (sorry if I was being too oblique) is that: 1 - There is a bug in your code when the activity gets recreated for configuration changes; 2 - The most frequent case of a configuration change is the screen orientation change; 3 - There are other cases configuration change cases, and I provided the steps for one of them; 4 - Rather than putting lipstick over the bug with your manifest change, treat it as an opportunity to easily find and fix the bug; 5 - Once that's done, and your code survives an orientation change, add back the manifest changes as an optimization, if needed. -- Kostya 07.07.2011 20:31, hectordu...@yahoo.com пишет: your application is still likely crash if you leave it by pressing Home, change the phone's language in Settings, and return to the app (via launcher icon or recent app list)... YEAH ! it is still crashing but i don't know exactly when :-( but ot works fine by pressing HOME, or returning to the app via the icon. it sounds rare but is there a light sensor some where in the phone? On Jul 6, 12:11 pm, hectordu...@yahoo.comhectordu...@yahoo.com wrote: no kostya, by the moment it thasn't crash for that ... know i am geting conflicts with single and double click on a button .. :-( it looks like when i make a double click also tryes to execute some associates methods to single click ... plase help :-) hector On Jul 5, 1:33 pm, Kostya Vasilyevkmans...@gmail.com wrote: That's good, but your application is still likely crash if you leave it by pressing Home, change the phone's language in Settings, and return to the app (via launcher icon or recent app list)... 05.07.2011 22:13, hectordu...@yahoo.com пишет: about the screen orientation, i have included this line in the manfest: android:configChanges=orientation|keyboardHidden ... works:-) -- Kostya Vasilyev -- Kostya Vasilyev -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Installing APK + DB
hey guys, i am getting problems, again, with the DB; it happens when the DB size is great than 1MB. i have my DB in the assets folder and first time is copied to the data/ data/APPL/databases directory. i wonder if the 1MB restriction for the assets folder is still an application constraint ? i am asking because somewhere i found that it was solved ... my appl is android 2.2. x sansung galaxy S. regards On Jul 8, 11:20 am, hectordu...@yahoo.com hectordu...@yahoo.com wrote: hi kostya, i get your point, i'll try to find the bug; btw, if you have any advice on how to deal with it, i willl apreciate it very much. soo, i will post what happened! regards hector pd.about the double click conflict, i used setOnLongClickListener instead of onDblClick. On Jul 7, 1:10 pm, Kostya Vasilyev kmans...@gmail.com wrote: Hector, What I was hinting at (sorry if I was being too oblique) is that: 1 - There is a bug in your code when the activity gets recreated for configuration changes; 2 - The most frequent case of a configuration change is the screen orientation change; 3 - There are other cases configuration change cases, and I provided the steps for one of them; 4 - Rather than putting lipstick over the bug with your manifest change, treat it as an opportunity to easily find and fix the bug; 5 - Once that's done, and your code survives an orientation change, add back the manifest changes as an optimization, if needed. -- Kostya 07.07.2011 20:31, hectordu...@yahoo.com пишет: your application is still likely crash if you leave it by pressing Home, change the phone's language in Settings, and return to the app (via launcher icon or recent app list)... YEAH ! it is still crashing but i don't know exactly when :-( but ot works fine by pressing HOME, or returning to the app via the icon. it sounds rare but is there a light sensor some where in the phone? On Jul 6, 12:11 pm, hectordu...@yahoo.comhectordu...@yahoo.com wrote: no kostya, by the moment it thasn't crash for that ... know i am geting conflicts with single and double click on a button .. :-( it looks like when i make a double click also tryes to execute some associates methods to single click ... plase help :-) hector On Jul 5, 1:33 pm, Kostya Vasilyevkmans...@gmail.com wrote: That's good, but your application is still likely crash if you leave it by pressing Home, change the phone's language in Settings, and return to the app (via launcher icon or recent app list)... 05.07.2011 22:13, hectordu...@yahoo.com пишет: about the screen orientation, i have included this line in the manfest: android:configChanges=orientation|keyboardHidden ... works:-) -- Kostya Vasilyev -- Kostya Vasilyev -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Installing APK + DB
On Mon, Jul 11, 2011 at 9:29 AM, hectordu...@yahoo.com hectordu...@yahoo.com wrote: hey guys, i am getting problems, again, with the DB; it happens when the DB size is great than 1MB. You have to split your data into 1MB chunks and merge those when copying the database. At some point (soon?) the Android Market should introduce the ability to have 2 (IIRC) asset files alongside the apk, and that should make things easier. Until then, if your data is relatively small (a few MB), split it and put it in assets. If it's bigger, put a zip file on a Web server and download/extract it on first run. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Installing APK + DB
hi kostya, i get your point, i'll try to find the bug; btw, if you have any advice on how to deal with it, i willl apreciate it very much. soo, i will post what happened! regards hector pd.about the double click conflict, i used setOnLongClickListener instead of onDblClick. On Jul 7, 1:10 pm, Kostya Vasilyev kmans...@gmail.com wrote: Hector, What I was hinting at (sorry if I was being too oblique) is that: 1 - There is a bug in your code when the activity gets recreated for configuration changes; 2 - The most frequent case of a configuration change is the screen orientation change; 3 - There are other cases configuration change cases, and I provided the steps for one of them; 4 - Rather than putting lipstick over the bug with your manifest change, treat it as an opportunity to easily find and fix the bug; 5 - Once that's done, and your code survives an orientation change, add back the manifest changes as an optimization, if needed. -- Kostya 07.07.2011 20:31, hectordu...@yahoo.com пишет: your application is still likely crash if you leave it by pressing Home, change the phone's language in Settings, and return to the app (via launcher icon or recent app list)... YEAH ! it is still crashing but i don't know exactly when :-( but ot works fine by pressing HOME, or returning to the app via the icon. it sounds rare but is there a light sensor some where in the phone? On Jul 6, 12:11 pm, hectordu...@yahoo.comhectordu...@yahoo.com wrote: no kostya, by the moment it thasn't crash for that ... know i am geting conflicts with single and double click on a button .. :-( it looks like when i make a double click also tryes to execute some associates methods to single click ... plase help :-) hector On Jul 5, 1:33 pm, Kostya Vasilyevkmans...@gmail.com wrote: That's good, but your application is still likely crash if you leave it by pressing Home, change the phone's language in Settings, and return to the app (via launcher icon or recent app list)... 05.07.2011 22:13, hectordu...@yahoo.com пишет: about the screen orientation, i have included this line in the manfest: android:configChanges=orientation|keyboardHidden ... works:-) -- Kostya Vasilyev -- Kostya Vasilyev -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Installing APK + DB
your application is still likely crash if you leave it by pressing Home, change the phone's language in Settings, and return to the app (via launcher icon or recent app list)... YEAH ! it is still crashing but i don't know exactly when :-( but ot works fine by pressing HOME, or returning to the app via the icon. it sounds rare but is there a light sensor some where in the phone? On Jul 6, 12:11 pm, hectordu...@yahoo.com hectordu...@yahoo.com wrote: no kostya, by the moment it thasn't crash for that ... know i am geting conflicts with single and double click on a button .. :-( it looks like when i make a double click also tryes to execute some associates methods to single click ... plase help :-) hector On Jul 5, 1:33 pm, Kostya Vasilyev kmans...@gmail.com wrote: That's good, but your application is still likely crash if you leave it by pressing Home, change the phone's language in Settings, and return to the app (via launcher icon or recent app list)... 05.07.2011 22:13, hectordu...@yahoo.com пишет: about the screen orientation, i have included this line in the manfest: android:configChanges=orientation|keyboardHidden ... works:-) -- Kostya Vasilyev -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Installing APK + DB
Hector, What I was hinting at (sorry if I was being too oblique) is that: 1 - There is a bug in your code when the activity gets recreated for configuration changes; 2 - The most frequent case of a configuration change is the screen orientation change; 3 - There are other cases configuration change cases, and I provided the steps for one of them; 4 - Rather than putting lipstick over the bug with your manifest change, treat it as an opportunity to easily find and fix the bug; 5 - Once that's done, and your code survives an orientation change, add back the manifest changes as an optimization, if needed. -- Kostya 07.07.2011 20:31, hectordu...@yahoo.com пишет: your application is still likely crash if you leave it by pressing Home, change the phone's language in Settings, and return to the app (via launcher icon or recent app list)... YEAH ! it is still crashing but i don't know exactly when :-( but ot works fine by pressing HOME, or returning to the app via the icon. it sounds rare but is there a light sensor some where in the phone? On Jul 6, 12:11 pm, hectordu...@yahoo.comhectordu...@yahoo.com wrote: no kostya, by the moment it thasn't crash for that ... know i am geting conflicts with single and double click on a button .. :-( it looks like when i make a double click also tryes to execute some associates methods to single click ... plase help :-) hector On Jul 5, 1:33 pm, Kostya Vasilyevkmans...@gmail.com wrote: That's good, but your application is still likely crash if you leave it by pressing Home, change the phone's language in Settings, and return to the app (via launcher icon or recent app list)... 05.07.2011 22:13, hectordu...@yahoo.com пишет: about the screen orientation, i have included this line in the manfest: android:configChanges=orientation|keyboardHidden ... works:-) -- Kostya Vasilyev -- Kostya Vasilyev -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Installing APK + DB
no kostya, by the moment it thasn't crash for that ... know i am geting conflicts with single and double click on a button .. :-( it looks like when i make a double click also tryes to execute some associates methods to single click ... plase help :-) hector On Jul 5, 1:33 pm, Kostya Vasilyev kmans...@gmail.com wrote: That's good, but your application is still likely crash if you leave it by pressing Home, change the phone's language in Settings, and return to the app (via launcher icon or recent app list)... 05.07.2011 22:13, hectordu...@yahoo.com пишет: about the screen orientation, i have included this line in the manfest: android:configChanges=orientation|keyboardHidden ... works:-) -- Kostya Vasilyev -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Installing APK + DB
The application will be complete if you ship the database as RESOURCE. And what about where will be database? That's irrelevant question as long as you have exact path. For example I have shipped a db in application in folder data/data/files, I specified the same path to the app, and that's it. As long as it works on emulator, the odds to work on actual phone ARE BIG! If you need more help about the code. Say it. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Installing APK + DB
BTW: Regarding my previous I forgot to say. Your db path (data/data/ MYAPPL/databases ) is perfectly reasonable and right. On Jul 4, 3:58 am, hectordu...@yahoo.com hectordu...@yahoo.com wrote: there is something i don't understand ... if the application works fine into the emulator: --- does not mean that it will work into de real device ? --- does not mean that the apk file is complete ... including the database ? --- directory: data/data/MYAPPL/databases is or not the right place for databases? regards On Jul 3, 8:19 pm,NikolaMKDnikola.despoto...@gmail.com wrote: Save it as resource in raw folder, load it as resource then try to copy it into app path. It does not need to be inside /databases folder. It can be anywhere (SDcard not recommended) Thats how you ship external SQLiteDatabase. Google it how to ship external sqlite database android, there is sample codes (on one blog, i cant remember), but they must be modified based on your app requirements. They are just good for start. On Jul 4, 2:08 am, hectordu...@yahoo.com hectordu...@yahoo.com wrote: Mark, yes, i agree, the process is not right ... may you share with me a link which help me including my database into the apk file ? thanks in advance. On 3 jul, 17:59, Mark Murphy mmur...@commonsware.com wrote: On Sun, Jul 3, 2011 at 6:43 PM, hectordu...@yahoo.com hectordu...@yahoo.com wrote: I am trying to install my first ;-( Android application into a Samsung tab phone device but it does not start; i wonder if i am missig something in the process: 1- Appl needs a pre-existing sqlite database, which i have installed (eclipse+DDS+pull) into my development environment ... so, it is installed under data/data/MYAPPL/databases/myDB.db 2- the appl runs fine into the emulator 3- i have conected my phone device, start adb and have seen my device: ./adb kill-server ./adb start-server ./adb devices 4- i have installed (with sucess) my apk: ./adb install -l workspace/myAppl.apk DOES THE APK FILE INCLUDES THE DB ? Not based on anything you have described here. You manually copied the database to the device in step #1. That does not put the database inside of the APK file, any more than copying a file to a Windows PC automatically puts it inside an .MSI file. 5- disconnect my device: ./adb kill-server + unpluged BUT, THE APPLICATION DOES NOT START: ... application has stopped unexpectedly ... I think the problem is related with the database; maybe it does not exist, but i am tryin to see waths going on ... may somebody help me ? Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat and look at the stack trace associated with your error message. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Installing APK + DB
On 04/07/2011 03:19, NikolaMKD wrote: Save it as resource in raw folder, load it as resource then try to copy it into app path. It does not need to be inside /databases folder. It can be anywhere (SDcard not recommended) Why is copying onto the sdcard not recommeded? Pepijn -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Installing APK + DB
thanK you guys, finallly I followed this link and works: www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/ i had some problems with the package name, which throws in error copying the database, and then with a table which wasn't found in the schema. it wasn't clear for me but i had to copy the sqlite file to the resources folder and also to the data/data/MYAPPL/database directory. anyway, i continuous without understanding why something that works in the emulator doesn't works in the real device WITHOUT CHANGES. finally it worked :-( NOW I HAVE ANOTHER PROBLEM :-( WHEN MY PHONE (SAMSUNG TAB) SWITCHS THE IMAGE FROM VERTICAL TO HORIZONTAL, THERE IS AN EXCEPTION THAT I DON'T KNOW HOW TO CATCH, AND THE APPL CRASH MAY SOMEBODY TELL ME WHATS GOING ON ? .. IS THERE SOMEWHERE AN EXAMPLE CODE TO DEAL WITH ? REGARDS ... On Jul 5, 7:15 am, Pepijn Van Eeckhoudt pep...@vaneeckhoudt.net wrote: On 04/07/2011 03:19, NikolaMKD wrote: Save it as resource in raw folder, load it as resource then try to copy it into app path. It does not need to be inside /databases folder. It can be anywhere (SDcard not recommended) Why is copying onto the sdcard not recommeded? Pepijn -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Installing APK + DB
thanK you guys, finallly I followed this link and works: www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/ i had some problems with the package name, which throws in error copying the database, and then with a table which wasn't found in the schema. it wasn't clear for me but i had to copy the sqlite file to the resources folder and also to the data/data/MYAPPL/database directory. anyway, i continuous without understanding why something that works in the emulator doesn't works in the real device WITHOUT CHANGES. finally it worked :-( NOW I HAVE ANOTHER PROBLEM :-( WHEN MY PHONE (SAMSUNG TAB) SWITCHS THE IMAGE FROM VERTICAL TO HORIZONTAL, THERE IS AN EXCEPTION THAT I DON'T KNOW HOW TO CATCH, AND THE APPL CRASH MAY SOMEBODY TELL ME WHATS GOING ON ? .. IS THERE SOMEWHERE AN EXAMPLE CODE TO DEAL WITH ? REGARDS ... On Jul 5, 7:15 am, Pepijn Van Eeckhoudt pep...@vaneeckhoudt.net wrote: On 04/07/2011 03:19, NikolaMKD wrote: Save it as resource in raw folder, load it as resource then try to copy it into app path. It does not need to be inside /databases folder. It can be anywhere (SDcard not recommended) Why is copying onto the sdcard not recommeded? Pepijn -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Installing APK + DB
about the screen orientation, i have included this line in the manfest: android:configChanges=orientation|keyboardHidden ... works :-) On Jul 5, 12:42 pm, hectordu...@yahoo.com hectordu...@yahoo.com wrote: thanK you guys, finallly I followed this link and works:www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-ap... i had some problems with the package name, which throws in error copying the database, and then with a table which wasn't found in the schema. it wasn't clear for me but i had to copy the sqlite file to the resources folder and also to the data/data/MYAPPL/database directory. anyway, i continuous without understanding why something that works in the emulator doesn't works in the real device WITHOUT CHANGES. finally it worked :-( NOW I HAVE ANOTHER PROBLEM :-( WHEN MY PHONE (SAMSUNG TAB) SWITCHS THE IMAGE FROM VERTICAL TO HORIZONTAL, THERE IS AN EXCEPTION THAT I DON'T KNOW HOW TO CATCH, AND THE APPL CRASH MAY SOMEBODY TELL ME WHATS GOING ON ? .. IS THERE SOMEWHERE AN EXAMPLE CODE TO DEAL WITH ? REGARDS ... On Jul 5, 7:15 am, Pepijn Van Eeckhoudt pep...@vaneeckhoudt.net wrote: On 04/07/2011 03:19, NikolaMKD wrote: Save it as resource in raw folder, load it as resource then try to copy it into app path. It does not need to be inside /databases folder. It can be anywhere (SDcard not recommended) Why is copying onto the sdcard not recommeded? Pepijn -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Installing APK + DB
That's good, but your application is still likely crash if you leave it by pressing Home, change the phone's language in Settings, and return to the app (via launcher icon or recent app list)... 05.07.2011 22:13, hectordu...@yahoo.com пишет: about the screen orientation, i have included this line in the manfest: android:configChanges=orientation|keyboardHidden ... works:-) -- Kostya Vasilyev -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Installing APK + DB
Mark, yes, i agree, the process is not right ... may you share with me a link which help me including my database into the apk file ? thanks in advance. On 3 jul, 17:59, Mark Murphy mmur...@commonsware.com wrote: On Sun, Jul 3, 2011 at 6:43 PM, hectordu...@yahoo.com hectordu...@yahoo.com wrote: I am trying to install my first ;-( Android application into a Samsung tab phone device but it does not start; i wonder if i am missig something in the process: 1- Appl needs a pre-existing sqlite database, which i have installed (eclipse+DDS+pull) into my development environment ... so, it is installed under data/data/MYAPPL/databases/myDB.db 2- the appl runs fine into the emulator 3- i have conected my phone device, start adb and have seen my device: ./adb kill-server ./adb start-server ./adb devices 4- i have installed (with sucess) my apk: ./adb install -l workspace/myAppl.apk DOES THE APK FILE INCLUDES THE DB ? Not based on anything you have described here. You manually copied the database to the device in step #1. That does not put the database inside of the APK file, any more than copying a file to a Windows PC automatically puts it inside an .MSI file. 5- disconnect my device: ./adb kill-server + unpluged BUT, THE APPLICATION DOES NOT START: ... application has stopped unexpectedly ... I think the problem is related with the database; maybe it does not exist, but i am tryin to see waths going on ... may somebody help me ? Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat and look at the stack trace associated with your error message. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Installing APK + DB
Save it as resource in raw folder, load it as resource then try to copy it into app path. It does not need to be inside /databases folder. It can be anywhere (SDcard not recommended) Thats how you ship external SQLiteDatabase. Google it how to ship external sqlite database android, there is sample codes (on one blog, i cant remember), but they must be modified based on your app requirements. They are just good for start. On Jul 4, 2:08 am, hectordu...@yahoo.com hectordu...@yahoo.com wrote: Mark, yes, i agree, the process is not right ... may you share with me a link which help me including my database into the apk file ? thanks in advance. On 3 jul, 17:59, Mark Murphy mmur...@commonsware.com wrote: On Sun, Jul 3, 2011 at 6:43 PM, hectordu...@yahoo.com hectordu...@yahoo.com wrote: I am trying to install my first ;-( Android application into a Samsung tab phone device but it does not start; i wonder if i am missig something in the process: 1- Appl needs a pre-existing sqlite database, which i have installed (eclipse+DDS+pull) into my development environment ... so, it is installed under data/data/MYAPPL/databases/myDB.db 2- the appl runs fine into the emulator 3- i have conected my phone device, start adb and have seen my device: ./adb kill-server ./adb start-server ./adb devices 4- i have installed (with sucess) my apk: ./adb install -l workspace/myAppl.apk DOES THE APK FILE INCLUDES THE DB ? Not based on anything you have described here. You manually copied the database to the device in step #1. That does not put the database inside of the APK file, any more than copying a file to a Windows PC automatically puts it inside an .MSI file. 5- disconnect my device: ./adb kill-server + unpluged BUT, THE APPLICATION DOES NOT START: ... application has stopped unexpectedly ... I think the problem is related with the database; maybe it does not exist, but i am tryin to see waths going on ... may somebody help me ? Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat and look at the stack trace associated with your error message. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Installing APK + DB
there is something i don't understand ... if the application works fine into the emulator: --- does not mean that it will work into de real device ? --- does not mean that the apk file is complete ... including the database ? --- directory: data/data/MYAPPL/databases is or not the right place for databases? regards On Jul 3, 8:19 pm, NikolaMKD nikola.despoto...@gmail.com wrote: Save it as resource in raw folder, load it as resource then try to copy it into app path. It does not need to be inside /databases folder. It can be anywhere (SDcard not recommended) Thats how you ship external SQLiteDatabase. Google it how to ship external sqlite database android, there is sample codes (on one blog, i cant remember), but they must be modified based on your app requirements. They are just good for start. On Jul 4, 2:08 am, hectordu...@yahoo.com hectordu...@yahoo.com wrote: Mark, yes, i agree, the process is not right ... may you share with me a link which help me including my database into the apk file ? thanks in advance. On 3 jul, 17:59, Mark Murphy mmur...@commonsware.com wrote: On Sun, Jul 3, 2011 at 6:43 PM, hectordu...@yahoo.com hectordu...@yahoo.com wrote: I am trying to install my first ;-( Android application into a Samsung tab phone device but it does not start; i wonder if i am missig something in the process: 1- Appl needs a pre-existing sqlite database, which i have installed (eclipse+DDS+pull) into my development environment ... so, it is installed under data/data/MYAPPL/databases/myDB.db 2- the appl runs fine into the emulator 3- i have conected my phone device, start adb and have seen my device: ./adb kill-server ./adb start-server ./adb devices 4- i have installed (with sucess) my apk: ./adb install -l workspace/myAppl.apk DOES THE APK FILE INCLUDES THE DB ? Not based on anything you have described here. You manually copied the database to the device in step #1. That does not put the database inside of the APK file, any more than copying a file to a Windows PC automatically puts it inside an .MSI file. 5- disconnect my device: ./adb kill-server + unpluged BUT, THE APPLICATION DOES NOT START: ... application has stopped unexpectedly ... I think the problem is related with the database; maybe it does not exist, but i am tryin to see waths going on ... may somebody help me ? Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat and look at the stack trace associated with your error message. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en