Tuesday, May 1, 2012

[android-developers] Re: How to use an AIDL across different package names?

Thanks Mark. I appreciate you confirming that this design is
possible. I hoped/assumed it would be similar to other languages and
platforms. Java/Android is not my primary development platform so I
appreciate your assistance letting me know I'm heading in the right
direction. The "cannot be resolved to a type" and "does not match the
expected package" errors I've been getting must be due to some other
issue how my project is setup. I'll work through those since the
design is valid.

On May 1, 11:37 am, Mark Murphy <mmur...@commonsware.com> wrote:
> On Tue, May 1, 2012 at 2:24 PM, Freddy <f...@charter.net> wrote:
> > I should have been more detailed in my original post.  I actually want
> > to provide this AIDL to multiple third-parties.  If each third-party
> > dropped in the AIDL in their solution then wouldn't that simple
> > refactor the name of the package?
>
> That last sentence did not parse.
>
> Suffice it to say that if you want seven billion apps to be able to
> call your service, then seven billion apps will have a
> src/com/mycompanyname/myservice directory with your AIDL in it.
>
> > My goal is to have a single service
> > (I can deliver a single apk - think of it as a common api or library
> > that can be called across many different activites) which can be
> > called by many different third-party activities.
>
> Correct.
>
> > I've been playing around with your sugestion with no luck.  It is
> > possible to keep the same service (and same package name) of the
> > service allowing other parties to call into my AIDL api?
>
> That is what I told you to do. The AIDL does not change. The service
> does not change. However, everybody wishing to invoke your AIDL
> service will need to create src/com/mycompanyname/myservice directory
> and put your AIDL in it.
>
> Remember: YOU are mycompanyname.com, per your original post. Hence,
> for seven billion client apps, each will use THE SAME
> src/com/mycompanyname/myservice directory name and THE SAME file with
> the AIDL, because that is what your service requires.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android App Developer Books:http://commonsware.com/books

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment