Re: [android-developers] Re: Notification and PendingIntents

2012-02-23 Thread TreKing
On Thu, Feb 23, 2012 at 12:59 AM, 涂涛 ttgdztu...@gmail.com wrote:

 if you want to persist your data,you must use somthing like
 database(SQLiteDatabase in android),or you can use SharedPreference.


Or regular old files, or cloud storage.
http://developer.android.com/guide/topics/data/data-storage.html

-
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 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: Notification and PendingIntents

2012-02-22 Thread Kookamonga
I won't argue that a setting in SharedPreferences won't work...

But at the same time, shouldn't it be possible to do this just with
the Intent itself? If you use the putExtra method on your intent and
add just a simple boolean that indicates that the button should be set
to on, I would think this would work. Did I miss something?

On Feb 22, 9:51 am, TreKing treking...@gmail.com wrote:
 On Wed, Feb 22, 2012 at 4:46 AM, Haddi pranavraul...@gmail.com wrote:
  I want to retain the state of this button when the activity is launched

 http://developer.android.com/reference/android/content/SharedPreferen...

 --- 
 --
 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 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: Notification and PendingIntents

2012-02-22 Thread TreKing
On Wed, Feb 22, 2012 at 9:12 AM, Kookamonga site...@yahoo.ca wrote:

 But at the same time, shouldn't it be possible to do this just with the
 Intent itself? If you use the putExtra method on your intent and add just a
 simple boolean that indicates that the button should be set to on, I would
 think this would work. Did I miss something?


Yes, that should work fine. I took the OP's statement of retain the state
to indicate that this was something he hoped to persist, beyond his
Notification. In which case, IMO, the SharedPreference would be the most
logical solution.

Of course, these are all assumptions until the OP clarifies his intentions.

-
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 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: Notification and PendingIntents

2012-02-22 Thread 涂涛
if you want to persist your data,you must use somthing like
database(SQLiteDatabase in android),or you can use SharedPreference.

On Wed, Feb 22, 2012 at 11:41 PM, TreKing treking...@gmail.com wrote:

 On Wed, Feb 22, 2012 at 9:12 AM, Kookamonga site...@yahoo.ca wrote:

 But at the same time, shouldn't it be possible to do this just with the
 Intent itself? If you use the putExtra method on your intent and add just a
 simple boolean that indicates that the button should be set to on, I would
 think this would work. Did I miss something?


 Yes, that should work fine. I took the OP's statement of retain the
 state to indicate that this was something he hoped to persist, beyond his
 Notification. In which case, IMO, the SharedPreference would be the most
 logical solution.

 Of course, these are all assumptions until the OP clarifies his intentions.


 -
 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 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


-- 
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