If you only need a single instance of your activity, and both activity and service run in the same process, one could even use static variables to pass data between the two.
Peli www.openintents.org On Jun 29, 3:03 pm, GAYET Thierry <[email protected]> wrote: > Hi, yes when my application starts, i am getting one data buildin into the > service. The data is not very big so i am interested with you solution. Do > you have an example of using sharedpreferences to exchange data as you told > me ? > > Furtheremore, what's the best way to manage the security around the data > access. In other word i don't want that all apllications can access to the > data located in the service. Is there such ACL (access control list) adapt > for application, maybe using the AndroidManifest.xml ? > > Cordialement > > Thierry GAYET > NextInnovation.org > +33(0)663.849.589 > > ________________________________ > De : Christine <[email protected]> > À : Android Developers <[email protected]> > Envoyé le : Lundi, 29 Juin 2009, 14h47mn 15s > Objet : Re: Re : Re : [android-developers] Re: Sharing data between an > Android service and an application. > > If you only need to provide some parameters at startup, you can do > that in the onbind intent. If you don't need tight coupling between > activity and service and the amount of data is very limited, you can > use sharedpreferences to exchange data. > > On Jun 29, 2:38 pm, GAYET Thierry <[email protected]> wrote: > > > Thanks for those informations. I will see about. > > > I have planned to buy your book this week. Is there a date for printing the > > two other books from commonsware.com ? > > > Cordialement > > > Thierry GAYET > > NextInnovation.org > > +33(0)663.849.589 > > > ________________________________ > > De : Mark Murphy <[email protected]> > > À : [email protected] > > Envoyé le : Lundi, 29 Juin 2009, 14h00mn 14s > > Objet : Re: Re : [android-developers] Re: Sharing data between an Android > > service and an application. > > > GAYET Thierry wrote: > > > Hi, my service implement a security protocol that contain a certificate. > > > My application (i have written too) > > > > I have heard aidl communication that can be used between a service and > > > an application but don't know how to use it too. I need some more > > > information about. > > > A fair bit of documentation can be found here: > > >http://developer.android.com/guide/developing/tools/aidl.html > > > The SDK also contains sample code implementing AIDL: > > > ApiDemos/src/com/example/android/apis/app/IRemoteServiceCallback.aidl > > ApiDemos/src/com/example/android/apis/app/IRemoteService.aidl > > ApiDemos/src/com/example/android/apis/app/ISecondary.aidl > > > You can also find sample code for remote services from my _Android > > Programming Tutorials_ book page: > > >http://commonsware.com/AndTutorials/ > > > AIDL is also covered in the following print books: > > > _Beginning Android_ (by yours truly) > > _Professional Android Application Development_ (by Reto Meier) > > > -- > > Mark Murphy (a Commons > > Guy)http://commonsware.com|http://twitter.com/commonsguy > > > Android App Developer Books:http://commonsware.com/books.html --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

