[android-developers] LinearLayout/TextView sizing

2010-06-08 Thread Matt (preinvent)
I'm trying to accomplish something fairly simple but struggling to get the right combination of layoutWidth/weight to make this work. I have a horizontally oriented LinearLayout with width fill_parent containing two TextViews. The TextView on the right has variable width text, and I want the

[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-04-06 Thread Matt (preinvent)
My Droid is up and running on an existing number under the 30 day free account. Is there any way of activating this phone on my own phone number? Verizon says the unit is assigned an existing number and that Google will have to release it. Has anyone requested this from Google? Any luck? Thanks

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-30 Thread Matt (preinvent)
On Mar 24, 4:40 pm, Doug dougforp...@gmail.com wrote: This problem happened to one of my users just today - he has a Droid. I asked if anything weird had happened before the problem occurred (like the phone misbehaving). He said: The only random weird behavior I noticed before the problem

[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-30 Thread Matt (preinvent)
Chattanooga, TN, USA. Droid arrived today via Fedex ground. Shipped 2010-03-26 from Brightpoint, 501 Airtech Parkway. Very grateful to Google... but if anyone in my area has a Nexus One they'd like to swap, let me now.. I already have a Droid! -- You received this message because you are

[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-03-22 Thread Matt (preinvent)
I'm still waiting (US). I'm updating my info here: http://blog.preinvent.com/free_droid_or_nexus_one -- 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

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-21 Thread Matt (preinvent)
To discount any possibility of concurrency problems I've synchronized the static getInstance on my singleton and every function that calls the DB (be it read or write). Makes no different though... it just wiped it all again. It must be a filesystem problem (delayed writes?), or something buggy

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-21 Thread Matt (preinvent)
Uh, have you considered changing out your flash chip just to disprove the notion that it's widespread? While sqlite certainly makes higher demand on the crappy underlying FAT file system, it also possible that it's just a hardware problem. I have a lot of users reporting this issue. All of

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-21 Thread Matt (preinvent)
1. Have you been getting reports of problems from Nexus One owners? In other words, is this a DROID/Milestone thing or a 2.0+ thing? Nope, Droid/Nilestone only, not Nexus One. I had one possible report from an HTC Hero owner, but have yet to confirm. Will follow up. 2. Are you writing other

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-19 Thread Matt (preinvent)
Well there it is: 03-19 22:43:02.624: ERROR/AndroidRuntime(2002): Caused by: android.database.sqlite.SQLiteDatabaseCorruptException: database disk image is malformed 03-19 22:43:02.624: ERROR/AndroidRuntime(2002): at android.database.sqlite.SQLiteQuery.native_fill_window(Native Method) 03-19

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-18 Thread Matt (preinvent)
Out of curiosity, why? Have you tried not doing this, and just using PreferenceManager.getDefaultSharedPreferences() everywhere, to see if this is somehow contributing to your woe? That's what the docs said when I read them! I'm loathe to change as all my disgruntled users who upgrade will

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-18 Thread Matt (preinvent)
Well, it could point to a different application, if you make the mistake of calling getApplicationContext() rather than getApplication(). So make sure to use getApplication() instead! I only see getApplication() for services and activities - how do I get this in my widget code and my

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-18 Thread Matt (preinvent)
(thought I posted this, can't see the post!) Well, it could point to a different application, if you make the mistake of calling getApplicationContext() rather than getApplication(). So make sure to use getApplication() instead! I only see getApplication on services and activities.. how do

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-18 Thread Matt (preinvent)
Still no nearer getting this fixed... I rooted my Droid and can see that the /data/data/myapp/lib directory was created some time ago - that implies to me that the main app directory has not been deleted since it was installed some time ago, therefore it's unlikely that android is simply

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-17 Thread Matt (preinvent)
On Mar 16, 5:21 pm, Bob Kerns r...@acm.org wrote: If you're using getDefaultSharedPreferences, you want to use getApplication() to get the context to supply. I'm using context.getSharedPreferences(constant string, 0) - ie i'm definitely specifying the same filename to every call., it's just

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-17 Thread Matt (preinvent)
The underlying getSharedPreferences() method takes a string, which is the unique set of preferences for that package.  Any context in that application using that same string will be working with the same preferences (hence why they are shared). The context I'm being passed may come from a

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-17 Thread Matt (preinvent)
The context I'm being passed may come from a service, widget update request, activity or broadcast receiver (from the BATTERY_CHANGE action).  Can I be sure that the context points to my application in all those instances? What else would it point to? That's pretty much my exact

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-17 Thread Matt (preinvent)
On Mar 17, 3:58 pm, Mark Murphy mmur...@commonsware.com wrote: That being said, you should consider whether doing database I/O in the BroadcastReceiver's onReceive() method is the right answer. That method is being invoked with foreground priority, which means any time you spend in that

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-17 Thread Matt (preinvent)
OK, my app just did this again - wiped my DB and the sharedpreferences that I set manually using the edit/putstring/commit system. However, it did NOT wipe the shared preferences set by my PreferenceActivity. I'm positive they're stored in the same place as I can iterate through the same shared

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-17 Thread Matt (preinvent)
OK, my app just did this again - wiped my DB and the sharedpreferences that I set manually using the edit/putstring/commit system. How did you do this? I can't reproduce it - sometimes it just does it. It seems more likely to happen after a power cycle but I can't make it happen when I

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-15 Thread Matt (preinvent)
One thing has just occurred to me. My app contains a service, an activity and a widget. Depending on what gets updated first, the database connection is instantiated using a Context from one of these. If it's instantiated with the Context from say the service, then at another point it's

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-14 Thread Matt (preinvent)
PM, Matt (preinvent) m...@preinvent.comwrote: I've had several reports (and experienced it once myself) of users of my app experiencing loss of all application data - both SharedPreferences and the SQLite database.  There's nothing in my code that could do this so there must be something

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-14 Thread Matt (preinvent)
This just happened yet again earlier today. Unfortunately I didn't get my Droid hooked up to adb quick enough to look through the logs. Guess I'll have to wait until next time :( This is killing me! On Mar 14, 5:47 pm, Matt (preinvent) m...@preinvent.com wrote: I didn't get any corrupt DB

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-14 Thread Matt (preinvent)
On Mar 14, 8:31 pm, Mark Murphy mmur...@commonsware.com wrote: This is killing me! Hopefully not. Dead developers make no sales. Neither do developers with unhappy customers! More seriously, consider hooking into Android Log Collector or something, so that when you detect this

[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-14 Thread Matt (preinvent)
ForSharedPreferencesthis isn't unheard of but I'd question an issue with SQLite. Perhaps users got irritated that things went haywire as a result of the missingSharedPreferences, and reinstalled the app. This happened to me earlier today on my Droid. I didn't uninstall/ reinstall so I know

[android-developers] Application losing SharedPreferences and Sqlite database on Droid

2010-03-13 Thread Matt (preinvent)
I've had several reports (and experienced it once myself) of users of my app experiencing loss of all application data - both SharedPreferences and the SQLite database. There's nothing in my code that could do this so there must be something going on at a lower level. I've only had reports from

[android-developers] Recommendations for split app (eg free/pro versions using 95% the same code)

2010-03-12 Thread Matt (preinvent)
I have a free app out there and am going to write a pro version with some extra functionality that I'll charge for. The plan is to use the same code for both apps, although I need different Eclipse projects to use different manfiest files. The obvious way is to have all my code in a shared