in_app_purchase_android 0.3.6+6 in_app_purchase_android: ^0.3.6+6 copied to clipboard
An implementation for the Android platform of the Flutter `in_app_purchase` plugin. This uses the Android BillingClient APIs.
in_app_purchase_android #
The Android implementation of in_app_purchase
.
Usage #
This package is endorsed, which means you can simply use in_app_purchase
normally. This package will be automatically included in your app when you do,
so you do not need to add it to your pubspec.yaml
.
However, if you import
this package to use any of its APIs directly, you
should add it to your pubspec.yaml
as usual.
Alternative/UserChoice Billing #
Alternative and UserChoice billing from Google Play is exposed from this package.
Using the Alternative billing only feature requires Google Play app configuration, checking if the feature is available (isAlternativeBillingOnlyAvailable
) and informing users that Google Play does not handle all aspects of purchase (showAlternativeBillingOnlyInformationDialog
). After those calls then you can call setBillingChoice
and respond when a user attempts a purchase.
Google Play documentation for Alternative billing
Migrating to 0.3.0 #
To migrate to version 0.3.0 from 0.2.x, have a look at the migration guide.
Contributing #
This plugin uses
json_serializable for the
many data structs passed between the underlying platform layers and Dart. After
editing any of the serialized data structs, rebuild the serializers by running
flutter packages pub run build_runner build --delete-conflicting-outputs
.
flutter packages pub run build_runner watch --delete-conflicting-outputs
will
watch the filesystem for changes.
If you would like to contribute to the plugin, check out our contribution guide.