Intent FileViewActivity = new Intent(this, FileView.class);
        FileViewActivity.putExtra("file",file.mFileName);

This code in activity is an intent to the FileView  class may be ur service
        Intent recievedIntent = getIntent();
        opendFileName = recievedIntent.getStringExtra("file");
This code in ur service which recieves the intent...
This worked for me, might help u too.


2009/5/15 abdelkarim bezi <beziabdelkar...@gmail.com>

> hi everybody, i'm an a beginner in android
> i have developed a service which get GPS location , it works good (it works
> in its own process)
> i have another activity in my application who need the value of this
> location but i can't read this value from the class service
> my question is how to share variable between activity and service? and how
> how to communicate them?
> i need an example.
> thanks to all.
>
>
> >
>


-- 
Cheers
(: Naveen Krishna Ch :)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to