Question

I need to use the In App Billing service in my app. I'm wondering if i can put the generated .java in a package and reference it instead of using IInAppBillingService.aidl.

In theory, couldn't it make the same communication with the service?

Was it helpful?

Solution

Of course, you can use Java generated files instead of AIDL. Basically, AIDL interface is translated into java files during the compilation of your program and then is not used anymore. This pattern is used sometimes in Android platform programming (for instance, ActivityManager is not created from AIDL interface but there are separate java files that implement proxy and stub interfaces). I think that you can just take a generated java file from AIDL and put it directly in your service and client projects.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top