Finance LendAndroid App v1.0
iOS guideSupport

Finance Lend Android app

How to set up, build and publish the customer app for Android: connect it to your website, brand it, add push notifications and release it on Google Play.

FlutterAndroidCustomer app
Getting started

Overview

The Finance Lend Android app is the companion of the Finance Lend SaaS website. Customers see their loans, pay instalments, upload documents and message their lender from their phone.

One app serves every lender on your platform: the customer finds their lender by name, company code or QR code, and signs in. You can also build an own-brand app for a single lender.

Find the lender
Find the lender
Sign in
Sign in
Home
Home
Loan details
Loan details

What is in the package

ItemWhat it is
android_app/The complete Flutter project for Android (source code)
android_app/README.mdSetup, build, push notification and store publishing steps
android_app/docs/mobile-api.mdReference of the customer API the app uses
lib/The app code (screens, API client, session, helpers)
android/The Android project files
Requires the website
This app needs Finance Lend SaaS v1.7 or newer installed on an HTTPS domain. The website is sold separately.
Getting started

Features

Everything a borrower needs, in one app.

FeatureWhat it does
Find your lenderSearch by name or city, type the company code, or scan the QR code from the lender's website. One app for many lenders.
Sign inEmail and password, or a 6-digit code sent to the customer's email, depending on what the lender allows.
HomeWhat is owed in total, the next payment with a Pay now button, late payments, document progress and a card for each loan.
My loansEvery loan with its status, schedule, payments, receipts and a statement.
PayOpens the lender's secure payment page in the phone's in-app browser.
Apply for a loanPick a loan type, enter the amount and term and send the request. Limits and an estimate are shown.
Documents (KYC)Upload photos or PDFs (up to 5 MB) for each document the lender asks for and see whether each is approved, in review or not accepted.
Inbox and pushReminders and updates in an inbox, plus phone notifications when push is set up.
AssistantAsk questions about their own loans when the lender switches the assistant on.
Several lendersCustomers of more than one lender switch between them under More → Switch company.
SecurityFingerprint or face unlock, change password, sign out of all devices.
My loans
My loans
Apply for a loan
Apply for a loan
Documents
Documents
Inbox
Inbox
More
More

Not included

  • Owner and staff tools. Lenders manage everything on the website; the app is for customers only.
  • Card payments inside the app. Payment opens the lender's own gateway page.
Getting started

Requirements

Your computer (to build the app)

  • Flutter (a current stable release whose Dart is 3.13 or newer)
  • Windows, macOS or Linux with Android Studio and the Android SDK
  • About 10 GB of free disk space

Phones

  • Android phones and tablets supported by your Flutter version

Accounts

  • Google Play developer account (one-time fee) to publish
  • Optional: a Firebase project for push notifications

Website

  • Finance Lend SaaS v1.7 or newer on https
  • The lender's website published (the company code is the name in its address, /site/<code>)
  • Email (SMTP) set up if you want emailed sign-in codes
  • The cron job running, for reminders and push
Getting started

Install Flutter & Android Studio

  1. Install FlutterFollow docs.flutter.dev for your system and add flutter to your PATH.
  2. Install Android StudioInstall it with the Android SDK, the command-line tools and an emulator image. Accept the licences: flutter doctor --android-licenses.
  3. CheckRun flutter doctor. Every line for Flutter and Android should have a green tick.
Prepare the website

Prepare the website

Do this once, before you test the app.

  1. Use httpsThe app talks to your website over https. A debug build also accepts plain http for testing.
  2. Publish the lender's websiteUnder Communication → Website the lender switches the website on. The company code is the name in the website address.
  3. Open Mobile AppsThe owner's AI & Apps → Mobile Apps page shows the QR code, the company code and the page customers use to get the app. The super admin saves the store links there once the app is published.
  4. Set up emailUnder Settings → Email SMTP. It is used for emailed sign-in codes and reminders.
  5. Add the cron line* * * * * cd /path/to/site && php artisan schedule:run >> /dev/null 2>&1 so reminders and push messages go out.
  6. Create a test customerAdd a customer on the website, or let one register online. The customer signs in to the app with the same email and password.
Set up the project

Set up the project

  1. UnzipUnzip finance-lend-android-v1.0.0.zip and open the android_app folder in Android Studio or VS Code.
  2. Get the packagesIn that folder run flutter pub get.
  3. Check the codeOptional: flutter analyze and flutter test.
cd android_app
flutter pub get
Run the app

Run on a phone or simulator

Pass your website address when you run or build, so customers never type it.

On a real phone

  1. Turn on USB debuggingSettings → About phone → tap Build number seven times, then Developer options → USB debugging.
  2. Connect and checkPlug the phone in and run flutter devices.
  3. Runflutter run --dart-define=API_BASE_URL=https://yourdomain.com

