am 604ae4c7: am 552e5ce6: Merge "Doc change: Add note to use explicit intent when binding to billing service." into klp-modular-docs
* commit '604ae4c79e67be6be19724e03f35b9e6cc3fd617': Doc change: Add note to use explicit intent when binding to billing service.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
page.title=In-app Billing Version 3
|
page.title=In-app Billing API
|
||||||
parent.title=In-app Billing
|
parent.title=In-app Billing
|
||||||
parent.link=index.html
|
parent.link=index.html
|
||||||
|
page.tags="billing, inapp, iap"
|
||||||
@jd:body
|
@jd:body
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
<div id="qv-wrapper">
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
page.title=Implementing In-app Billing <span style="font-size:16px;">(IAB Version 3)</span>
|
page.title=Implementing In-app Billing
|
||||||
parent.title=In-app Billing
|
parent.title=In-app Billing
|
||||||
parent.link=index.html
|
parent.link=index.html
|
||||||
|
page.tags="inapp, billing, iap"
|
||||||
@jd:body
|
@jd:body
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
<div id="qv-wrapper">
|
||||||
@@ -141,15 +142,17 @@ ServiceConnection mServiceConn = new ServiceConnection() {
|
|||||||
};
|
};
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>In your activity’s {@link android.app.Activity#onCreate onCreate} method, perform the binding by calling the {@link android.content.Context#bindService bindService} method. Pass the method an {@link android.content.Intent} that references the In-app Billing service and an instance of the {@link android.content.ServiceConnection} that you created.</p>
|
<p>In your activity’s {@link android.app.Activity#onCreate onCreate} method, perform the binding by calling the {@link android.content.Context#bindService bindService} method. Pass the method an {@link android.content.Intent} that references the In-app Billing service and an instance of the {@link android.content.ServiceConnection} that you created, and explicitly set the Intent's target package name to <code>com.android.vending</code> — the package name of Google Play app.</p>
|
||||||
<pre>
|
|
||||||
@Override
|
<p class="caution"><strong>Caution:</strong> To protect the security of billing transactions, always make sure to explicitly set the intent's target package name to <code>com.android.vending</code>, using {@link android.content.Intent#setPackage(java.lang.String) setPackage()} as shown in the example below. Setting the package name explicitly ensures that <em>only</em> the Google Play app can handle billing requests from your app, preventing other apps from intercepting those requests.</p>
|
||||||
|
|
||||||
|
<pre>@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
bindService(new
|
Intent serviceIntent = new Intent("com.android.vending.billing.InAppBillingService.BIND");
|
||||||
Intent("com.android.vending.billing.InAppBillingService.BIND"),
|
serviceIntent.setPackage("com.android.vending");
|
||||||
mServiceConn, Context.BIND_AUTO_CREATE);
|
bindService(serviceIntent, mServiceConn, Context.BIND_AUTO_CREATE);
|
||||||
</pre>
|
</pre>
|
||||||
<p>You can now use the mService reference to communicate with the Google Play service.</p>
|
<p>You can now use the mService reference to communicate with the Google Play service.</p>
|
||||||
<p class="note"><strong>Important:</strong> Remember to unbind from the In-app Billing service when you are done with your {@link android.app.Activity}. If you don’t unbind, the open service connection could cause your device’s performance to degrade. This example shows how to perform the unbind operation on a service connection to In-app Billing called {@code mServiceConn} by overriding the activity’s {@link android.app.Activity#onDestroy onDestroy} method.</p>
|
<p class="note"><strong>Important:</strong> Remember to unbind from the In-app Billing service when you are done with your {@link android.app.Activity}. If you don’t unbind, the open service connection could cause your device’s performance to degrade. This example shows how to perform the unbind operation on a service connection to In-app Billing called {@code mServiceConn} by overriding the activity’s {@link android.app.Activity#onDestroy onDestroy} method.</p>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
page.title=In-app Billing Reference <span style="font-size:16px;">(IAB Version 3)</span>
|
page.title=In-app Billing Reference
|
||||||
parent.title=In-app Billing
|
parent.title=In-app Billing
|
||||||
parent.link=index.html
|
parent.link=index.html
|
||||||
@jd:body
|
@jd:body
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
page.title=Google Play In-App Subscriptions
|
page.title=In-App Subscriptions
|
||||||
parent.title=In-app Billing
|
parent.title=In-app Billing
|
||||||
parent.link=index.html
|
parent.link=index.html
|
||||||
page.metaDescription=Subscriptions let you sell content or features in your app with automated, recurring billing.
|
page.metaDescription=Subscriptions let you sell content or features in your app with automated, recurring billing.
|
||||||
page.image=/images/play_dev.jpg
|
page.image=/images/play_dev.jpg
|
||||||
page.tags="inapp, iap, billing"
|
page.tags="subscriptions, billing, inapp, iap"
|
||||||
meta.tags="monetization, inappbilling, subscriptions"
|
meta.tags="monetization, inappbilling, subscriptions"
|
||||||
@jd:body
|
@jd:body
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
page.title=Testing In-app Billing
|
page.title=Testing In-app Billing
|
||||||
parent.title=In-app Billing
|
parent.title=In-app Billing
|
||||||
parent.link=index.html
|
parent.link=index.html
|
||||||
|
page.tags="inapp, billing, iap"
|
||||||
@jd:body
|
@jd:body
|
||||||
|
|
||||||
<div id="qv-wrapper">
|
<div id="qv-wrapper">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ page.title=Google Play In-app Billing
|
|||||||
page.metaDescription=In-app Billing lets you sell digital content as one-time purchases or subscriptions.
|
page.metaDescription=In-app Billing lets you sell digital content as one-time purchases or subscriptions.
|
||||||
page.image=/images/play_dev.jpg
|
page.image=/images/play_dev.jpg
|
||||||
meta.tags="monetizing, inappbilling, subscriptions"
|
meta.tags="monetizing, inappbilling, subscriptions"
|
||||||
page.tags="inapp, iap, subscriptions"
|
page.tags="billing, inapp, iap"
|
||||||
@jd:body
|
@jd:body
|
||||||
|
|
||||||
<p>In-app Billing is a Google Play service that lets you sell digital content from inside
|
<p>In-app Billing is a Google Play service that lets you sell digital content from inside
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
excludeFromSuggestions=true
|
||||||
page.title=In-app Billing Version Notes
|
page.title=In-app Billing Version Notes
|
||||||
@jd:body
|
@jd:body
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user