Skip to content

Commit

Permalink
Merge pull request #584 from CCExtractor/features
Browse files Browse the repository at this point in the history
Features
  • Loading branch information
AryanSarafDev authored Aug 17, 2024
2 parents a7b0b92 + 7c587ea commit 73388af
Show file tree
Hide file tree
Showing 86 changed files with 19,919 additions and 3,395 deletions.
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "uac2-7d0f9"
}
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@ app.*.map.json
/windows/flutter/generated_plugin_registrant.cc
/windows/flutter/generated_plugin_registrant.h
/windows/flutter/generated_plugins.cmake
/lib/firebase_options.dart
/firebase.json
8 changes: 4 additions & 4 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ if (flutterRoot == null) {

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
flutterVersionCode = '2'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
flutterVersionName = '0.2.0'
}

apply plugin: 'com.android.application'
Expand All @@ -32,7 +32,7 @@ if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
compileSdkVersion 34
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down Expand Up @@ -72,7 +72,7 @@ android {
// Signing with the debug keys for now, so `flutter run --release` works.
minifyEnabled true
shrinkResources true
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
}
}
}
Expand Down
37 changes: 0 additions & 37 deletions android/app/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,43 +49,6 @@
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:127901953489:android:02cb55ff82004bb03fc4f0",
"android_client_info": {
"package_name": "com.example.ultimate_alarm_clock"
}
},
"oauth_client": [
{
"client_id": "127901953489-09r774m4cup6mlt341i2v9fpbhngmq2h.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.example.ultimate_alarm_clock",
"certificate_hash": "30bf4033c248d9a3ecccbe3615c8baec5f4ed31a"
}
},
{
"client_id": "127901953489-lnsmj324f5eutudkjvaidotj99bq1l47.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCEaWUdYF_PnGFu0uJL8Zl_BlT8knDVeHg"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "127901953489-lnsmj324f5eutudkjvaidotj99bq1l47.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
Expand Down
7 changes: 7 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-permission
android:name="android.permission.WRITE_SETTINGS"
tools:ignore="ProtectedPermissions" />
Expand Down Expand Up @@ -46,6 +48,7 @@
android:name="com.ccextractor.ultimate_alarm_clock.ScreenMonitorService"
android:enabled="true"
android:exported="true"></service>

<service
android:name=".WeatherFetcherService"
android:foregroundServiceType="location"
Expand All @@ -56,6 +59,10 @@
android:foregroundServiceType="location"
android:enabled="true"
android:exported="true"></service>
<service
android:name=".SpotifyPlayerService"
android:enabled="true"
android:exported="true"></service>
<service android:name="com.pravera.flutter_foreground_task.service.ForegroundService" />

<receiver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ package com.ccextractor.ultimate_alarm_clock
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.location.LocationManager
import androidx.core.content.ContextCompat
import com.ultimate_alarm_clock.Utilities.LocationHelper
import kotlin.math.*


class AlarmReceiver : BroadcastReceiver() {
Expand All @@ -16,6 +11,8 @@ class AlarmReceiver : BroadcastReceiver() {
return
}




val flutterIntent = Intent(context, MainActivity::class.java).apply {
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ class BootReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {

if (intent.action == Intent.ACTION_BOOT_COMPLETED) {
val sharedPreferences = context.getSharedPreferences("FlutterSharedPreferences", Context.MODE_PRIVATE)
val profile = sharedPreferences.getString("flutter.profile", "Default")

val dbHelper = DatabaseHelper(context)
val db = dbHelper.readableDatabase
val ringTime = getLatestAlarm(db, true)
val ringTime = getLatestAlarm(db, true, profile?:"Default")
db.close()
if (ringTime != null) {
scheduleAlarm(ringTime["interval"]!! as Long, context, ringTime["isActivity"]!!)
Expand Down
Loading

0 comments on commit 73388af

Please sign in to comment.