Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2 from diconium/dev
Browse files Browse the repository at this point in the history
release to main
  • Loading branch information
goncafab authored Oct 25, 2024
2 parents c5a7e76 + 93eab32 commit 39683e6
Show file tree
Hide file tree
Showing 156 changed files with 4,426 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Gradle Build

on:
push:
branches:
- main
- dev

pull_request:
branches:
- main
- dev

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'

- name: Grant execute permission for gradlew
run: chmod +x ./gradlew

- name: Build with Gradle
run: ./gradlew assembleRelease

- name: Create artifacts directory
run: mkdir -p ${{ github.workspace }}/artifacts

- name: Copy APK to artifacts directory
run: cp app/build/outputs/apk/release/app-release-unsigned.apk ${{ github.workspace }}/artifacts/

- name: Archive build artifacts
uses: actions/upload-artifact@v3
with:
name: app-release-unsigned.apk
path: ${{ github.workspace }}/artifacts/
51 changes: 51 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties



# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Log/OS Files
*.log

# Android Studio generated files and folders
captures/
.externalNativeBuild/
.cxx/
*.apk
output.json

# IntelliJ
*.iml
.idea/
misc.xml
deploymentTargetDropDown.xml
render.experimental.xml

# Keystore files
*.jks
*.keystore

# Google Services (e.g. APIs or Firebase)
# google-services.json

# Android Profiling
*.hprof
90 changes: 89 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,89 @@
# skoda-tender-android
# Development Framework

The application supports Android OS for running mobile applications.

- **Language**: Kotlin
- **Tools**: Android Studio, GitHub, Windows, Linux, macOS, Emulator

## Libraries
- **Android Jetpack**: Lifecycle, Navigation, ViewModel
- **Material You Design**: Supporting libraries for UI consistency
- **Retrofit**: For API calls
- **Room**: Persistent storage solution
- **Coroutines and Flows**: For asynchronous programming
- **Timber**: Log management
- **Firebase**: Messaging, Crashlytics, and Analytics
- **Dagger2**: Dependency Injection
- **RxJava**: Reactive programming
- **GSON**: JSON parsing

## Architecture
- Clean Code, adhering to **MVVM** architecture and **SOLID Principles**.

---

# Features

1. **License Extension Workflow**
2. **License Activation Process**
3. **User Interface for License Extension Suggestions**
4. **Notification System for License Expiration Alerts**
5. **Subscription Extension Needs Assessment**
6. **Messaging System for Subscription Promotions**
7. **Automatic License Renewal Options**
8. **Subscription Length Customization Options**

---

## Design Considerations

### User Interface
- **Material Design**:
- Applied Android's Material Design components like `MaterialButton`, `TextInputLayout`, `RecyclerView`, and `CardView`.
- Material themes are set in the `styles.xml` file with `Theme.MaterialComponents.*` themes, using predefined styles from Google’s Material Design library.

- **Responsive Layout**:
- Designed for various screen sizes and orientations with `ConstraintLayout`.
- Separate XML layout files are created for different configurations (e.g., `res/layout`, `res/layout-large`).
- **ViewModel and LiveData** are used to handle configuration changes seamlessly.

- **Accessibility**:
- Ensures usability for people with disabilities, including support for screen readers and high-contrast themes.
- Important visual elements have content descriptions.
- Text sizes are adjustable using `sp` units, with `android:autoSizeTextType` applied to `TextView`.

### Performance
- **Optimized API Calls**:
- Reduced latency with efficient network handling.
- Implemented caching strategies using OkHttp's built-in caching for offline network responses.

### Security
- **Secure Connections**:
- Enforced HTTPS for all network communication to maintain data security.

---

## Integration

### Third-Party Services
- **Analytics**:
- Integrated Firebase Analytics for tracking user engagement.

### Local Data Storage
- **Room Database**:
- Used for local caching of user preferences and data.

### Backend API Integration
- **Retrofit**:
- Utilized for efficient HTTP communication.
- **OkHttp**:
- Manages network requests, with GSON used for JSON parsing to facilitate smooth backend API integration.

---

## Testing

- **Testing Configuration**:
- Configured with dependencies like JUnit and Espresso to ensure comprehensive test coverage.

has context menu
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
87 changes: 87 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.jetbrains.kotlin.android)
alias(libs.plugins.google.gms.google.services)
}

apply plugin: 'kotlin-kapt'

android {
namespace 'com.skoda.tender'
compileSdk 34

defaultConfig {
applicationId "com.skoda.tender"
minSdk 29
targetSdk 34
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

dataBinding {
enabled = true
}

viewBinding {
enabled = true
}

kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
buildConfig = true
}
}

dependencies {

implementation libs.androidx.core.ktx
implementation libs.androidx.appcompat
implementation libs.material
implementation libs.androidx.activity
implementation libs.androidx.constraintlayout
implementation libs.firebase.messaging
testImplementation libs.junit
androidTestImplementation libs.androidx.junit
androidTestImplementation libs.androidx.espresso.core
//di
implementation rootProject.ext.dagger
kapt rootProject.ext.daggerApt

//rx
implementation rootProject.ext.rxJava
implementation rootProject.ext.rxAndroid
implementation rootProject.ext.rxKotlin


//net
implementation rootProject.ext.retrofit
implementation rootProject.ext.okHttp
implementation rootProject.ext.gson
implementation rootProject.ext.rxJavaAdapter
implementation rootProject.ext.gsonConverter
//arch-comp Room
implementation("androidx.room:room-runtime:$room_version")
// To use Kotlin annotation processing tool (kapt)
kapt("androidx.room:room-compiler:$room_version")
//test
testImplementation 'junit:junit:4.12'

implementation("androidx.paging:paging-runtime:$paging_version")
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")


}
29 changes: 29 additions & 0 deletions app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"project_info": {
"project_number": "864069329997",
"project_id": "skoda-poc-fb",
"storage_bucket": "skoda-poc-fb.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:864069329997:android:b27526d17ebc9a6db7e804",
"android_client_info": {
"package_name": "com.skoda.tender"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyDccS2goBTjyAlejjDieep1m8BzNWfVoEc"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}
21 changes: 21 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.skoda.tender

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class UserInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.app.skodapoc", appContext.packageName)
}
}
Loading

0 comments on commit 39683e6

Please sign in to comment.