Skip to content

Commit c39059b

Browse files
committed
Added Android 7 and 8
1 parent 19cade4 commit c39059b

File tree

6 files changed

+46
-54
lines changed

6 files changed

+46
-54
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<img src="https://img.shields.io/github/actions/workflow/status/code3-dev/CCloud/build-appshare.yml?label=Build&style=for-the-badge" alt="Build Status">
2626

2727
<!-- Min Android Version -->
28-
<img src="https://img.shields.io/badge/Android-9.0%2B-green?style=for-the-badge&logo=android" alt="Min Android">
28+
<img src="https://img.shields.io/badge/Android-7.0%2B-green?style=for-the-badge&logo=android" alt="Min Android">
2929

3030
<!-- UI Toolkit -->
3131
<img src="https://img.shields.io/badge/UI-Jetpack%20Compose-purple?style=for-the-badge" alt="Jetpack Compose">
@@ -113,16 +113,16 @@ The app follows a clean architecture pattern with the following components:
113113

114114
## 📱 Supported Android Versions
115115

116-
CCloud supports Android 9.0 (API level 28) and higher. The app is optimized for:
116+
CCloud supports Android 7.0 (API level 24) and higher. The app is optimized for:
117117

118-
- **Android 9.0 - 16** (API levels 28-36)
118+
- **Android 7.0 - 16** (API levels 24-36)
119119
- **Android TV** devices
120120
- **Tablets** and large-screen devices
121121

122122
### Compatibility Notes
123123

124-
- **Android 8.x and below**: Not supported due to Jetpack Compose limitations
125-
- **Android 9.0+**: Full feature support with optimal performance
124+
- **Android 6.0 and earlier**: Not supported due to Jetpack Compose limitations
125+
- **Android 7.0+**: Full feature support with optimal performance
126126
- **Android TV**: Specialized UI with remote control navigation
127127

128128
## Getting Started

