Google Play will always be launched as a separate *process*, as Mark
already pointed out above.
It may or may not be on the requesting app's activity stack, depending on
the Android version (1.6 or above - although I suspect one would have to
search high and low for a 1.6 device at this time).
Here is a logcat snippet from my own app's purchase process:
06-14 14:13:19.401 I/WifiControlActivity( 4977): Entering onStop
06-14 14:13:20.854 I/ActivityManager( 192): START
{act=android.intent.action.VIEW
cmp=com.android.vending/com.google.android.finsky.activities.IabActivity
(has extras)} from pid -1
06-14 14:13:21.354 I/ActivityManager( 192): Displayed
com.android.vending/com.google.android.finsky.activities.IabActivity: +453ms
06-14 14:13:21.581 I/ActivityManager( 192): Start proc
com.google.android.gsf.login for service
com.google.android.gsf.login/com.google.android.gsf.loginservice.GoogleLoginService:
pid=5023 uid=10010 gids={3003, 1015, 1007, 2001, 3006}
06-14 14:13:22.729 W/Finsky ( 4305): [1] CarrierParamsAction.run: Saving
carrier billing params failed.
06-14 14:13:26.776 E/Finsky ( 4305): [1] CheckoutPurchase.setError:
type=IAB_PERMISSION_ERROR, code=12, message=null
My app's pid is 4977, and Market's pid is 4305.
This page has a boilerplate snippet to launch Market's purchase screen:
http://developer.android.com/guide/market/billing/billing_integrate.html#billing-service
Search for "Using the pending intent", it's at the very end of the section.
There is a short note after the code snippet that's also worth checking out:
Important: You must launch the pending intent from an activity context and
not an application context. Also, you cannot use the singleTop launch mode
to launch the pending intent. If you do either of these, the Android system
will not attach the pending intent to your application process. Instead, it
will bring Google Play to the foreground, disrupting your application.
-- K
2012/6/14 Floyd <[email protected]>
> Can someone answer the below question? I have been testing this app, and
> when the app is launched, and the BUY button is pressed for an in-app
> purchase, It launches google play as a separate process. While testing a
> similar app "COMIXOLOGY" when making an in-app purchase, it *does not*launch
> google play as a process. In comixology it just shows the google
> play purchase page and goes away / returns to the app once you make the
> purchase.
>
>
> On Wednesday, June 13, 2012 10:30:31 AM UTC-4, kadmos wrote:
>
> Can some one at least verify for me that Google Play being launched as a
> separate process is NOT the correct behavior of an in-app billing activity?
>
> --
> 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
>
--
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