Pokoapp.xyz
  • Overview
    • 🛠️What we do
    • 😎Our vision
    • 📌Key products
    • 🤖Getting help & support
    • 👋Meet our team
  • Onramp Aggregator
    • What is Onramp Aggregator
    • Getting Started
    • Why use Onramp Aggregator
    • Onramp Aggregator dashboard
    • SDK integration & documentation
      • Web integration
        • Parameters
        • Redirect integration
        • Iframe integration
        • Customized integration
        • Theme customization
        • Quote API
        • URL signature
      • Mobile integration
        • Android native
        • Poko SDK for React Native
      • Dashboard API
      • Check availability of pairs API
      • Deployment examples
      • Support for integration
    • Dashboard
    • Testing guideline
    • Token coverage
    • Country & payment method coverage
    • Pricing
    • FAQs
  • Direct Checkout
    • What is Direct Checkout
    • Why use Direct Checkout
    • Integration
      • NFT Checkout & Defi
      • Wallet
        • Whitelist Endpoints
      • Setup Widget
      • Off-chain integration
    • Dashboard
    • Testing guideline
    • Country & payment method coverage
    • Pricing
    • KYC
  • Coverage
    • 🖇️Token coverage
    • 🌎Country & payment method coverage
    • 📋Request token & country coverage
  • Other resources
    • Readings about payments
Powered by GitBook
On this page
  1. Onramp Aggregator
  2. SDK integration & documentation
  3. Mobile integration

Android native

Installation

Implement pokopaymentsdk-release.aar to your project. Contact Poko's team at help@pokoapp.xyz to get this file.

Next, add the CAMERA permission to the AndroidManifest.xml of your application:

<uses-permission android:name="android.permission.CAMERA" />

Code Sample

import xyz.pokoapp.pokopaymentsdk.Environment;
import xyz.pokoapp.pokopaymentsdk.PokoPaymentSDK;
import xyz.pokoapp.pokopaymentsdk.WidgetOption;

String apiKey = 'YOUR API KEY';
String userID = 'Your user ID';
String walletAddress = 'Receiving wallet address';
String fiat = 'VND';
String crypto = 'USDT-bsc';
String[] fiatList = { "VND", "USD" };
String[] cryptoList = { "ETH-ethereum", "BTC-btc" };
String[] excludeProviderIds = { "provider_id_1", "provider_id_2" };
Environment env = Environment.STAGING; // or Environment.PRODUCTION
Activity mContext = getActivity();


// See full list of params here: https://pokoapp.gitbook.io/documentation/onramp-aggregator/sdk-integration-and-documentation/mobile-integration/android-native

WidgetOption options = new WidgetOption.Builder(
  userID // required
)
  .withFiat(fiat) // optional
  .withCrypto(crypto) // optional
  .withFiatAmount(1000.0) // optional, has higher priority than `withCryptoAmount`
  .withCryptoAmount(100.0) // optional
  .withReceiveWalletAddress(walletAddress) // optional
  .withFiat(fiat) // optional
  .withCrypto(crypto) // optional
  .withFiatList(fiatList) // optional
  .withCryptoList(cryptoList) // optional
  .withStrictMode(true) // optional
  .withExcludeProviderIds(excludeProviderIds) // optional
  .withProviderId("provider_id") // optional
  .withPaymentMethodId("payment_id") // optional
  .build();

PokoPaymentSDK.initialize(apiKey, env).launchWidget(mContext, options);
PreviousMobile integrationNextPoko SDK for React Native

Last updated 1 year ago