Skip to content

Commit

Permalink
Merge pull request #55 from Myzel394/add-video
Browse files Browse the repository at this point in the history
Add video support
  • Loading branch information
Myzel394 authored Jan 10, 2024
2 parents ad4caaf + dd5344c commit 3cc5327
Show file tree
Hide file tree
Showing 145 changed files with 6,873 additions and 2,279 deletions.
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
# Alibi

<p float="left" align="center">
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/01.png" width="24%" />
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/02.png" width="24%" />
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/03.png" width="24%" />
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/04.png" width="24%" />
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/01.webp" width="30%" />
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/02.webp" width="30%" />
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/03.webp" width="30%" />
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/04.webp" width="30%" />
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/05.webp" width="30%" />
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/06.webp" width="30%" />
</p>

Alibi keeps recording in the background and saves the last 30 minutes at your request.
Expand Down Expand Up @@ -44,14 +46,20 @@ You can donate via:
* Bitcoin Cash: `qr9s64vfqedvurfef9ykf7szchmt0xyvnga452fc8l`
* Ethereum: `0xbb5E631c03C65334d1d9EfBCD926DC1265CC20D7`
* Tether USD: `0xbb5E631c03C65334d1d9EfBCD926DC1265CC20D7`
* Monero: `83dm5wyuckG4aPbuMREHCEgLNwVn5i7963SKBhECaA7Ueb7DKBTy639R3QfMtb3DsFHMp8u6WGiCFgbdRDBBcz5sLduUtm8`
*

Monero: `83dm5wyuckG4aPbuMREHCEgLNwVn5i7963SKBhECaA7Ueb7DKBTy639R3QfMtb3DsFHMp8u6WGiCFgbdRDBBcz5sLduUtm8`

* Zcash: `t1ZfvNpzfdaW6csT9Kc7iJA7LUU3hmNj2sx`
* Litecoin: `LZayhTosZ9ToRvcbeR1gEDgb76Z7ZA2drN`
* Dash: `XcTkni8CVAXBcuc5VwvHmsYftVK4CPLetU`
* Avalanche: `0xbb5E631c03C65334d1d9EfBCD926DC1265CC20D7`
* XRP: `rNpfDm8UwDTumCebchBadjVW2FEPteFgNg`
* Solana: `2h6CB3hz5Vb2nYS1RQiXZ4aWTzc5frBPR7Sp1b4muFqb`
* ADA: `addr1q8vy2vcp6lacaw8lkc29gufuzajaytc5qc0c2mxlmw5lndxcg5esr4lm36u0lds523cnc9m96gh3gpsls4kdlkaflx6qf6qpvc`
*

ADA: `addr1q8vy2vcp6lacaw8lkc29gufuzajaytc5qc0c2mxlmw5lndxcg5esr4lm36u0lds523cnc9m96gh3gpsls4kdlkaflx6qf6qpvc`