app/build.gradle.kts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ android {
1414

1515
defaultConfig {
1616
applicationId = "com.pira.ccloud"
17-
// Supported Android versions: Android 9.0 (API 28) and higher
18-
// Android 8.x and below are not supported due to Jetpack Compose limitations
19-
minSdk = 26
17+
// Supported Android versions: Android 7.0 (API 24) and higher
18+
// Android 6.0 (API 23) and earlier are not supported
19+
minSdk = 24
2020
targetSdk = 36
21-
versionCode = 16
22-
versionName = "1.1.5"
21+
versionCode = 17
22+
versionName = "1.1.6"
2323

2424
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
25+
26+
// Add memory management options
27+
multiDexEnabled = true
2528
}
2629

2730
buildFeatures {
@@ -72,6 +75,13 @@ android {
7275
compose = true
7376
}
7477

78+
// Add compatibility configurations for older Android versions
79+
packagingOptions {
80+
resources {
81+
excludes += "/META-INF/{AL2.0,LGPL2.1}"
82+
}
83+
}
84+
7585
// Add support for different screen sizes including TV
7686
sourceSets {
7787
getByName("main") {

app/src/main/AndroidManifest.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
android:supportsRtl="false"
2424
android:theme="@style/Theme.CCloud"
2525
android:usesCleartextTraffic="true"
26+
android:hardwareAccelerated="true"
27+
android:largeHeap="true"
2628
tools:targetApi="31">
2729

2830
<!-- Main activity for mobile/tablet and TV -->
@@ -31,7 +33,8 @@
3133
android:exported="true"
3234
android:label="@string/app_name"
3335
android:theme="@style/Theme.CCloud"
34-
android:configChanges="orientation|screenSize|keyboardHidden">
36+
android:configChanges="orientation|screenSize|keyboardHidden"
37+
android:hardwareAccelerated="true">
3538
<intent-filter>
3639
<action android:name="android.intent.action.MAIN" />
3740
<category android:name="android.intent.category.LAUNCHER" />
@@ -49,7 +52,8 @@
4952
android:configChanges="orientation|screenSize|keyboardHidden|screenLayout|smallestScreenSize"
5053
android:screenOrientation="landscape"
5154
android:supportsPictureInPicture="false"
52-
android:resizeableActivity="false" />
55+
android:resizeableActivity="false"
56+
android:hardwareAccelerated="true" />
5357
</application>
5458

5559
</manifest>

app/src/main/java/com/pira/ccloud/screens/AboutScreen.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ import androidx.compose.ui.text.font.FontWeight
3838
import androidx.compose.ui.text.style.TextAlign
3939
import androidx.compose.ui.unit.dp
4040
import androidx.navigation.NavController
41+
import coil.compose.AsyncImage
42+
import coil.request.ImageRequest
4143
import com.pira.ccloud.BuildConfig
4244
import com.pira.ccloud.R
4345

@@ -81,8 +83,11 @@ fun AboutScreen(navController: NavController?) {
8183
horizontalAlignment = Alignment.CenterHorizontally
8284
) {
8385
// App Logo
84-
Image(
85-
painter = painterResource(id = R.drawable.splash_logo),
86+
AsyncImage(
87+
model = ImageRequest.Builder(LocalContext.current)
88+
.data(R.drawable.splash_logo)
89+
.crossfade(true)
90+
.build(),
8691
contentDescription = "App Logo",
8792
modifier = Modifier.size(120.dp)
8893
)

app/src/main/java/com/pira/ccloud/screens/SingleMovieScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ fun SourceOptionsDialog(
553553
modifier = Modifier.size(20.dp)
554554
)
555555
Spacer(modifier = Modifier.width(8.dp))
556-
Text("Play in App")
556+
Text("Play in CCloud")
557557
}
558558

559559
// Cancel button moved to the bottom of the dialog

app/src/main/java/com/pira/ccloud/screens/SplashScreen.kt

Lines changed: 12 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
package com.pira.ccloud.screens
22

3-
import android.view.animation.OvershootInterpolator
4-
import androidx.compose.animation.core.Animatable
5-
import androidx.compose.animation.core.tween
6-
import androidx.compose.foundation.Image
73
import androidx.compose.foundation.background
84
import androidx.compose.foundation.layout.Arrangement
95
import androidx.compose.foundation.layout.Column
@@ -15,50 +11,26 @@ import androidx.compose.material3.MaterialTheme
1511
import androidx.compose.material3.Text
1612
import androidx.compose.runtime.Composable
1713
import androidx.compose.runtime.LaunchedEffect
18-
import androidx.compose.runtime.remember
1914
import androidx.compose.ui.Alignment
2015
import androidx.compose.ui.Modifier
21-
import androidx.compose.ui.draw.alpha
22-
import androidx.compose.ui.draw.scale
2316
import androidx.compose.ui.graphics.Color
24-
import androidx.compose.ui.layout.ContentScale
25-
import androidx.compose.ui.res.painterResource
17+
import androidx.compose.ui.platform.LocalContext
2618
import androidx.compose.ui.text.font.FontWeight
2719
import androidx.compose.ui.text.style.TextAlign
2820
import androidx.compose.ui.unit.dp
2921
import androidx.compose.ui.unit.sp
30-
import com.pira.ccloud.BuildConfig // This might not be available immediately
22+
import com.pira.ccloud.BuildConfig
3123
import com.pira.ccloud.R
24+
import coil.compose.AsyncImage
25+
import coil.request.ImageRequest
3226
import kotlinx.coroutines.delay
3327

3428
@Composable
3529
fun SplashScreen(
3630
onTimeout: () -> Unit,
3731
backgroundColor: Color
3832
) {
39-
val scale = remember { Animatable(0f) }
40-
val alpha = remember { Animatable(0f) }
41-
4233
LaunchedEffect(Unit) {
43-
// Animate the logo scale
44-
scale.animateTo(
45-
targetValue = 1f,
46-
animationSpec = tween(
47-
durationMillis = 1000,
48-
easing = {
49-
OvershootInterpolator(2f).getInterpolation(it)
50-
}
51-
)
52-
)
53-
54-
// Animate the alpha for text
55-
alpha.animateTo(
56-
targetValue = 1f,
57-
animationSpec = tween(
58-
durationMillis = 800
59-
)
60-
)
61-
6234
// Wait for some time before navigating
6335
delay(2000)
6436
onTimeout()
@@ -71,13 +43,14 @@ fun SplashScreen(
7143
horizontalAlignment = Alignment.CenterHorizontally,
7244
verticalArrangement = Arrangement.Center
7345
) {
74-
Image(
75-
painter = painterResource(id = R.drawable.splash_logo),
46+
// App Logo
47+
AsyncImage(
48+
model = ImageRequest.Builder(LocalContext.current)
49+
.data(R.drawable.splash_logo)
50+
.crossfade(true)
51+
.build(),
7652
contentDescription = "App Logo",
77-
modifier = Modifier
78-
.size(120.dp)
79-
.scale(scale.value),
80-
contentScale = ContentScale.Fit
53+
modifier = Modifier.size(120.dp)
8154
)
8255

8356
Spacer(modifier = Modifier.height(32.dp))
@@ -94,7 +67,7 @@ fun SplashScreen(
9467
Spacer(modifier = Modifier.height(8.dp))
9568

9669
Text(
97-
text = "Version ${BuildConfig.VERSION_NAME ?: "1.0"}", // Add fallback
70+
text = "Version ${BuildConfig.VERSION_NAME ?: "1.0"}",
9871
style = MaterialTheme.typography.bodyMedium,
9972
color = MaterialTheme.colorScheme.onBackground.copy(alpha = 0.7f),
10073
textAlign = TextAlign.Center

0 commit comments

Comments
 (0)