[android-developers] Re: Solved Preferences Reset Problem

2009-02-22 Thread Eric B
Is the code generalized for any preferences? Either way, I'd like to see how you've done it as I've had problems using a database for preferences. Thanks, Eric On Sun, Feb 22, 2009 at 4:35 PM, JP wrote: > I removed it after storing a copy of the preferences in a SQLITE > database table now. >

[android-developers] Re: Solved Preferences Reset Problem

2009-02-11 Thread Eric B
I've fought doing that myself, especially because you can't use the PreferenceActivity and have to redo your entire UI. It would be really cool if we could plug in different "Preference" storage solutions. One could be the SharedPreferences object, but another could be a database. By having a Sh

[android-developers] Re: Preferences not saved *sometimes*

2009-02-11 Thread Eric B
Make sure you add android:presistent="true" to your PreferenceScreen element in your preferences xml file. Thanks, Eric On Jan 23, 8:17 am, A T wrote: > Hmm. I'm going to feel stupid if this is the problem: I'm reinstantiating > the preferences object and its editor every time I load them and

[android-developers] Re: Solved Preferences Reset Problem

2009-02-10 Thread Eric B
I believe there is still the multi-thread access problem I posted about before. If you have a receiver (like I do) and it has a reference to the SharedPreferences for your application opened, then your application tries to get the preferences, a blank SharedPreferences object will be returned. T

[android-developers] Solved Preferences Reset Problem

2009-02-07 Thread Eric B
A while ago, I posted (see links below) about a problem with my app. Whenever the app was killed by the OS, either memory cleanup or device restart, all the preferences were reset. Since my app worked entirely from those preferences, it made it pretty much useless. I found out that persistent fo

[android-developers] Re: SharedPreferences problem

2008-11-19 Thread Eric B
What I'm taking from this is that if my BroadcastReceiver, which runs off an AlarmManager, is accessing the preferences and the user then opens the PreferenceActivity in a separate process the behavior is undefined and most likely causes the PreferenceActivity to not "find" the existing values? I

[android-developers] SharedPreferences problem

2008-11-18 Thread Eric B
I have a PreferenceActivity that uses an xml file to automatically populate and save the preferences. Sometimes though, when that activity is started, the preferences are blank. However, if you go back later, they will reappear. This is causing a lot of headaches with my app. I have a Service

[android-developers] Re: Connect via USB resets prefs

2008-11-11 Thread Eric B
Now I'm not sure what clears my preferences. I've tested the USB connection theory and it is quite inconsistent. Has anyone else experienced a loss of preference state in their apps? Thanks, Eric --~--~-~--~~~---~--~~ You received this message because you are sub

[android-developers] Connect via USB resets prefs

2008-11-06 Thread Eric B
I wrote an app, GReader Notifier (http://www.ebessette.com/d/ greadernotifier), that I've published to the Market. However, every time someone connects their G1 to their computer via USB, the preferences get reset, which basically stops the application from working as users expect. One user repo

[android-developers] Re: Lock view orientation?

2008-11-04 Thread Eric B
Cool, thanks. --~--~-~--~~~---~--~~ 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 [EMAIL P

[android-developers] Lock view orientation?

2008-11-04 Thread Eric B
I'd like my app to always display like the keyboard on the G1 is hidden (portrait). I've looked at the Window API and search the forums, but I couldn't figure out how to specify this. Anyone know if this is possible? Thanks, Eric --~--~-~--~~~---~--~~ You receiv

[android-developers] Using a web site intent and browser windows?

2008-10-31 Thread Eric B
I have an app that uses a web site intent, i.e. new Intent( context, "http://web.site.address"; ), when a user selects a notification. Each time the user does this, a new browser window is opened, even if there is an existing window open to that site. Is there a way to name a browser window when

[android-developers] Re: Keeping a service alive?

2008-10-28 Thread Eric B
Perfect, that's what I was looking for. Thanks for your help. --~--~-~--~~~---~--~~ 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 uns

[android-developers] Re: Multiple notifications difficulties...

2008-10-27 Thread Eric B
If message.getId() is different for each notification, then I believe Android will create a new icon in the status bar. You need to use the same id sent to the NotificationManager.notify() method if you want a single notification to be updated. Thanks, Eric --~--~-~--~~~-

[android-developers] Keeping a service alive?

2008-10-27 Thread Eric B
I have created a service that runs a Timer and TimerTask. That timer may fire every 5 minutes to 4 hours, depending on the user's settings. My problem is that my service eventually gets destroyed. Is there a setting to keep it alive, or someway to tell the OS to restart it once enough resources

[android-developers] Re: Easy way to get Google SID

2008-10-26 Thread Eric B
I found the "android.permission.GET_ACCOUNTS" permission and there is a Google Accounts application (in the Application Manager), so it looks like there is support in the OS for this information. I tried Context.getSystemService( "account" ) and Context.getSystemService( "accounts" ) just in case

[android-developers] Easy way to get Google SID

2008-10-25 Thread Eric B
I created this issue in the Android issue tracker, http://code.google.com/p/android/issues/detail?id=1073, but I was wonder (apart from doing it yourself using an HttpClient) if anyone know of how to get a Google SID in Android? Thanks, Eric --~--~-~--~~~---~--~~ Y

[android-developers] Re: ListActivity with CursorAdaptor and updating

2008-10-18 Thread Eric B
I'm using version 1.0_r1 --~--~-~--~~~---~--~~ 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 t

[android-developers] ListActivity with CursorAdaptor and updating

2008-10-18 Thread Eric B
If you are creating a ListActivity with a CursorAdapter (or SimpleCursorAdapter), then you may want to have the list updated at some point. I had a little trouble figuring this out myself, so I thought I'd post how to do it. After updating your database, you want to get the cursor from the adapt

[android-developers] Intercept key events across apps?

2008-09-28 Thread Eric B
I use an app for my Palm Treo called KeyCaps. It allows you to configure two key actions for every app on the phone. The first is holding a key down. I have this set to capitalize the character. The second is pressing the key twice quickly, which changes the character entered to the Alt entry

[android-developers] Re: Intercept incoming call

2008-09-27 Thread Eric B
One of the best apps I've every bought for my Treo 600/650 is an app that lets you assign specific ring tones (really mp3 files) to specific contacts or groups of contacts. I especially like the ability to turn off the ringer and vibrator for calls with no caller id. I don't think this kind of a