* Dogecoin: `DUA4j7mVoc7Rvezu8YgeRKwxNuMzKeDoxD`
* Tron: `THWVLGhne5wDsGjd1CNenHDKQGzvGzrzLb`
* Polkadot: `1642iaR6AoKyM6qnnMHkfCRfRqRKJ2wC6Cm3UEWEFEz6EtZR`
Expand Down
39 changes: 28 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ android {
applicationId "app.myzel394.alibi"
minSdk 24
targetSdk 34
versionCode 7
versionName "0.3.0"
versionCode 8
versionName "0.4.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down Expand Up @@ -79,6 +79,7 @@ android {
buildFeatures {
compose true
buildConfig = true
viewBinding = true
}
composeOptions {
kotlinCompilerExtensionVersion '1.5.1'
Expand All @@ -94,15 +95,18 @@ dependencies {
implementation 'androidx.core:core-ktx:1.12.0'
implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.0')
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.2'
implementation 'androidx.activity:activity-compose:1.7.2'
implementation 'androidx.activity:activity-compose:1.8.2'
implementation 'androidx.activity:activity-ktx:1.8.2'
implementation platform('androidx.compose:compose-bom:2022.10.00')
implementation 'androidx.compose.ui:ui'
implementation 'androidx.compose.ui:ui-graphics'
implementation 'androidx.compose.ui:ui-tooling-preview'
implementation 'androidx.compose.material3:material3'
implementation "androidx.compose.material:material-icons-extended:1.5.1"
implementation 'androidx.compose.material3:material3:1.1.2'
implementation "androidx.compose.material:material-icons-extended:1.5.4"
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.documentfile:documentfile:1.0.1'
implementation 'androidx.lifecycle:lifecycle-service:2.6.2'

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
Expand All @@ -111,24 +115,37 @@ dependencies {
debugImplementation 'androidx.compose.ui:ui-tooling'
debugImplementation 'androidx.compose.ui:ui-test-manifest'

implementation "androidx.navigation:navigation-compose:2.7.2"
implementation "androidx.navigation:navigation-compose:2.7.6"

implementation 'com.google.dagger:hilt-android:2.46.1'
implementation 'com.google.dagger:hilt-android:2.48'
annotationProcessor 'com.google.dagger:hilt-compiler:2.46.1'
implementation "androidx.hilt:hilt-navigation-compose:1.0.0"
implementation "androidx.hilt:hilt-navigation-compose:1.1.0"

coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'

implementation 'com.arthenica:ffmpeg-kit-min-gpl:5.1'
implementation 'com.arthenica:ffmpeg-kit-full-gpl:5.1'

implementation "androidx.datastore:datastore-preferences:1.0.0"

implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1"

coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'

implementation 'com.maxkeppeler.sheets-compose-dialogs:core:1.2.0'
implementation 'com.maxkeppeler.sheets-compose-dialogs:duration:1.2.0'
implementation 'com.maxkeppeler.sheets-compose-dialogs:list:1.2.0'
implementation 'com.maxkeppeler.sheets-compose-dialogs:input:1.2.0'

implementation 'androidx.activity:activity-ktx:1.8.0'
def camerax_version = "1.3.1"
implementation "androidx.camera:camera-core:${camerax_version}"
implementation "androidx.camera:camera-camera2:${camerax_version}"
implementation "androidx.camera:camera-lifecycle:${camerax_version}"
implementation "androidx.camera:camera-video:${camerax_version}"

implementation "androidx.camera:camera-view:${camerax_version}"
implementation "androidx.camera:camera-extensions:${camerax_version}"


implementation "com.valentinilk.shimmer:compose-shimmer:1.2.0"

implementation "androidx.biometric:biometric-ktx:1.2.0-alpha05"
}
29 changes: 28 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,39 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-feature
android:name="android.hardware.microphone"
android:required="false" />

<uses-feature
android:name="android.hardware.camera"
android:required="false" />

<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<!-- Required for Bluetooth microphones -->
<uses-permission
android:name="android.permission.MODIFY_AUDIO_SETTINGS"
android:maxSdkVersion="30" />

<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" />

<uses-permission android:name="android.permission.USE_BIOMETRIC" />

<!-- Starting with Android 29, apps don't need to request the READ_EXTERNAL_STORAGE permission
for files in their own MediaStore -->
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="28" />

<application
android:name=".UpdateSettingsApp"
android:allowBackup="true"
Expand All @@ -23,6 +45,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Alibi"
android:hardwareAccelerated="true"
tools:targetApi="31">
<activity
android:name=".MainActivity"
Expand All @@ -43,9 +66,13 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>

<service
android:name=".services.AudioRecorderService"
android:foregroundServiceType="microphone" />
<service
android:name=".services.VideoRecorderService"
android:foregroundServiceType="camera|microphone" />

<!-- Change locale for Android <= 12 -->
<service
Expand Down
44 changes: 19 additions & 25 deletions app/src/main/java/app/myzel394/alibi/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ package app.myzel394.alibi

import android.content.Context
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.app.AppCompatDelegate
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.ui.platform.LocalContext
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.ui.Modifier
import androidx.core.view.WindowCompat
import androidx.datastore.dataStore
import app.myzel394.alibi.db.AppSettings
import app.myzel394.alibi.db.AppSettingsSerializer
import app.myzel394.alibi.ui.AsLockedApp
import app.myzel394.alibi.ui.LockedAppHandlers
import app.myzel394.alibi.ui.Navigation
import app.myzel394.alibi.ui.SUPPORTS_DARK_MODE_NATIVELY
import app.myzel394.alibi.ui.theme.AlibiTheme

const val SETTINGS_FILE = "settings.json"
Expand All @@ -30,27 +30,21 @@ class MainActivity : AppCompatActivity() {
WindowCompat.setDecorFitsSystemWindows(window, false)

setContent {
val dataStore = LocalContext.current.dataStore
val settings = dataStore
.data
.collectAsState(initial = AppSettings.getDefaultInstance())
.value

LaunchedEffect(settings.theme) {
if (!SUPPORTS_DARK_MODE_NATIVELY) {
val currentValue = AppCompatDelegate.getDefaultNightMode()

if (settings.theme == AppSettings.Theme.LIGHT && currentValue != AppCompatDelegate.MODE_NIGHT_NO) {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
} else if (settings.theme == AppSettings.Theme.DARK && currentValue != AppCompatDelegate.MODE_NIGHT_YES) {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
AlibiTheme {
LockedAppHandlers()

Box(
modifier = Modifier
.fillMaxSize()
.background(
MaterialTheme.colorScheme.background
)
) {
AsLockedApp {
Navigation()
}
}
}

AlibiTheme {
Navigation()
}
}
}
}
Loading

0 comments on commit 3cc5327

Please sign in to comment.