On Thu, Jan 17, 2013 at 4:14 PM, Jake Colman <[email protected]> wrote:

> When the application is recreated I assume that
> it loses the previous incarnations shared preferences and, therefore,
> the service doesn't know that it already triggered.  Hence, the false
> trigger when the application is recreated.
>

SharedPreferences are persisted if you commit them so any prefs you set in
one call to Application.onCreate() should be available in the next call and
throughout the rest of the app.


>    T> That would indicate your process was killed and restarted. If the
>    T> widget was the only thing you have running, then either it or
>    T> perhaps the home screen it was running on were killed. Not likely,
>    T> but possible.
>
> I don't see any reason why I should have been killed.  I checked with my
> user and they are not using a task killer.
>

The HomeScreen could crash and have to restart, among other unlikely but
possible scenarios.


>    T> Why do this check in onCreate? Why not do it strictly when the
>    T> widget is installed?
>
> Which check?  Did my earlier paragraph explain what I think is happening?
>

Your check for whether the notification should be triggered. I thought you
were doing it in Application.onCreate, but I might have misunderstood.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to