Skip to content

Commit 52ba795

Browse files
authored
Merge pull request #93 from sameerasw/develop
Develop - New app icon and branding, Quick share impl
2 parents e6022e6 + 2124fd1 commit 52ba795

74 files changed

Lines changed: 3873 additions & 1336 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/build.gradle.kts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ plugins {
66
alias(libs.plugins.android.application)
77
alias(libs.plugins.google.ksp)
88
alias(libs.plugins.kotlin.compose)
9+
alias(libs.plugins.wire)
910
}
1011

1112
android {
@@ -16,8 +17,8 @@ android {
1617
applicationId = "com.sameerasw.airsync"
1718
minSdk = 30
1819
targetSdk = 36
19-
versionCode = 24
20-
versionName = "2.6.0"
20+
versionCode = 25
21+
versionName = "3.0.0"
2122

2223
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2324
}
@@ -60,7 +61,7 @@ kotlin {
6061
}
6162

6263
defaultConfig {
63-
buildConfigField("String", "MIN_MAC_APP_VERSION", "\"2.6.0\"")
64+
buildConfigField("String", "MIN_MAC_APP_VERSION", "\"3.0.0\"")
6465
}
6566
}
6667

@@ -150,4 +151,13 @@ dependencies {
150151
androidTestImplementation(libs.androidx.ui.test.junit4)
151152
debugImplementation(libs.androidx.ui.tooling)
152153
debugImplementation(libs.androidx.ui.test.manifest)
154+
155+
implementation(libs.wire.runtime)
156+
implementation(libs.bouncycastle)
157+
}
158+
159+
wire {
160+
kotlin {
161+
// Wire defaults to current project's proto directory
162+
}
153163
}

app/src/main/AndroidManifest.xml

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@
1212
<uses-permission android:name="android.permission.POST_PROMOTED_NOTIFICATIONS" />
1313
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
1414
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" />
15+
1516
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
1617
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
1718
<uses-permission android:name="android.permission.READ_WALLPAPER_INTERNAL" />
1819

1920

21+
2022
<!-- Permission for downloading updates -->
2123
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
2224

@@ -87,30 +89,7 @@
8789
</intent-filter>
8890
</activity>
8991

90-
<!-- Share target activity for text sharing -->
91-
<activity
92-
android:name=".presentation.ui.activities.ShareActivity"
93-
android:exported="true"
94-
android:theme="@android:style/Theme.Translucent.NoTitleBar"
95-
android:noHistory="true">
96-
<intent-filter>
97-
<action android:name="android.intent.action.SEND" />
98-
<category android:name="android.intent.category.DEFAULT" />
99-
<data android:mimeType="text/plain" />
100-
</intent-filter>
101-
<!-- Accept any single file type -->
102-
<intent-filter>
103-
<action android:name="android.intent.action.SEND" />
104-
<category android:name="android.intent.category.DEFAULT" />
105-
<data android:mimeType="*/*" />
106-
</intent-filter>
107-
<!-- Accept multiple files -->
108-
<intent-filter>
109-
<action android:name="android.intent.action.SEND_MULTIPLE" />
110-
<category android:name="android.intent.category.DEFAULT" />
111-
<data android:mimeType="*/*" />
112-
</intent-filter>
113-
</activity>
92+
11493

11594
<activity
11695
android:name=".presentation.ui.activities.ClipboardActionActivity"
@@ -181,6 +160,8 @@
181160
</intent-filter>
182161
</service>
183162

163+
164+
184165
<!-- Wake-up Service for receiving reconnection requests from Mac -->
185166
<service
186167
android:name=".service.WakeupService"
@@ -192,6 +173,11 @@
192173
android:exported="false"
193174
android:foregroundServiceType="connectedDevice" />
194175

176+
<service
177+
android:name=".quickshare.QuickShareService"
178+
android:exported="false"
179+
android:foregroundServiceType="connectedDevice" />
180+
195181
<!-- Call Receiver - listens for telephony events -->
196182
<receiver
197183
android:name=".service.CallReceiver"

app/src/main/java/com/sameerasw/airsync/data/local/DataStoreManager.kt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ class DataStoreManager(private val context: Context) {
9191
private val USE_BLUR = booleanPreferencesKey("use_blur")
9292
private val PITCH_BLACK_THEME = booleanPreferencesKey("pitch_black_theme")
9393
private val SENTRY_REPORTING_ENABLED = booleanPreferencesKey("sentry_reporting_enabled")
94+
private val QUICK_SHARE_ENABLED = booleanPreferencesKey("quick_share_enabled")
9495

9596
// Widget preferences
9697
private val WIDGET_TRANSPARENCY = androidx.datastore.preferences.core.floatPreferencesKey("widget_transparency")
@@ -328,6 +329,18 @@ class DataStoreManager(private val context: Context) {
328329
}
329330
}
330331

332+
suspend fun setQuickShareEnabled(enabled: Boolean) {
333+
context.dataStore.edit { preferences ->
334+
preferences[QUICK_SHARE_ENABLED] = enabled
335+
}
336+
}
337+
338+
fun isQuickShareEnabled(): Flow<Boolean> {
339+
return context.dataStore.data.map { preferences ->
340+
preferences[QUICK_SHARE_ENABLED] ?: false // Default to disabled
341+
}
342+
}
343+
331344
suspend fun setDefaultTab(tab: String) {
332345
context.dataStore.edit { prefs ->
333346
prefs[DEFAULT_TAB] = tab

app/src/main/java/com/sameerasw/airsync/data/repository/AirSyncRepositoryImpl.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,4 +287,12 @@ class AirSyncRepositoryImpl(
287287
override fun hasRatedApp(): Flow<Boolean> {
288288
return dataStoreManager.hasRatedApp()
289289
}
290+
291+
override suspend fun setQuickShareEnabled(enabled: Boolean) {
292+
dataStoreManager.setQuickShareEnabled(enabled)
293+
}
294+
295+
override fun isQuickShareEnabled(): Flow<Boolean> {
296+
return dataStoreManager.isQuickShareEnabled()
297+
}
290298
}

app/src/main/java/com/sameerasw/airsync/domain/model/UiState.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,6 @@ data class UiState(
4848
val isBlurEnabled: Boolean = true,
4949
val isSentryReportingEnabled: Boolean = true,
5050
val isOnboardingCompleted: Boolean = true,
51-
val widgetTransparency: Float = 1f
51+
val widgetTransparency: Float = 1f,
52+
val isQuickShareEnabled: Boolean = false
5253
)

app/src/main/java/com/sameerasw/airsync/domain/repository/AirSyncRepository.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,8 @@ interface AirSyncRepository {
128128
fun getLastPromptDismissedVersion(): Flow<Int>
129129
suspend fun setHasRatedApp(hasRated: Boolean)
130130
fun hasRatedApp(): Flow<Boolean>
131+
132+
// Quick Share (receiving)
133+
suspend fun setQuickShareEnabled(enabled: Boolean)
134+
fun isQuickShareEnabled(): Flow<Boolean>
131135
}

app/src/main/java/com/sameerasw/airsync/presentation/ui/activities/ShareActivity.kt

Lines changed: 0 additions & 162 deletions
This file was deleted.

0 commit comments

Comments
 (0)