[android-developers] Re: Re : passing data between activities

2012-03-27 Thread Ali Chousein
Google for android pass data between activities and you'll find
multiple discussion threads on this. Since I'm a nice guy (:-P) I
copied and pasted the first one from the list for you
http://stackoverflow.com/questions/2091465/how-do-i-pass-data-between-activities-in-android

But seriously, if you google for what you are looking for, chances are
high that you'll get an answer to your question in 5 mins. Otherwise
you need to spend 10 mins to post your question here, wait some hours/
days hoping that someone is going to answer it, etc etc etc

-
Ali Chousein
http://socialnav.blogspot.com | http://twitter.com/socialnav1
http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy
http://www.codeproject.com/KB/android/PayGol-Android.aspx
http://geo-filtered-assistant.blogspot.com

-- 
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: Re : passing data between activities

2012-03-27 Thread Anieeh
Hi Vivek
   you have created Intent for starting activity and passed intent as
a parameter in startActivity(Intent) method
like this in A class

  Intent intent = new Intent(this, B.class);
  intent.putExtra(Voilation1, USING CELLULAR PHONE WHILE
DRIVING(H));
  intent.putExtra(Place1,chetpet signal);
  startActivity(intent);

And In Class B Retrieve values in onCreate() method like this

   String strVoilation1 =
getIntent().getStringExtra(Voilation1);
   String strPlace1 = getIntent().getStringExtra(Place1);

That's it
Or you can put the Serialized object or parceble object in the intent
in your case you have a list of object of Voilations and Places,
create a model class of it add each object in the ArrayList
and put ArrayList into Intent, since ArrayList implemented
serializable interface you can add it into intent.
And get serialized object from other activity as a key value object
from the intent.

Thanks  Regards
 Animesh Sinha

On Mar 26, 3:53 pm, vivek elangovan elangovan.vi...@gmail.com wrote:
 Using DOMParser i m getting values and passing it to my IInd activity.In my
 IInd activity i need to display like this

 Violation : USING CELLULAR PHONE WHILE DRIVING(H)

 Place : chetpet signal

 Violation : WITHOUT HELMET

 Place : Tnagar signal







 On Monday, March 26, 2012 4:20:26 PM UTC+5:30, vivek elangovan wrote:

  Hi,
        This is how my xml looks like

  remarks
              offense
                  violationWITHOUT HELMET/violation
                  rule177-A/rule
                  amnt100/amnt
                  date26-3-2012/date
                  placechetpet signal/place
              /offense
              offense
                  violationUSING CELLULAR PHONE WHILE
  DRIVING(H)/violation
                  rule177-H/rule
                  amnt1000/amnt
                  date20-3-2012 /date
                  placeTnagar signal /place
              /offense
          /remarks

  On Monday, March 26, 2012 3:03:38 PM UTC+5:30, vivek elangovan wrote:

  hi members,
                      I am having two activities in my project, In my Ist
  activity i m getting two values from my loop (for eg : Violation : WITHOUT
  HELMET and Violation : USING CELLULAR PHONE WHILE DRIVING(H) ) using
  putExtra i am passing these values to my IInd activity,what i need to
  display here is like this :

  violation : WITHOUT HELMET
  place : some place

  Violation : USING CELLULAR PHONE WHILE DRIVING(H)
  place : some place

-- 
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: Re : passing data between activities

2012-03-26 Thread vivek elangovan
Hi,
  This is how my xml looks like

remarks
offense
violationWITHOUT HELMET/violation
rule177-A/rule
amnt100/amnt
date26-3-2012/date
placechetpet signal/place
/offense
offense
violationUSING CELLULAR PHONE WHILE DRIVING(H)/violation
rule177-H/rule
amnt1000/amnt
date20-3-2012 /date
placeTnagar signal /place
/offense
/remarks

On Monday, March 26, 2012 3:03:38 PM UTC+5:30, vivek elangovan wrote:

 hi members,
 I am having two activities in my project, In my Ist 
 activity i m getting two values from my loop (for eg : Violation : WITHOUT 
 HELMET and Violation : USING CELLULAR PHONE WHILE DRIVING(H) ) using 
 putExtra i am passing these values to my IInd activity,what i need to 
 display here is like this :

 violation : WITHOUT HELMET
 place : some place

 Violation : USING CELLULAR PHONE WHILE DRIVING(H)
 place : some place


-- 
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: Re : passing data between activities

2012-03-26 Thread vivek elangovan
Using DOMParser i m getting values and passing it to my IInd activity.In my 
IInd activity i need to display like this

Violation : USING CELLULAR PHONE WHILE DRIVING(H)

Place : chetpet signal


Violation : WITHOUT HELMET

Place : Tnagar signal 

On Monday, March 26, 2012 4:20:26 PM UTC+5:30, vivek elangovan wrote:

 Hi,
   This is how my xml looks like

 remarks
 offense
 violationWITHOUT HELMET/violation
 rule177-A/rule
 amnt100/amnt
 date26-3-2012/date
 placechetpet signal/place
 /offense
 offense
 violationUSING CELLULAR PHONE WHILE 
 DRIVING(H)/violation
 rule177-H/rule
 amnt1000/amnt
 date20-3-2012 /date
 placeTnagar signal /place
 /offense
 /remarks

 On Monday, March 26, 2012 3:03:38 PM UTC+5:30, vivek elangovan wrote:

 hi members,
 I am having two activities in my project, In my Ist 
 activity i m getting two values from my loop (for eg : Violation : WITHOUT 
 HELMET and Violation : USING CELLULAR PHONE WHILE DRIVING(H) ) using 
 putExtra i am passing these values to my IInd activity,what i need to 
 display here is like this :

 violation : WITHOUT HELMET
 place : some place

 Violation : USING CELLULAR PHONE WHILE DRIVING(H)
 place : some place



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