On the emulator

Start an emulator from Android Studio, then run the same command. To reach a website on your own computer the emulator uses http://10.0.2.2/... instead of localhost.

flutter run --dart-define=API_BASE_URL=http://10.0.2.2/product/finance-lend/finance-lend/main_file

Testing against a local website (http)

A debug build accepts plain http://. Release builds need https://.

Quick check without a phone

This signs in and out against your website using a customer account and reads the data the app needs:

dart run tool/smoke.dart https://yourdomain.com company-code customer@example.com password
No address given?
Leave API_BASE_URL out and the first screen also asks for the server address. That is handy while testing.
How it works

How customers connect

Way inHow it works
SearchThe customer types the lender's name or city.
Company codeThe customer types the code (the name in the lender's website address, /site/<code>).
QR codeThe QR code is on the lender's Get our app page and in its website footer. Scanning it opens the app on that lender; the app asks Connect to <company> at <host>? before it trusts the address.
LinkA financelend://connect link, or a link from the lender's page, opens the app on that lender.

After that the sign-in screen shows the lender's logo and name, and the whole app takes on its colour. A phone can hold several lenders (More → Switch company).

An app for one lender only

Build with the lender's code as well and the app has no company screen:

flutter build apk --dart-define=API_BASE_URL=https://yourdomain.com --dart-define=COMPANY=company-code
Fixed server
When API_BASE_URL is built in, codes and links cannot point the app to a different server.
How it works

Sign-in & security

TopicWhat happens
Sign-inEmail and password, or an emailed 6-digit code when the lender allows it.
Token storageThe sign-in token is kept in the Android Keystore, not in plain files.
LockUnder More the customer can turn on Unlock with fingerprint or face. The app asks when it opens and after 30 seconds away. Turning it on asks once, so a lock the person cannot open is never enabled.
Password changeChanging the password signs the app out everywhere. Sign out of all devices is in the app.
First sign-inA customer created by staff with a typed password is asked to choose their own.
Idle sign-outAn app that is not used for 90 days is signed out (MOBILE_TOKEN_IDLE_DAYS on the server).
Update and maintenanceThe server can require a minimum app version (MOBILE_MIN_APP_VERSION) or show a maintenance message (MOBILE_MAINTENANCE).
Customise

Branding & customisation

Changes that need no new build (from the website)

  • The lender's logo, name and colour: the app takes them from the lender's website settings.
  • The QR code, company code and store links on the Mobile Apps page.
  • Whether emailed codes, the assistant and document pre-checks are available.

Changes in the code (then build again)

WhatWhere
App name shown on the phoneFinance Lend in android/app/src/main/AndroidManifest.xml (android:label)
Application idcom.financelend.finance_lend_app — change in applicationId in android/app/build.gradle.kts (and namespace in the same file). Do this before you publish.
ColourbuildTheme() in lib/main.dart (one seed colour)
Icon and logoassets/icon.png, assets/icon_foreground.png, assets/logo.png. Replace them, then run dart run flutter_launcher_icons.
Versionversion in pubspec.yaml (now 1.0.0+1) and AppConfig.appVersion in lib/config.dart
Notifications

Push notifications (Firebase)

Optional. Without it the app works and the in-app inbox still fills up; only the phone pop-ups are missing.

  1. Create a Firebase projectAt console.firebase.google.com add an Android app with your application id.
  2. Add the fileDownload google-services.json and put it in android/app/. The build switches push on when the file is there.
  3. Connect the serverProject settings → Service accounts → generate a private key. On the server put its path in .env as FCM_CREDENTIALS=/path/key.json.
  4. Check the schedulerThe Laravel cron line must be running; reminders are sent from it.

When customers are notified

  • Before and after an instalment is due (daily reminders)
  • A payment is received
  • A loan is approved or rejected
  • A document is approved or needs attention
Release

Signing key & build the release

1. Create a signing key (once)

keytool -genkey -v -keystore ~/finance-lend.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload
Keep it safe
Back up the key file and its passwords. If you lose them you cannot update the app on Google Play. Never commit them to a repository.

2. Tell the build where the key is

Create android/key.properties with:

storeFile=/home/you/finance-lend.jks
storePassword=********
keyAlias=upload
keyPassword=********

3. Build

flutter build appbundle --dart-define=API_BASE_URL=https://yourdomain.com

Upload build/app/outputs/bundle/release/app-release.aab to Google Play.

A test APK to share

flutter build apk --split-per-abi --dart-define=API_BASE_URL=https://yourdomain.com

This makes smaller files, one for each processor type, in build/app/outputs/flutter-apk/.

Release

Publish on Google Play

  1. Developer accountRegister at play.google.com/console and pay the one-time fee.
  2. Create the appAll apps → Create app. Choose the name, language, App and Free.
  3. Store listingAdd the name, short and full description, the app icon (512×512), a feature graphic (1024×500) and phone screenshots.
  4. App contentFill in the privacy policy link, ads declaration, data safety form (see below), target audience and content rating.
  5. Upload and releaseProduction → Create new release → upload the .aab → add release notes → review and roll out. New developer accounts may be asked to run a closed test first.
  6. Add the link to your websiteCopy the Play Store link into the website's Mobile Apps page (super admin) so the Get our app page shows the store button.

Updates

Raise the version in pubspec.yaml (for example 1.0.1+2; the number after + must go up every upload), build again and upload a new release.

Release

Privacy & data safety

Use this when you fill in the store forms.

Android permissions used

PermissionWhy
INTERNETTalk to your website
POST_NOTIFICATIONSShow push notifications (Android 13+)
USE_BIOMETRICFingerprint or face unlock

The camera and photo picker are used through the system picker when the customer uploads a document, so no extra permission is declared.

Data the app handles

DataUsed forShared
Name, email, phoneAccount and contact with the lenderOnly with the customer's own lender
Loan, payment and document detailsShowing loans and uploading documentsOnly with the customer's own lender
Documents and photos the customer choosesKYC checks by the lenderOnly with the customer's own lender
Device push token (if push is on)Sending notificationsFirebase Cloud Messaging
Your policy
Describe your own data practices in your privacy policy. The app has no ads and no analytics of its own.
Reference

Settings reference

android/app/src/main/AndroidManifest.xml

  • The three permissions above
  • android:label: the app name
  • A financelend://connect link so a scanned QR code opens the app

android/app/build.gradle.kts

  • applicationId and namespace
  • Applies the Firebase plugin only if google-services.json exists
Reference

Code structure

PathWhat it holds
lib/main.dartApp start, theme and routing
lib/config.dartBuild-time settings: API_BASE_URL, COMPANY, version
lib/push.dartPush notification setup
lib/api/api_client.dartEvery call to the customer API
lib/state/session.dartSigned-in lenders, tokens, lock
lib/screens/Company, login, scan, shell (tabs), dashboard, loans, loan detail, apply, documents, notifications, assistant, more, switch company, change password, lock
lib/util/Formatting, files, payment page, QR parsing
lib/widgets/Shared pieces (company logo, confirm dialog)
test/Unit and widget tests, and a screenshot renderer
tool/smoke.dartCommand-line check of the app against your website

The iPhone project in the other package has identical lib/ code; when you change one, make the same change in the other.

Maintenance

Updating to a new version

  1. Back upKeep your own changes (name, id, icons, colours) somewhere safe.
  2. ReplaceUnzip the new package and copy your changes over it.
  3. Raise the versionIncrease version in pubspec.yaml.
  4. Build and uploadBuild the release again and upload it to Google Play.

Update the website to the version the new app needs first.

Help

Troubleshooting & FAQ

ProblemTry this
The app cannot find my lenderCheck the company code, that the lender's website is published, and that the address is https and reachable from the phone.
"Could not connect to the server"Check API_BASE_URL (no trailing mistakes, https for release builds) and that the website opens in the phone's browser.
No emailed code arrivesSet up and test Settings → Email SMTP on the website, and check the spam folder.
The QR code does not open the appInstall the app first, then scan from inside the app (Scan QR on the first screen).
No push notificationsCheck google-services.json is in android/app/, FCM_CREDENTIALS is set on the server and the cron job runs.
Customer is asked to change passwordThey were created with a typed password. They choose their own once and carry on.
Payment page does not openThe lender must have a payment gateway switched on in the website's Settings.
Build fails after changing packagesRun flutter clean, flutter pub get and build again.

Do I need one app per lender?

No. One app serves every lender; the customer picks theirs. You can also build an own-brand app for a single lender.

Can owners and staff use the app?

No, it is for customers. Lenders and staff use the website.

Where is the data stored?

On your website's server. The app only keeps the sign-in token on the phone.

Can I change the server address without a new build?

Only if you built without API_BASE_URL. When it is built in, the app is tied to that server.

How do payments work?

The app opens the lender's own payment page in a secure in-app browser. No card details pass through the app.

Can I publish under my own name?

Yes. Change the name, id and icons, then publish with your own Google Play account.

Help

Support

Open a ticket at support.smartwebinfotech.com with your purchase code, the app version, what you did and what you saw.

Before you publish
Build and test the app on a real Android phone against your own website, including sign-in, a payment and a document upload. Store reviewers will do the same.