This is a sample Android app designed for developers to demonstrate the main flows and integration with the Temp-Number Backend. The app allows users to purchase virtual mobile numbers to receive SMS messages online, SMS activation, OTP verification, and SMS Activate workflows. The Temp-Number Backend is a ready-to-use open-source backend, providing all necessary functionality for seamless app integration and SMS management.
Sample App Screenshots:
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
-
Primary App Features:
- User Authentication: Supports Firebase Authentication (Google Sign-In, Email, etc.).
- Service and Country Pricing: Displays pricing for selected services and countries.
- Temporary Number Ordering: Users can order numbers and manage active/expired numbers.
- SMS Handling: Receives and displays SMS messages.
- Report Issues: Users can submit and track reports.
- Payments: Supports Google Play and Stripe for account balance top-ups.
- Transaction History: Provides a record of financial transactions.
-
Backend
- The app interacts with the Temp-Number Backend via Backend API for SMS orders, management, and processing.
-
Payments (Google Play & Stripe)
- Google Play In-App purchases and Stripe are integrated for secure balance top-ups, with backend handling verification for purchases and refunds.
Follow these steps to set up the project on your local machine.
- Temp Number Backend installed
- Google Play Developer account (optional, required for in-app purchases)
Clone this repository to your local machine.
This project requires Firebase for authentication. Both Temp Number Backend and this Android app will use the same Firebase project.
You should already have a Firebase project if you followed the Temp Number Backend setup. If not, please install Temp Number Backend first.
Add Android App to Firebase project:
- Follow the Firebase setup documentation to add an Android app to your project.
- Use a unique
applicationId(e.g.,com.yourcompany.yourapp). You will use this in Step 4. - Download the
google-services.jsonfile. You will add this to the project in Step 4. - If using Google Sign-In, add your SHA-1 fingerprint in Project Settings > General > Your apps > Android.
Now, configure the cloned Android app to connect to your services.
-
Change
applicationId:-
Open
app/build.gradleand change theapplicationIdto match the one you registered in Firebase.defaultConfig { applicationId "com.yourcompany.yourapp" // Replace with your own }
-
-
Add
google-services.json:- Place the
google-services.jsonfile you downloaded from Firebase (Step 2.3) into theapp/directory of this project.
- Place the
-
Set API Endpoint:
- Open the ApiClient class and locate the
API_ENDPOINTconstant. - Set this value to point to your backend API endpoint.
- Open the ApiClient class and locate the
Choose one of:
| Environment | Device | Endpoint value | Description |
|---|---|---|---|
| Local backend | Android Emulator | LOCAL_EMULATOR_API_ENDPOINT |
Uses http://10.0.2.2:<PORT> to access your computer’s localhost. |
| Local backend | Real Android device (USB) | LOCAL_REAL_DEVICE_ENDPOINT |
Uses http://localhost:<PORT> with adb reverse tcp:<PORT> tcp:<PORT>. |
| Cloud backend | Any | Your cloud backend URL, e.g. https://your-cloud-api-url/api/ |
Must match VITE_TEMP_NUMBER_BACKEND_API_BASE_PATH in web.env or installer output. |
At this stage, the application should run and authenticate correctly. The following steps configure payments.
💡 Note: You can top-up customer accounts directly from the Platfone Retailer Dashboard without configuring payments in the app.
The app supports both Google Play in-app purchases and Stripe. At least one method should be configured for users to add funds.
Configure Stripe by following the Temp Number Stripe setup guide
This step is required if you plan to use in-app purchases.
-
Configure Google Play in-app purchases by following the Temp Number Backend GP setup guide
-
Sync In-App Purchase IDs:
- You can use the default product IDs from the sample app (listed below) or configure your own in the Google Play Console.
- Edit the constants in BillingConstants.kt to match the exact product IDs you set up.
⚠️ Important: The product IDs and their amounts inBillingConstants.ktmust perfectly match the IDs and prices configured in the Temp-Number Backend settings. Any mismatch will cause payments to fail.Default constants in
BillingConstants.ktto update:one_dollar_purchasefive_dollar_purchasetwenty_five_dollar_purchasefifty_dollar_purchase
-
Testing Payments:
- Once the products are configured and your app is published for testing, you can initiate payments from the app.
After configuring payment providers (Stripe, Google Play) in the backend's settings, you must re-deploy your backend for the changes to take effect.
You are all set! Build and run the project in Android Studio.
Once you have tested the app and are ready to go live, ensure you switch from test credentials to production keys.
- Update Credentials: Replace all test credentials (e.g., Stripe Sandbox keys, Platfone API endpoint) with your Live / Production keys in the
backend.secrets,backend.env, andweb.envfiles of your backend. - Final Re-deploy: Re-deploy the backend one last time to apply the production configuration.
This project is licensed under the MIT License with an API Restriction Clause. You may use it for personal or commercial projects with the Temp-Number Retail API. See the LICENSE file for details.







