flutter_onestore_inapp 0.2.1 copy "flutter_onestore_inapp: ^0.2.1" to clipboard
flutter_onestore_inapp: ^0.2.1 copied to clipboard

PlatformAndroid

A Flutter plugin for in-app purchases. Exposes APIs for making in-app purchases through the ONEstore.

flutter_onestore_inapp #

GitHub CI GitHub release (with filter) Pub Version (including pre-releases) Pub Points

A flutter plugin for ONE store In-App Purchase.

For more information, see the Developer Center.

Getting started #

Pre-Preparations for ONE store IAP #

Installation #

  • Add package

    • Run this command with flutter:

        $ flutter pub add flutter_onestore_inapp
      
    • Add dependency to pubspec.yamlREADME.md

        dependencies:
          ..
          flutter_onestore_inapp: ^0.2.1
          ..
      
    • Click 'pub get' to download the package or run 'flutter pub get' from the command line.

  • Add dependencies to build.gradle

    • Add the maven address to the project's build.gradle

        allprojects {
          repositories {
          ..
          maven { url 'https://repo.onestore.co.kr/repository/onestore-sdk-public' }
          }
        }
      
  • Add to AndroidManifest.xml

    • If the Target SDK version is 30 (OS 11) or higher, the <queries> below must be added for the in-app library to operate properly.

        <manifest>
            ...
            <queries>
                <intent>
                    <action android:name="com.onestore.ipc.iap.IapService.ACTION" />
                </intent>
                <intent>
                    <action android:name="android.intent.action.VIEW" />
          
                    <data android:scheme="onestore" />
                </intent>
            </queries>
            ...
            <application>
                ...
            </application>
        </manifest>
      

Usage #

Import it and use in Dart code.

  import 'package:flutter_onestore_inapp/flutter_onestore_inapp.dart';

References

Proguard Rules #

It's already obfuscated and in aar, so add the package to the proguard rules.

# Core proGuard rules
-keep class com.gaa.sdk.base.** { *; }
-keep class com.gaa.sdk.auth.** { *; }

# Purchasing proGuard rules
-keep class com.gaa.sdk.iap.** { *; }

# Licensing proGuard rules
-keep class com.onestore.extern.licensing.** { *; }

Note #

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.

4
likes
160
pub points
67%
popularity

Publisher

unverified uploader

A Flutter plugin for in-app purchases. Exposes APIs for making in-app purchases through the ONEstore.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, json_annotation, plugin_platform_interface

More

Packages that depend on flutter_onestore_inapp