Android SDK
An SDK to embed Lune enrichment views into your Android mobile apps.
Lune Android SDK is a Kotlin library, distributed as a AAR file.
To get started follow the below guide.

Integration
Download and install SDK .aar file with all dependencies into your android project.
1. Install SDK AAR File
1.1 Download SDK AAR File
1.2 Install AAR file into your android project
- Switch project view to Project
- Locate libs folder to add external Android libraries to your app

1.3 Copy SDK AAR file into libs folder
- Now we can import the library as a project dependency.

2. Install SDK Dependencies
Add the following dependencies into app-level build.gradle
3. Initialization
To initialize the SDK, you simply have to create an instance of LuneKitManager that would be used across your app. The constructor accepts optional arguments for global customization of the views in the SDK.
LuneKitManager Class Configurations
Parameter
Type
primaryColor
Color
borderRadius
Dp
enFontFamily
FontFamily
arFontFamily
FontFamily
locale
String
With the instance in hand, luneKitManager, in this example, you can embed any of the Lune views into your app by calling the method(s) responsible for such views.
We'd look at each view in detail now.
Budget Form
The BudgetForm allows the user to set up a new budget. To use this view, just call the BudgetForm method of your LuneKitManager instance as shown in the example below.

BudgetForm parameters
Parameter
Type
Description
primaryColor
Color
Component primary color
contentColor
Color
Component content color
fontFamily
FontFamily
Component text font family
callback
(budget: String) → Unit
A callback is called when confirm button is clicked
Budget Summary
The BudgetSummaryView shows the user's overall spend in contrast to his budget and his expected spend per time. To use this view, just call the BudgetSummaryView method of your LuneKitManager instance as shown in the example below. The method takes a BudgetSummary object.

BudgetSummaryView parameters
Parameter
Type
Description
data
BudgetSummary?
Data to be passed to the component
primaryColor
Color
Component primary color
borderRadius
Dp
Component card border radius
fontFamily
FontFamily
Component text font family
Category Spend List View
The CategorySpendListView shows the user's spend per each category, the user can modify specified budged for each category. To use this view, just call the CategorySpendListView method of your LuneKitManager instance as shown in the example below.

CategorySpendListView parameters
Parameter
Type
Description
data
List<CategoryBudgetSpend>?
Data to be passed to the component
primaryColor
Color
Component primary color
contentColor
Color
Component text color
borderRadius
Dp
List item border radius
fontFamily
FontFamily
Component text font family
editCategories
Boolean
To edit categories budget
totalBudget
Double
The total specified budget, this is used to edit categories budget and to not exceed this range.
onChange
(List<CategoryBudgetSpend>) -> Unit
A callback that returns list of all edited categories (The callback fires whenever a category is being modified)
Categories Spend PieChart
The CategoriesPieChart shows the user's spend per top 5 categories with the total amount spend. To use this view, just call the CategoriesPieChart method of your LuneKitManager instance as shown in the example below.

CategoriesPieChart parameters
Parameter
Type
Description
data
List<SpendCategory>?
Data to be passed to the component as a list and then the chart will show top 5 spend categories
primaryColor
Color
Component primary color
borderRadius
Dp
Component card border radius
fontFamily
FontFamily
Component text font family
Brand List View
The BrandListView shows a list of brands the user has patronized. To use this view, just call the BrandListView method of your LuneKitManager instance as shown in the example below.

BrandListView parameters
Parameter
Type
Description
data
List<BrandSpend>?
Data to be passed to the component
contentColor
Color
Component text color
borderRadius
Dp
List cards border radius
fontFamily
FontFamily
Component text font family
Transaction List View
The TransactionListView shows a list of enriched transactions in a user-friendly way, which each transaction having an associated brand. To use this view, just call the TransactionListView method of your LuneKitManager instance as shown in the example below.

TransactionListView parameters
Parameter
Type
Description
data
List<Transaction>?
Data to be passed to the component
contentColor
Color
Component text color
borderRadius
Dp
List cards border radius
fontFamily
FontFamily
Component text font family
Localization
The Android SDK provides two Locales en and ar . To switch between Locales just configure the LuneKitManager locale parameter. This will change all components Locale and it will also handle LTR & RTL views.


