Before You Start: Prerequisites
What You'll Need
-
Published Lovable project (your web app must be live)
-
Google Play Developer Account ($25 one-time fee)
-
Google Cloud Account (free)
-
Despia account (offers free demo build)
-
App assets (1024x1024 icons, splash screen GIF)
-
1-2 hours of focused time for initial setup
Phase 1: Basic Setup
Step 1: Prepare Your Lovable Project
-
Ensure your Lovable project is published
-
Your web app must be live and accessible
-
Copy the published URL from your Lovable editor
-
Test that the URL works properly
-
Step 2: Create Your Despia Account
-
Go to Despia.com and sign up
-
Claim your free demo build - Despia offers one free test build
-
This covers all cloud resources for your first attempt
Step 3: Create New Application in Despia
-
Click "Create New Application"
-
App Name: Use no spaces or special characters (e.g., "AndroidMaster")
-
Web App Start URL: Paste your Lovable published URL
-
Bundle ID: Choose format
com.yourcompany.appname
(e.g.,com.androidmaster
)-
This is your custom domain in reverse pattern
-
If you don't have a domain, use Despia's suggested format
-
-
Click "Create New Application"
Step 4: Design Your App Assets
App Icons Requirements
Main App Icon:
-
Size: Exactly 1024x1024 pixels
-
Format: PNG with NO transparency (no alpha channels)
-
Background: Must have solid background color
Android Icon:
-
Size: Exactly 1024x1024 pixels
-
Format: PNG with NO transparency
-
Safe Area: Android zooms into icons, so design with padding
-
Preview: Despia shows how it will look when zoomed
Splash Screen Requirements
-
Size: Exactly 1024x1024 pixels
-
Format: GIF with transparent background (opposite of icons)
-
Purpose: Shows during app startup
-
Animation: Can be static or animated
-
Color: Should match your app's background color
Critical Icon Rules:
-
Icons: NO transparency, solid background required
-
Splash Screen: Transparent background required
-
Wrong format will cause build failures
Phase 2: Google Cloud & Developer Account Setup
Step 5: Set Up Google Cloud Service Account
Create Google Cloud Project
-
Go to Google Cloud Console
-
Create New Project or select existing one
-
Project Name: Use descriptive name (e.g., "Lovable Video")
-
Click "Create" and select your project
Create Service Account
-
In Google Cloud Console, go to "IAM & Admin"
-
Click "Service Accounts" in left sidebar
-
Click "Create Service Account"
-
Service Account Name: "Despia Lovable [ProjectName]"
-
Description: Optional description for organization
-
Click "Create and Continue"
Set Service Account Role
-
Role: Select "Service Account User"
-
Click "Continue"
-
Click "Done"
-
Copy the service account email - you'll need this later
Generate Service Account Key
-
Find your new service account in the list
-
Click the three dots (Actions) → "Manage Keys"
-
Click "Add Key" → "Create New Key"
-
Key Type: Select "JSON"
-
Click "Create"
-
Download the JSON file - keep it safe
Step 6: Link Service Account to Despia
-
In Despia, click "Add New Developer Account"
-
Scroll down to the Google Android section
-
Click "Upload JSON"
-
Drag the JSON file into the uploader
-
Click "Link with Google"
-
Your Google Cloud project should now appear in the dropdown
Step 7: Enable Google Play Android Developer API
-
Click "Manage Integration" in Despia
-
This opens Google Cloud Console
-
Click "Enable" for Google Play Android Developer API
-
This gives Despia restricted access to build and deploy your app
Phase 3: Google Play Console Setup
Step 8: Set Up Google Play Developer Account
Prerequisites: You need a Google Play Developer Account ($25 one-time fee)
Link Service Account to Play Console
-
Go to Google Play Console
-
Navigate to "Users and Permissions"
-
Click the three dots next to "Manage Users"
-
Select "Invite New Users"
-
Email Address: Paste your service account email from Step 5
-
Expiry Date: No expiry date
-
Account Permissions: Select "Admin (all permissions)"
-
Click "Invite User" and "Send Invite"
Step 9: Create App Listing
-
In Google Play Console, go to "Home"
-
Click "Create App"
-
App Name: Your app's display name (e.g., "Android Master")
-
App Type: App
-
Free or Paid: Free (you can change this later)
-
Agree to policies and click "Create App"
Step 10: Set Up Privacy Policy (Critical Step)
Important: You MUST set up a privacy policy immediately or Despia integration won't work.
-
Go to "Set up your app" section
-
Click "Set up privacy policy" (first task)
-
Privacy Policy URL: Enter any valid URL for now
-
Use your website if you have one
-
Can use https://despia.com temporarily
-
Must change this before going live
-
-
Click "Save"
This enables the Google Play integration and prevents blocking of automated updates.
Phase 4: Android Keystore Setup
Step 11: Generate or Upload Keystore
What is a Keystore? The keystore is like the "deed to a house" - whoever has it owns the app. Despia can generate one for you or you can upload your own.
Option A: Generate New Keystore (Recommended)
-
In Despia, under build configuration, click "Generate Keystore"
-
Despia creates a keystore that you fully own
-
You can export it anytime - no vendor lock-in
-
Password is automatically generated and stored
Option B: Upload Existing Keystore
-
Click "Magic Keystore"
-
Upload your existing .jks or .keystore file
-
Enter your keystore password
-
Useful if you already have an app on Play Store
Keystore Ownership:
-
You own the keystore completely
-
Despia stores it securely like a bank
-
You can export it anytime
-
No vendor lock-in - you can migrate away if needed
Phase 5: Building and Testing
Step 12: Configure App Settings (Optional)
In Despia settings:
-
Full Screen Mode: Enable for immersive experience
-
Status Bar Colors: Match your splash screen background
-
Web App Synchronization: Enable for deep linking
-
Add-ons: Enable biometric app lock, location tracking if needed
Step 13: Build Your First App
Double-check everything before building:
-
✅ Google Cloud service account linked
-
✅ Google Play Console integration enabled
-
✅ Privacy policy set up
-
✅ Keystore generated or uploaded
-
✅ App icons and splash screen uploaded
-
✅ Development team selected
Build the app:
-
Click "Publish Project" → "Google Android"
-
Select your development team (Google Cloud project)
-
The build process starts on Apple M2 Mac machines
-
Wait 5-30 minutes for completion
-
You'll receive status updates
What happens during build:
-
Opens Android Studio on Mac M2 machine
-
Converts your Lovable app to thousands of native Android files
-
Creates signed APK/AAB bundle
-
Prepares for Play Store distribution
Step 14: Manual Upload (First Time Only)
Important: The first upload must be manual. After this, all updates are automatic.
Download and Upload AAB File
-
Once build completes, download the AAB file from Despia
-
In Google Play Console, go to your app
-
Navigate to "Testing" → "Internal Testing"
-
Click "Create New Release"
-
Upload the AAB file by dragging it into the upload area
-
Wait for Google Play to process and sign the file
-
Click "Next" → "Save and Publish"
Set Up Testing Team
-
Go to "Testers" section
-
Create a testing group or add individual email addresses
-
Copy the testing link
-
Share with your team for internal testing
Step 15: Test on Android Device
-
Open the testing link on your Android device
-
Accept the invite to internal testing
-
Install from Google Play Store
-
Test all functionality thoroughly
Note: Development builds show Despia watermark and license notice. This is normal for testing.
Phase 6: Adding Native Features
Despia SDK Integration Guide
Use this exact prompt pattern in Lovable for any native feature:
Add native [FEATURE] functionality using the Despia SDK from: https://www.npmjs.com/package/despia-native
First, install the package: npm install despia-native
Then import it: import despia from 'despia-native'
[Specific implementation instructions]
Please follow the installation instructions for the "despia-native" npm package closely, and do not modify my instructions. Implementation as mentioned is critical.
Contact Access Example
Lovable Prompt:
Add a button to request contact access and also another one to read them and then show them as a list under it.
Add native contact access functionality to retrieve users' device contacts including names and phone numbers using the Despia SDK from: https://www.npmjs.com/package/despia-native
First, install the package: npm install despia-native
Then import it: import despia from 'despia-native'
1. Request contact permission using despia("requestcontactpermission://")
2. Read contacts using await despia('readcontacts://', ['contacts']) which returns a JSON object with contact names as keys and phone number arrays as values
3. When accessing the data, use "dot notation" like .contacts to retrieve the contact data in a JSON object format
Please follow the installation instructions for the "despia-native" npm package closely, and do not modify my instructions. Implementation as mentioned is critical.
Expected Implementation:
import despia from 'despia-native';
// Request permission first
await despia("requestcontactpermission://");
// Read contacts data
const contactsData = await despia('readcontacts://', ['contacts']);
console.log(contactsData.contacts);
// Expected output format:
{
"John Appleseed": ["+12345678910"],
"Ann Wilson": ["+12345678910"]
}
Available Native Features
Android-Compatible Features:
-
Contact Access:
despia("requestcontactpermission://")
+await despia('readcontacts://', ['contacts'])
-
Push Notifications: OneSignal integration through Despia dashboard
-
Haptic Feedback:
despia("hapticlight://")
,despia("hapticmedium://")
,despia("hapticheavy://")
-
Biometric Auth:
despia("requestbiometric://")
for fingerprint/face unlock -
Camera Access:
despia("opencamera://")
for camera functionality -
Location Services:
despia("requestlocationpermission://")
+await despia('readlocation://', ['location'])
-
Calendar Access:
despia("requestcalendarpermission://")
+await despia('readcalendar://', ['events'])
-
Device Info:
await despia('readdeviceinfo://', ['model', 'version', 'battery'])
-
In-App Purchases: RevenueCat integration through Despia add-ons
-
Share Into App: Android sharing functionality
Android-Specific Features:
-
Share Into App: Native Android sharing target
-
Background Location: Enhanced location tracking
-
Notification Channels: Android notification management
Testing Native Features with Over-the-Air Updates
-
Make changes in your Lovable project
-
Publish your Lovable project
-
Automatic updates: Your app updates immediately without rebuilding!
-
Test permissions: Android will prompt for permissions on first use
-
No Google Play review needed for Lovable changes
Phase 7: Automated Publishing Setup
Step 16: Enable Automatic Publishing
After your first manual upload, future builds will be automatic:
-
Rebuild your app in Despia (using cloud credits or production license)
-
Despia automatically creates new draft releases in Google Play Console
-
Manual approval required: Go to Google Play Console → Internal Testing
-
Edit the draft release → Click "Next" → "Save and Publish"
-
Future builds: One-click deployment to internal testing
Step 17: Promote to Production
When ready to publish publicly:
-
In Google Play Console, go to your internal testing release
-
Click "Promote Release" → "Production"
-
Complete the to-do list (app information, content rating, etc.)
-
Submit for review - Google typically reviews within 1-3 days
Required Information for Production:
-
App Description: Detailed explanation of your app
-
Screenshots: Multiple device sizes showing app features
-
App Category: Choose appropriate category
-
Content Rating: Complete questionnaire for age rating
-
Target Audience: Define your user base
-
Privacy Policy: Must be live and complete
-
App Permissions: Explain why you need each permission
Phase 8: Managing Your Live App
Step 18: Upgrade to Production License
To remove watermarks and publish commercially:
-
In Despia, click "Build Production Version"
-
License Options:
-
Android Only: $249
-
iOS + Android: Higher tier pricing
-
-
Benefits:
-
Remove watermarks and development notices
-
Commercial publishing rights
-
Full source code export
-
Lifetime runtime updates
-
One-click deployment to stores
-
Cost Options
-
Free Tier: One development build with watermark
-
Cloud Credits: $25+ for additional development builds
-
Production License: $249 for commercial publishing
Troubleshooting Common Issues
Build Failures
"Google Play API not enabled"
-
Ensure Google Play Android Developer API is enabled in Google Cloud
-
Check that service account has proper permissions
"Keystore not found"
-
Verify keystore is generated or uploaded in Despia
-
Check that keystore password is correct
"Service account authentication failed"
-
Confirm JSON file was uploaded correctly
-
Verify service account email is added to Google Play Console
Google Play Console Issues
"Bundle ID already exists"
-
Each app needs a unique bundle ID
-
Check if you already have an app with this ID
"Privacy policy required"
-
Must set up privacy policy before integration works
-
Use temporary URL if needed, but update before going live
"Service account not found"
-
Ensure service account is invited to Google Play Console
-
Check that permissions are set to Admin
Testing Issues
"App not appearing in testing"
-
Verify you're added to the internal testing team
-
Check that release is published, not just saved as draft
"Can't install from Play Store"
-
Ensure you accepted the testing invite
-
Try clearing Google Play Store cache
Over-the-Air Updates Not Working
-
Confirm Lovable project is published
-
Check that published URL is accessible
-
Verify no JavaScript errors in browser console
Android vs iOS Development Differences
Simplified Android Process
Advantages of Android publishing:
-
No complex bundle ID registration (unlike iOS)
-
No external bundle requirements
-
Simpler Google Cloud integration vs Apple Developer complexity
-
Faster review process (1-3 days vs 1-2 days)
-
Lower barrier to entry ($25 vs $99/year)
Shared Features
Same Despia SDK works on both platforms:
-
All native features work identically
-
Same Lovable prompts work for iOS and Android
-
Over-the-air updates work the same way
-
One codebase deploys to both platforms
Support and Resources
Getting Help
-
Despia Support: 24/7 support with <2 minute response times
-
Customer Support Button: Available in Despia dashboard
-
Free Expert Help: Available if you encounter issues with your free build
Important Links
-
Despia Documentation: lovable.despia.com
-
Google Play Developer Guidelines: developer.android.com/distribute/play-policies
-
Google Play Console: play.google.com/console
-
Google Cloud Console: console.cloud.google.com
Remember: Android publishing is significantly simpler than iOS - no complex bundle ID registration required! The key steps are: set up Google Cloud service account, create Play Console app with privacy policy, generate keystore, build and manually upload once, then enjoy automatic deployments. The hardest part is the initial Google Cloud setup, but once configured, everything flows smoothly.