Search code examples
androidandroid-ndkgoogle-playbilling

Will in-app billing be available through the NDK?


I'm looking in to creating a game through the NDK using a NativeApplication for Gingerbread. I also want to be able to use the new in-app billing API Google is providing to developers though. I know it's not a finalized API just yet but I haven't seen an example of interacting with it through the NDK.

Does anyone have an idea of how it could be possible to use the in-app billing through the NDK or should I look into launching another Activity that uses the Java API?


Solution

  • The in-app billing API is a Binder interface. When you make a purchase request, the Market application takes over and displays a (partially transparent) activity on top of yours, which renders the purchase dialog.

    If you want to access this through the NDK, my advice would be to make a bridge to the sample code we provide using JNI. I don't believe you have access to the Binder from the NDK.