Langsung ke konten

Configure Android Sandbox Testing

Konten ini belum tersedia dalam bahasa Anda.

Testing in-app purchases requires proper configuration in Google Play Console. This guide will walk you through setting up sandbox testing for your Android app.

Prerequisites

You need an active Google Play Console account with a current subscription (renewed annually).

Setup Process

  1. Add Testing Account

    Navigate to your Google Play Console, select your app, and go to Setup > License testing.

    Add the primary Google account associated with the Android device you’re using for testing.

    Add testing account

  2. Create Testing Track

    Go to Testing > Closed testing or Testing > Internal testing and create a new track.

    You must upload at least one signed version of your app to this track.

    Create testing track

  3. Create Tester List

    After setting up the testing track, create an email list and add the testing device’s account email address.

    Create tester list

  4. Join Testing Program

    Open the opt-in URL from your test device and click the “Become a tester” button to enroll.

    Join testing

  5. Upload Signed APK

    Generate a signed APK or use Android App Bundle to upload your app to the testing track.

    Rolling out isn’t required - just upload and await approval.

    Upload APK

  6. Build and Test

    Run your app on the test device. When attempting a purchase, you should see a message:

    “This is a test order; you will not be charged.”

    Test purchase

Important Notes

  • Test accounts will not be charged for purchases
  • Test purchases use the same flow as production purchases
  • You can test all subscription features including trials and introductory offers
  • Test subscriptions have accelerated renewal periods for faster testing

Troubleshooting

Products not showing in test mode:

  • Ensure your app is uploaded to a testing track
  • Verify the test account is added to License testing
  • Check that products are active in Google Play Console

“Item not available” error:

  • Wait 2-3 hours after creating products for them to become available
  • Ensure your app’s package name matches the one in Play Console
  • Verify you’re signed in with a test account

Test purchases showing as real charges:

  • Double-check the account is added to License testing
  • Ensure you’re using the build from the testing track
  • Verify the testing banner appears during purchase

Additional Resources

For more details, refer to the official Google Play documentation on testing in-app purchases.