>
24 |
25 | /**
26 | * Count the number of created alarm statistics.
27 | *
28 | * @return The number of created alarm statistics.
29 | */
30 | @Query("SELECT COUNT(id) FROM nfc_tag")
31 | suspend fun count(): Long
32 |
33 | /**
34 | * Delete an NFC tag.
35 | *
36 | * @param nfcTag An NFC tag to delete.
37 | *
38 | * @return The number of rows deleted.
39 | */
40 | @Delete
41 | suspend fun delete(nfcTag: NacNfcTag): Int
42 |
43 | /**
44 | * Find an NFC tag.
45 | *
46 | * @param nfcId The ID of the NFC tag to find.
47 | *
48 | * @return The NFC tag with the ID.
49 | */
50 | @Query("SELECT * FROM nfc_tag WHERE nfc_id=:nfcId")
51 | suspend fun findNfcTag(nfcId: String): NacNfcTag?
52 |
53 | /**
54 | * Get all NFC tags.
55 | *
56 | * This will wait until all alarms are selected.
57 | *
58 | * @return All NFC tags.
59 | */
60 | @Query("SELECT * FROM nfc_tag ORDER BY name")
61 | suspend fun getAllNfcTags(): List
62 |
63 | /**
64 | * Insert an NFC tag.
65 | *
66 | * @param nfcTag The NFC tag to insert.
67 | *
68 | * @return The row ID of the NFC tag that was inserted.
69 | */
70 | @Insert
71 | suspend fun insert(nfcTag: NacNfcTag): Long
72 |
73 | /**
74 | * Update an existing NFC tag.
75 | *
76 | * @param nfcTag The NFC tag to update.
77 | *
78 | * @return The number of NFC tags updated.
79 | */
80 | @Update
81 | suspend fun update(nfcTag: NacNfcTag): Int
82 |
83 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/alarm/options/startweekon/NacStartWeekOnDialog.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.alarm.options.startweekon
2 |
3 | import android.app.AlertDialog
4 | import android.app.Dialog
5 | import android.os.Bundle
6 | import com.nfcalarmclock.R
7 | import com.nfcalarmclock.view.dialog.NacDialogFragment
8 |
9 | /**
10 | * Show a dialog asking the user which day they want to start the week on.
11 | */
12 | class NacStartWeekOnDialog
13 | : NacDialogFragment()
14 | {
15 |
16 | /**
17 | * Listener for when a start week is selected.
18 | */
19 | fun interface OnStartWeekSelectedListener
20 | {
21 | fun onStartWeekSelected(which: Int)
22 | }
23 |
24 | /**
25 | * Default start week on index.
26 | *
27 | * This will be changed externally.
28 | */
29 | var defaultStartWeekOnIndex: Int = 0
30 |
31 | /**
32 | * The current start week on index.
33 | */
34 | private var currentSelectedStartWeekOnIndex: Int = defaultStartWeekOnIndex
35 |
36 | /**
37 | * Listener for when an audio option is clicked.
38 | */
39 | var onStartWeekSelectedListener: OnStartWeekSelectedListener? = null
40 |
41 | /**
42 | * Called when the dialog is created.
43 | */
44 | override fun onCreateDialog(savedInstanceState: Bundle?): Dialog
45 | {
46 | // Setup the shared preferences
47 | setupSharedPreferences()
48 |
49 | // Create the dialog
50 | return AlertDialog.Builder(requireContext())
51 | .setTitle(R.string.title_start_week_on)
52 | .setPositiveButton(R.string.action_ok) { _, _ ->
53 |
54 | // Call the listener
55 | onStartWeekSelectedListener?.onStartWeekSelected(currentSelectedStartWeekOnIndex)
56 |
57 | }
58 | .setNegativeButton(R.string.action_cancel, null)
59 | .setSingleChoiceItems(R.array.start_week_on, defaultStartWeekOnIndex) { _, which: Int ->
60 |
61 | // Set the current selected index
62 | currentSelectedStartWeekOnIndex = which
63 |
64 | }
65 | .create()
66 | }
67 |
68 | companion object
69 | {
70 |
71 | /**
72 | * Tag for the class.
73 | */
74 | const val TAG = "NacStartWeekOnDialog"
75 |
76 | }
77 |
78 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/alarm/options/tts/NacTranslate.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.alarm.options.tts
2 |
3 | import android.content.Context
4 | import com.nfcalarmclock.R
5 | import com.nfcalarmclock.util.NacCalendar
6 | import java.util.Calendar
7 |
8 | /**
9 | * How to translate certain phrases to other languages.
10 | */
11 | object NacTranslate
12 | {
13 |
14 | /**
15 | * Get how to say the current time in any language.
16 | */
17 | private fun getSayCurrentTime(context: Context): String
18 | {
19 | // Get the current hour and minute
20 | val calendar = Calendar.getInstance()
21 | val hour = calendar[Calendar.HOUR_OF_DAY]
22 | val minute = calendar[Calendar.MINUTE]
23 |
24 | // Get the meridian (if it should be used based on the user's preferences)
25 | val meridian = NacCalendar.getMeridian(context, hour)
26 |
27 | // Get the hour and minutes how they should be said by TTS
28 | val showHour = if (meridian.isNotEmpty()) hour.toString() else NacCalendar.to12HourFormat(hour)
29 | val showMinute = minute.toString().padStart(2, '0')
30 |
31 | // Return the TTS phrase
32 | return context.resources.getString(R.string.tts_say_time, showHour, showMinute, meridian)
33 | }
34 |
35 | /**
36 | * Get how to say the alarm reminder in any language.
37 | */
38 | fun getSayReminder(
39 | context: Context,
40 | name: String,
41 | minute: Int
42 | ): String
43 | {
44 | // Get the alarm name if it is set, but if it is empty, then get the
45 | // generic name for an alarm
46 | val reminder = name.ifEmpty { context.resources.getString(R.string.word_alarm) }
47 |
48 | // Return the statement that should be said
49 | return context.resources.getQuantityString(R.plurals.tts_say_reminder, minute,
50 | reminder, minute)
51 | }
52 |
53 | /**
54 | * The text-to-speech phrase to say.
55 | */
56 | fun getTtsPhrase(
57 | context: Context,
58 | shouldSayCurrentTime: Boolean,
59 | shouldSayAlarmName: Boolean,
60 | alarmName: String
61 | ): String
62 | {
63 | // Initialize the phrase
64 | var phrase = ""
65 |
66 | // Say the current time
67 | if (shouldSayCurrentTime)
68 | {
69 | phrase += getSayCurrentTime(context)
70 | }
71 |
72 | // Say the alarm name
73 | if (shouldSayAlarmName)
74 | {
75 | phrase += " "
76 | phrase += alarmName
77 | }
78 |
79 | return phrase
80 | }
81 |
82 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/card/NacCardLayoutManager.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.card
2 |
3 | import android.content.Context
4 | import android.util.DisplayMetrics
5 | import androidx.recyclerview.widget.LinearLayoutManager
6 | import androidx.recyclerview.widget.LinearSmoothScroller
7 | import androidx.recyclerview.widget.RecyclerView
8 |
9 | /**
10 | * Linear layout manager for a recyclerview that is primarily used because it
11 | * handles the smooth scrolling.
12 | */
13 | class NacCardLayoutManager(context: Context)
14 | : LinearLayoutManager(context)
15 | {
16 |
17 | /**
18 | * Smooth scrol lto the specified adapeter position.
19 | */
20 | override fun smoothScrollToPosition(
21 | recyclerView: RecyclerView,
22 | state: RecyclerView.State,
23 | position: Int)
24 | {
25 | // Create a smooth scroller
26 | val smoothScroller = SmoothScroller(recyclerView.context, position)
27 |
28 | // Start the smooth scroll
29 | startSmoothScroll(smoothScroller)
30 | }
31 |
32 | /**
33 | * Smooth scroller
34 | */
35 | class SmoothScroller(context: Context?, position: Int)
36 | : LinearSmoothScroller(context)
37 | {
38 |
39 | companion object
40 | {
41 |
42 | /**
43 | * Speed to scroll in millimeters per pixel.
44 | */
45 | private const val SPEED = 50f
46 |
47 | }
48 |
49 | /**
50 | * Constructor.
51 | */
52 | init
53 | {
54 | targetPosition = position
55 | }
56 |
57 | /**
58 | * Calculate the amount to scroll to consider the view visible.
59 | */
60 | override fun calculateDtToFit(viewStart: Int,
61 | viewEnd: Int,
62 | boxStart: Int,
63 | boxEnd: Int,
64 | snapPreference: Int): Int
65 | {
66 | return (boxStart + (boxEnd - boxStart) / 2) - (viewStart + (viewEnd - viewStart) / 2)
67 | }
68 |
69 | /**
70 | * Calculate the scroll speed.
71 | */
72 | override fun calculateSpeedPerPixel(dm: DisplayMetrics): Float
73 | {
74 | return SPEED / dm.densityDpi
75 | }
76 |
77 | }
78 |
79 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/settings/NacGenericSettingFragment.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.settings
2 |
3 | import android.content.Context
4 | import androidx.preference.PreferenceFragmentCompat
5 | import com.nfcalarmclock.shared.NacSharedPreferences
6 |
7 | /**
8 | * Settings fragment.
9 | */
10 | abstract class NacGenericSettingFragment
11 | : PreferenceFragmentCompat()
12 | {
13 |
14 | /**
15 | * Shared preference store.
16 | */
17 | protected var sharedPreferences: NacSharedPreferences? = null
18 |
19 | /**
20 | * Called when the fragment is attached.
21 | */
22 | override fun onAttach(context: Context)
23 | {
24 | // Super
25 | super.onAttach(context)
26 |
27 | // Set the shared preferences
28 | sharedPreferences = NacSharedPreferences(context)
29 | }
30 |
31 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/settings/preference/NacPreferenceCategory.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.settings.preference
2 |
3 | import android.R
4 | import android.content.Context
5 | import android.util.AttributeSet
6 | import android.widget.TextView
7 | import androidx.preference.PreferenceCategory
8 | import androidx.preference.PreferenceViewHolder
9 | import com.nfcalarmclock.shared.NacSharedPreferences
10 |
11 | /**
12 | * Preference category.
13 | */
14 | class NacPreferenceCategory
15 | : PreferenceCategory
16 | {
17 |
18 | /**
19 | * Shared preferences.
20 | */
21 | private var sharedPreferences: NacSharedPreferences = NacSharedPreferences(context)
22 |
23 | /**
24 | * Constructor.
25 | */
26 | constructor(context: Context) : super(context)
27 | {
28 | }
29 |
30 | /**
31 | * Constructor.
32 | */
33 | constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
34 | {
35 | }
36 |
37 | /**
38 | * Constructor.
39 | */
40 | constructor(context: Context, attrs: AttributeSet?, style: Int) : super(context, attrs, style)
41 | {
42 | }
43 |
44 | /**
45 | * Constructor.
46 | */
47 | init
48 | {
49 | isIconSpaceReserved = false
50 | }
51 |
52 | /**
53 | * Called when the view holder is bound.
54 | */
55 | override fun onBindViewHolder(holder: PreferenceViewHolder)
56 | {
57 | // Super
58 | super.onBindViewHolder(holder)
59 |
60 | // Get the title text view
61 | val title = holder.findViewById(R.id.title) as TextView
62 |
63 | // Set the title text color
64 | title.setTextColor(sharedPreferences.themeColor)
65 | }
66 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/statistics/AreYouSureResetStatisticsDialog.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.statistics
2 |
3 | import android.app.AlertDialog
4 | import android.app.Dialog
5 | import android.os.Bundle
6 | import com.nfcalarmclock.R
7 | import com.nfcalarmclock.view.dialog.NacDialogFragment
8 |
9 | class AreYouSureResetStatisticsDialog
10 | : NacDialogFragment()
11 | {
12 |
13 | companion object
14 | {
15 |
16 | /**
17 | * Tag for the class.
18 | */
19 | const val TAG = "AreYouSureDialog"
20 |
21 | }
22 |
23 | /**
24 | * Listener for when the user has indicated they would like to reset
25 | * statistics.
26 | */
27 | fun interface OnResetStatisticsListener
28 | {
29 | fun onResetStatistics()
30 | }
31 |
32 | /**
33 | * Listener for when the user has indicated they would like to reset
34 | * statistics.
35 | */
36 | var onResetStatisticsListener: OnResetStatisticsListener? = null
37 |
38 | /**
39 | * Called when the dialog is created.
40 | */
41 | override fun onCreateDialog(savedInstanceState: Bundle?): Dialog
42 | {
43 | // Setup the shared preferences
44 | setupSharedPreferences()
45 |
46 | // Build the dialog
47 | return AlertDialog.Builder(requireContext())
48 | .setPositiveButton(R.string.action_yes) { _, _ ->
49 |
50 | // Call the listener
51 | onResetStatisticsListener?.onResetStatistics()
52 |
53 | }
54 | .setNegativeButton(R.string.action_no, null)
55 | .setTitle(R.string.title_reset_statistics)
56 | .setMessage(R.string.message_reset_statistics)
57 | .create()
58 | }
59 |
60 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/statistics/db/NacAlarmCreatedStatistic.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.statistics.db
2 |
3 | import androidx.room.Entity
4 | import dagger.Module
5 | import dagger.Provides
6 | import dagger.hilt.InstallIn
7 | import dagger.hilt.components.SingletonComponent
8 |
9 | /**
10 | * Statistics for when an alarm is created.
11 | */
12 | @Entity(tableName = "alarm_created_statistic",
13 | ignoredColumns = ["alarm_id", "hour", "minute", "name"])
14 | class NacAlarmCreatedStatistic
15 | : NacAlarmStatistic()
16 | {
17 |
18 | /**
19 | * Check if two stats are equal, except for the ID.
20 | */
21 | override fun equalsExceptId(stat: NacAlarmStatistic): Boolean
22 | {
23 | return (timestamp == stat.timestamp)
24 | }
25 |
26 | /**
27 | * Convert the data to a csv format so that it can be used to write to an
28 | * output file.
29 | */
30 | override fun toCsvFormat(): String
31 | {
32 | return "$timestamp"
33 | }
34 |
35 | }
36 |
37 | /**
38 | * Hilt module to provide an instance of a created statistic.
39 | */
40 | @InstallIn(SingletonComponent::class)
41 | @Module
42 | class NacAlarmCreatedStatisticModule
43 | {
44 |
45 | /**
46 | * Provide an instance of a created statistic.
47 | */
48 | @Provides
49 | fun provideCreatedStatistic() : NacAlarmCreatedStatistic
50 | {
51 | return NacAlarmCreatedStatistic()
52 | }
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/statistics/db/NacAlarmCreatedStatisticDao.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.statistics.db
2 |
3 | import androidx.room.Dao
4 | import androidx.room.Query
5 |
6 | /**
7 | * Data access object for storing when alarms were created.
8 | */
9 | @Dao
10 | interface NacAlarmCreatedStatisticDao
11 | : NacAlarmStatisticDao
12 | {
13 |
14 | /**
15 | * Count the number of created alarm statistics.
16 | *
17 | * @return The number of created alarm statistics.
18 | */
19 | @Query("SELECT COUNT(id) FROM alarm_created_statistic")
20 | suspend fun count(): Long
21 |
22 | /**
23 | * Delete all rows from the table.
24 | */
25 | @Query("DELETE FROM alarm_created_statistic")
26 | suspend fun deleteAll(): Int
27 |
28 | /**
29 | * Get the date when the first alarm was created.
30 | *
31 | * @return The date when the first alarm was created.
32 | */
33 | @Query("SELECT MIN(timestamp) FROM alarm_created_statistic LIMIT 1")
34 | suspend fun firstCreatedTimestamp(): Long
35 |
36 | /**
37 | * Get all instances when alarms were created.
38 | *
39 | * @return All instances when alarms were created.
40 | */
41 | @Query("SELECT * FROM alarm_created_statistic")
42 | suspend fun getAll(): List
43 |
44 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/statistics/db/NacAlarmDeletedStatistic.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.statistics.db
2 |
3 | import androidx.room.Entity
4 | import com.nfcalarmclock.alarm.db.NacAlarm
5 | import dagger.Module
6 | import dagger.Provides
7 | import dagger.hilt.InstallIn
8 | import dagger.hilt.components.SingletonComponent
9 |
10 | /**
11 | * Statistics for when an alarm is deleted.
12 | */
13 | @Entity(tableName = "alarm_deleted_statistic",
14 | ignoredColumns = ["alarm_id"])
15 | class NacAlarmDeletedStatistic
16 | : NacAlarmStatistic
17 | {
18 |
19 | /**
20 | * Constructor.
21 | */
22 | constructor() : super()
23 |
24 | /**
25 | * Constructor.
26 | */
27 | constructor(alarm: NacAlarm?) : super(alarm)
28 |
29 | }
30 |
31 | /**
32 | * Hilt module to provide an instance of a deleted statistic.
33 | */
34 | @InstallIn(SingletonComponent::class)
35 | @Module
36 | class NacAlarmDeletedStatisticModule
37 | {
38 |
39 | /**
40 | * Provide an instance of a deleted statistic.
41 | */
42 | @Provides
43 | fun provideDeletedStatistic() : NacAlarmDeletedStatistic
44 | {
45 | return NacAlarmDeletedStatistic()
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/statistics/db/NacAlarmDeletedStatisticDao.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.statistics.db
2 |
3 | import androidx.room.Dao
4 | import androidx.room.Query
5 |
6 | /**
7 | * Data access object for storing when alarms were deleted.
8 | */
9 | @Dao
10 | interface NacAlarmDeletedStatisticDao
11 | : NacAlarmStatisticDao
12 | {
13 |
14 | /**
15 | * Count the number of deleted alarm statistics.
16 | *
17 | * @return The number of deleted alarm statistics.
18 | */
19 | @Query("SELECT COUNT(id) FROM alarm_deleted_statistic")
20 | suspend fun count(): Long
21 |
22 | /**
23 | * Delete all rows from the table.
24 | */
25 | @Query("DELETE FROM alarm_deleted_statistic")
26 | suspend fun deleteAll(): Int
27 |
28 | /**
29 | * Get all instances when alarms were deleted.
30 | *
31 | * @return All instances when alarms were deleted.
32 | */
33 | @Query("SELECT * FROM alarm_deleted_statistic")
34 | suspend fun getAll(): List
35 |
36 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/statistics/db/NacAlarmDismissedStatistic.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.statistics.db
2 |
3 | import androidx.room.ColumnInfo
4 | import androidx.room.Entity
5 | import com.nfcalarmclock.alarm.db.NacAlarm
6 | import dagger.Module
7 | import dagger.Provides
8 | import dagger.hilt.InstallIn
9 | import dagger.hilt.components.SingletonComponent
10 |
11 | /**
12 | * Statistics for when an alarm is dismissed.
13 | */
14 | @Entity(tableName = "alarm_dismissed_statistic")
15 | class NacAlarmDismissedStatistic
16 | : NacAlarmStatistic
17 | {
18 |
19 | /**
20 | * Whether the alarm used NFC to dismiss or not.
21 | */
22 | @ColumnInfo(name = "used_nfc")
23 | var usedNfc = false
24 |
25 | /**
26 | * Constructor.
27 | */
28 | constructor() : super()
29 |
30 | /**
31 | * Constructor.
32 | */
33 | constructor(alarm: NacAlarm?) : super(alarm)
34 |
35 | /**
36 | * Constructor.
37 | */
38 | constructor(alarm: NacAlarm?, usedNfc: Boolean) : this(alarm)
39 | {
40 | this.usedNfc = usedNfc
41 | }
42 |
43 | /**
44 | * Check if two stats are equal, except for the ID.
45 | */
46 | fun equalsExceptId(stat: NacAlarmDismissedStatistic): Boolean
47 | {
48 | return super.equalsExceptId(stat)
49 | && (usedNfc == stat.usedNfc)
50 | }
51 |
52 | /**
53 | * Convert the data to a csv format so that it can be used to write to an
54 | * output file.
55 | */
56 | override fun toCsvFormat(): String
57 | {
58 | val csv = super.toCsvFormat()
59 |
60 | return "${csv},${usedNfc}"
61 | }
62 |
63 | }
64 |
65 | /**
66 | * Hilt module to provide an instance of a dismissed statistic.
67 | */
68 | @InstallIn(SingletonComponent::class)
69 | @Module
70 | class NacAlarmDismissedStatisticModule
71 | {
72 |
73 | /**
74 | * Provide an instance of a dismissed statistic.
75 | */
76 | @Provides
77 | fun provideDismissedStatistic() : NacAlarmDismissedStatistic
78 | {
79 | return NacAlarmDismissedStatistic()
80 | }
81 |
82 | }
83 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/statistics/db/NacAlarmDismissedStatisticDao.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.statistics.db
2 |
3 | import androidx.room.Dao
4 | import androidx.room.Query
5 |
6 | /**
7 | * Data access object for storing when alarms were dismissed.
8 | */
9 | @Dao
10 | interface NacAlarmDismissedStatisticDao
11 | : NacAlarmStatisticDao
12 | {
13 |
14 | /**
15 | * Cound the number of dismissed alarm statistics.
16 | *
17 | * @return The number of dismissed alarm statistics.
18 | */
19 | @Query("SELECT COUNT(id) FROM alarm_dismissed_statistic")
20 | suspend fun count(): Long
21 |
22 | /**
23 | * Delete all rows from the table.
24 | */
25 | @Query("DELETE FROM alarm_dismissed_statistic")
26 | suspend fun deleteAll(): Int
27 |
28 | /**
29 | * Count the number of dismissed with NFC alarm statistics.
30 | *
31 | * @return The number of dismissed with NFC alarm statistics.
32 | */
33 | @Query("SELECT COUNT(id) FROM alarm_dismissed_statistic WHERE used_nfc=1")
34 | suspend fun nfcCount(): Long
35 |
36 | /**
37 | * Get all instances when alarms were dismissed.
38 | *
39 | * @return All instances when alarms were dismissed.
40 | */
41 | @Query("SELECT * FROM alarm_dismissed_statistic")
42 | suspend fun getAll(): List
43 |
44 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/statistics/db/NacAlarmMissedStatistic.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.statistics.db
2 |
3 | import androidx.room.Entity
4 | import com.nfcalarmclock.alarm.db.NacAlarm
5 | import dagger.Module
6 | import dagger.Provides
7 | import dagger.hilt.InstallIn
8 | import dagger.hilt.components.SingletonComponent
9 |
10 | /**
11 | * Statistics for when an alarm is missed.
12 | */
13 | @Entity(tableName = "alarm_missed_statistic")
14 | class NacAlarmMissedStatistic
15 | : NacAlarmStatistic
16 | {
17 |
18 | /**
19 | * Constructor.
20 | */
21 | constructor() : super()
22 |
23 | /**
24 | * Constructor.
25 | */
26 | constructor(alarm: NacAlarm?) : super(alarm)
27 |
28 | }
29 |
30 | /**
31 | * Hilt module to provide an instance of a missed statistic.
32 | */
33 | @InstallIn(SingletonComponent::class)
34 | @Module
35 | class NacAlarmMissedStatisticModule
36 | {
37 |
38 | /**
39 | * Provide an instance of a missed statistic.
40 | */
41 | @Provides
42 | fun provideMissedStatistic() : NacAlarmMissedStatistic
43 | {
44 | return NacAlarmMissedStatistic()
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/statistics/db/NacAlarmMissedStatisticDao.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.statistics.db
2 |
3 | import androidx.room.Dao
4 | import androidx.room.Query
5 |
6 | /**
7 | * Data access object for storing when alarms were missed.
8 | */
9 | @Dao
10 | interface NacAlarmMissedStatisticDao
11 | : NacAlarmStatisticDao
12 | {
13 |
14 | /**
15 | * Count the number of missed alarm statistics.
16 | *
17 | * @return The number of missed alarm statistics.
18 | */
19 | @Query("SELECT COUNT(id) FROM alarm_missed_statistic")
20 | suspend fun count(): Long
21 |
22 | /**
23 | * Delete all rows from the table.
24 | */
25 | @Query("DELETE FROM alarm_missed_statistic")
26 | suspend fun deleteAll(): Int
27 |
28 | /**
29 | * Get all instances when alarms were missed.
30 | *
31 | * @return All instances when alarms were missed.
32 | */
33 | @Query("SELECT * FROM alarm_missed_statistic")
34 | suspend fun getAll(): List
35 |
36 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/statistics/db/NacAlarmSnoozedStatistic.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.statistics.db
2 |
3 | import androidx.room.ColumnInfo
4 | import androidx.room.Entity
5 | import com.nfcalarmclock.alarm.db.NacAlarm
6 | import dagger.Module
7 | import dagger.Provides
8 | import dagger.hilt.InstallIn
9 | import dagger.hilt.components.SingletonComponent
10 |
11 | /**
12 | * Statistics for when an alarm is snoozed.
13 | */
14 | @Entity(tableName = "alarm_snoozed_statistic")
15 | class NacAlarmSnoozedStatistic
16 | : NacAlarmStatistic
17 | {
18 |
19 | /**
20 | * Duration of the snooze.
21 | */
22 | @ColumnInfo(name = "duration", defaultValue = "0")
23 | var duration: Long = 0
24 |
25 | /**
26 | * Constructor.
27 | */
28 | constructor() : super()
29 |
30 | /**
31 | * Constructor.
32 | */
33 | constructor(alarm: NacAlarm?) : super(alarm)
34 |
35 | /**
36 | * Constructor.
37 | */
38 | constructor(alarm: NacAlarm?, duration: Long) : this(alarm)
39 | {
40 | this.duration = duration
41 | }
42 |
43 | /**
44 | * Check if two stats are equal, except for the ID.
45 | */
46 | fun equalsExceptId(stat: NacAlarmSnoozedStatistic): Boolean
47 | {
48 | return super.equalsExceptId(stat)
49 | && (duration == stat.duration)
50 | }
51 |
52 | /**
53 | * Convert the data to a csv format so that it can be used to write to an
54 | * output file.
55 | */
56 | override fun toCsvFormat(): String
57 | {
58 | val csv = super.toCsvFormat()
59 |
60 | return "${csv},${duration}"
61 | }
62 |
63 | }
64 |
65 | /**
66 | * Hilt module to provide an instance of a snoozed statistic.
67 | */
68 | @InstallIn(SingletonComponent::class)
69 | @Module
70 | class NacAlarmSnoozedStatisticModule
71 | {
72 |
73 | /**
74 | * Provide an instance of a snoozed statistic.
75 | */
76 | @Provides
77 | fun provideSnoozedStatistic() : NacAlarmSnoozedStatistic
78 | {
79 | return NacAlarmSnoozedStatistic()
80 | }
81 |
82 | }
83 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/statistics/db/NacAlarmSnoozedStatisticDao.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.statistics.db
2 |
3 | import androidx.room.Dao
4 | import androidx.room.Query
5 |
6 | /**
7 | * Data access object for storing when alarms were snoozed.
8 | */
9 | @Dao
10 | interface NacAlarmSnoozedStatisticDao
11 | : NacAlarmStatisticDao
12 | {
13 |
14 | /**
15 | * Count the number of snoozed alarm statistics.
16 | *
17 | * @return The number of snoozed alarm statistics.
18 | */
19 | @Query("SELECT COUNT(id) FROM alarm_snoozed_statistic")
20 | suspend fun count(): Long
21 |
22 | /**
23 | * Delete all rows from the table.
24 | */
25 | @Query("DELETE FROM alarm_snoozed_statistic")
26 | suspend fun deleteAll(): Int
27 |
28 | /**
29 | * Get the total snooze duration.
30 | *
31 | * @return The total snooze duration.
32 | */
33 | @Query("SELECT SUM(duration) FROM alarm_snoozed_statistic")
34 | suspend fun totalDuration(): Long
35 |
36 | /**
37 | * Get all instances when alarms were snoozed.
38 | *
39 | * @return All instances when alarms were snoozed.
40 | */
41 | @Query("SELECT * FROM alarm_snoozed_statistic")
42 | suspend fun getAll(): List
43 |
44 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/statistics/db/NacAlarmStatistic.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.statistics.db
2 |
3 | import androidx.room.ColumnInfo
4 | import androidx.room.PrimaryKey
5 | import com.nfcalarmclock.alarm.db.NacAlarm
6 | import java.util.Date
7 |
8 | /**
9 | * Statistics for an alarm.
10 | */
11 | abstract class NacAlarmStatistic()
12 | {
13 |
14 | /**
15 | * Unique ID.
16 | */
17 | @PrimaryKey(autoGenerate = true)
18 | @ColumnInfo(name = "id")
19 | var id: Long = 0
20 |
21 | /**
22 | * Timestamp of when an alarm was snoozed.
23 | */
24 | @ColumnInfo(name = "timestamp")
25 | var timestamp: Date
26 |
27 | /**
28 | * The ID of the alarm.
29 | */
30 | @ColumnInfo(name = "alarm_id", index = true)
31 | var alarmId: Long? = null
32 |
33 | /**
34 | * The hour the alarm ran at.
35 | */
36 | @ColumnInfo(name = "hour")
37 | var hour = 0
38 |
39 | /**
40 | * The minute the alarm ran at.
41 | */
42 | @ColumnInfo(name = "minute")
43 | var minute = 0
44 |
45 | /**
46 | * The name of the alarm.
47 | */
48 | @ColumnInfo(name = "name")
49 | var name: String = ""
50 |
51 | /**
52 | * Constructor.
53 | */
54 | init
55 | {
56 | val timestamp = Date()
57 | this.timestamp = timestamp
58 | }
59 |
60 | /**
61 | * Constructor.
62 | */
63 | constructor(alarm: NacAlarm?) : this()
64 | {
65 | if (alarm != null)
66 | {
67 | alarmId = alarm.id
68 | hour = alarm.hour
69 | minute = alarm.minute
70 | name = alarm.name
71 | }
72 | }
73 |
74 | /**
75 | * Check if two stats are equal, except for the ID.
76 | */
77 | open fun equalsExceptId(stat: NacAlarmStatistic): Boolean
78 | {
79 | return (timestamp == stat.timestamp)
80 | && (hour == stat.hour)
81 | && (minute == stat.minute)
82 | && (name == stat.name)
83 | }
84 |
85 | /**
86 | * Convert the data to a csv format so that it can be used to write to an
87 | * output file.
88 | */
89 | open fun toCsvFormat(): String
90 | {
91 | // Zero pad the hour and minute so that the time looks more uniform
92 | val clockHour = hour.toString().padStart(2, '0')
93 | val clockMinute = minute.toString().padStart(2, '0')
94 |
95 | return "${timestamp},${name},${clockHour}:${clockMinute}"
96 | }
97 |
98 | }
99 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/statistics/db/NacAlarmStatisticDao.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.statistics.db
2 |
3 | import androidx.room.Insert
4 |
5 | /**
6 | * Data access object for storing when alarms were created.
7 | */
8 | interface NacAlarmStatisticDao
9 | {
10 |
11 | /**
12 | * Insert an instance of an alarm statistic.
13 | */
14 | @Insert
15 | suspend fun insert(stat: T): Long
16 |
17 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/statistics/db/NacStatisticTypeConverters.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.statistics.db
2 |
3 | import androidx.room.TypeConverter
4 | import java.util.Date
5 |
6 | /**
7 | * Type converters for when an object is retrieved from the database.
8 | */
9 | object NacStatisticTypeConverters
10 | {
11 |
12 | /**
13 | * Convert from a Long to a Date.
14 | */
15 | @TypeConverter
16 | fun fromTimestamp(value: Long): Date
17 | {
18 | return Date(value)
19 | }
20 |
21 | /**
22 | * Convert from a Date to a Long.
23 | */
24 | @TypeConverter
25 | fun dateToTimestamp(date: Date): Long
26 | {
27 | return date.time
28 | }
29 |
30 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/system/file/NacTreeNode.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.system.file
2 |
3 | /**
4 | * Node in a tree.
5 | */
6 | open class NacTreeNode(
7 |
8 | /**
9 | * Key.
10 | */
11 | var key: T,
12 |
13 | /**
14 | * Value.
15 | */
16 | var value: Any? = null,
17 |
18 | /**
19 | * Root node of this node.
20 | */
21 | var root: NacTreeNode? = null
22 |
23 | )
24 | {
25 |
26 | /**
27 | * Children of this node.
28 | */
29 | val children: MutableList> = ArrayList()
30 |
31 | /**
32 | * Add a child.
33 | */
34 | private fun addChild(child: NacTreeNode)
35 | {
36 | // Child already exists. Do not add it
37 | if (this.exists(child))
38 | {
39 | return
40 | }
41 |
42 | // Add child
43 | children.add(child)
44 | }
45 |
46 | /**
47 | * @see .addChild
48 | */
49 | fun addChild(key: T, value: Any?)
50 | {
51 | // Create child
52 | val child = NacTreeNode(key, value, this)
53 |
54 | // Add child
55 | this.addChild(child)
56 | }
57 |
58 | /**
59 | * Check if the child exists as a child of the node.
60 | *
61 | * @return True if the child exists as a child of the node, and False
62 | * otherwise.
63 | */
64 | fun exists(child: NacTreeNode?): Boolean
65 | {
66 | return this.getChild(child) != null
67 | }
68 |
69 | /**
70 | * Get the child with the key.
71 | *
72 | * @return The child with the key.
73 | */
74 | fun getChild(key: T): NacTreeNode?
75 | {
76 | // Iterate over each child
77 | for (c in children)
78 | {
79 | // Key matches
80 | if (c.key == key)
81 | {
82 | // Return the child
83 | return c
84 | }
85 | }
86 |
87 | // Unable to find the child
88 | return null
89 | }
90 |
91 | /**
92 | * @see .getChild
93 | */
94 | private fun getChild(child: NacTreeNode?): NacTreeNode?
95 | {
96 | return if (child != null)
97 | {
98 | this.getChild(child.key)
99 | }
100 | else
101 | {
102 | null
103 | }
104 | }
105 |
106 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/system/file/browser/NacFileBrowserViewModel.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.system.file.browser
2 |
3 | import android.app.Application
4 | import android.content.Context
5 | import androidx.lifecycle.AndroidViewModel
6 | import androidx.lifecycle.viewModelScope
7 | import com.nfcalarmclock.system.file.NacFile
8 | import kotlinx.coroutines.launch
9 |
10 | /**
11 | * File browser view model.
12 | */
13 | class NacFileBrowserViewModel(app: Application)
14 | : AndroidViewModel(app)
15 | {
16 |
17 | /**
18 | * Repository of file browser information.
19 | */
20 | private val repository: NacFileBrowserRepository = NacFileBrowserRepository()
21 |
22 | /**
23 | * Current metadata added to the repository.
24 | */
25 | val currentMetadata = repository.currentMetadata
26 |
27 | /**
28 | * Constructor.
29 | */
30 | init
31 | {
32 | // Scan the repository
33 | viewModelScope.launch {
34 | repository.scan(app)
35 | }
36 | }
37 |
38 | /**
39 | * Change directory.
40 | */
41 | fun cd(metadata: NacFile.Metadata) : String
42 | {
43 | // Change directory
44 | repository.fileTree.cd(metadata.name)
45 |
46 | // Determine the path of the directory that was clicked
47 | return if (metadata.name == NacFile.PREVIOUS_DIRECTORY)
48 | {
49 | // Previous directory
50 | repository.fileTree.directoryPath
51 | }
52 | else
53 | {
54 | // Current directory
55 | metadata.path
56 | }
57 | }
58 |
59 | /**
60 | * Clear the listing.
61 | */
62 | fun clear()
63 | {
64 | viewModelScope.launch {
65 | repository.clear()
66 | }
67 | }
68 |
69 | /**
70 | * Show the listing at the given path.
71 | */
72 | fun show(path: String, unit: () -> Unit = {})
73 | {
74 | val context: Context = getApplication()
75 |
76 | viewModelScope.launch {
77 |
78 | // Show the listing
79 | repository.show(context, path)
80 |
81 | // Call the unit
82 | unit()
83 |
84 | }
85 | }
86 |
87 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/system/permission/NacOptionalPermissionPreference.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.system.permission
2 |
3 | import android.content.Context
4 | import android.util.AttributeSet
5 | import android.widget.TextView
6 | import androidx.preference.Preference
7 | import androidx.preference.PreferenceViewHolder
8 | import com.nfcalarmclock.R
9 | import java.util.Locale
10 |
11 | /**
12 | * A preference that is used to display optional permissions.
13 | */
14 | class NacOptionalPermissionPreference @JvmOverloads constructor(
15 |
16 | /**
17 | * Context.
18 | */
19 | context: Context,
20 |
21 | /**
22 | * Attribute set.
23 | */
24 | attrs: AttributeSet? = null,
25 |
26 | /**
27 | * Default style.
28 | */
29 | style: Int = 0
30 |
31 | // Constructor
32 | ) : Preference(context, attrs, style)
33 | {
34 |
35 | /**
36 | * Constructor.
37 | */
38 | init
39 | {
40 | layoutResource = R.layout.nac_preference_permission
41 | }
42 |
43 | /**
44 | * Called when the view holder is bound.
45 | */
46 | override fun onBindViewHolder(holder: PreferenceViewHolder)
47 | {
48 | // Super
49 | super.onBindViewHolder(holder)
50 |
51 | // Get the textview
52 | val permissionType = holder.findViewById(R.id.permission_type) as TextView
53 |
54 | // Setup the textview
55 | setPermissionText(permissionType)
56 | setPermissionTextColor(permissionType)
57 | }
58 |
59 | /**
60 | * Set the permission text.
61 | */
62 | private fun setPermissionText(textView: TextView)
63 | {
64 | // Get the message
65 | val locale = Locale.getDefault()
66 | val message = context.resources.getString(R.string.message_optional)
67 |
68 | // Set the text
69 | textView.text = message.lowercase(locale)
70 | }
71 |
72 | /**
73 | * Set the color of the permission text.
74 | */
75 | private fun setPermissionTextColor(textView: TextView)
76 | {
77 | // Get the color based on the API
78 | val color = context.getColor(R.color.green)
79 |
80 | // Set the color
81 | textView.setTextColor(color)
82 | }
83 |
84 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/system/permission/NacRequiredPermissionPreference.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.system.permission
2 |
3 | import android.content.Context
4 | import android.util.AttributeSet
5 | import android.widget.TextView
6 | import androidx.preference.Preference
7 | import androidx.preference.PreferenceViewHolder
8 | import com.nfcalarmclock.R
9 | import java.util.Locale
10 |
11 | /**
12 | * A preference that is used to display optional permissions.
13 | */
14 | class NacRequiredPermissionPreference @JvmOverloads constructor(
15 |
16 | /**
17 | * Context.
18 | */
19 | context: Context,
20 |
21 | /**
22 | * Attribute set.
23 | */
24 | attrs: AttributeSet? = null,
25 |
26 | /**
27 | * Default style.
28 | */
29 | style: Int = 0
30 |
31 | // Constructor
32 | ): Preference(context, attrs, style)
33 | {
34 |
35 | /**
36 | * Constructor.
37 | */
38 | init
39 | {
40 | layoutResource = R.layout.nac_preference_permission
41 | }
42 |
43 | /**
44 | * Called when the view holder is bound.
45 | */
46 | override fun onBindViewHolder(holder: PreferenceViewHolder)
47 | {
48 | // Super
49 | super.onBindViewHolder(holder)
50 |
51 | // Get the text view
52 | val permissionType = holder.findViewById(R.id.permission_type) as TextView
53 |
54 | // Setup the textview
55 | setPermissionText(permissionType)
56 | setPermissionTextColor(permissionType)
57 | }
58 |
59 | /**
60 | * Set the permission text.
61 | */
62 | private fun setPermissionText(textView: TextView)
63 | {
64 | // Get the message
65 | val locale = Locale.getDefault()
66 | val message = context.resources.getString(R.string.message_required)
67 |
68 | // Set the text
69 | textView.text = message.lowercase(locale)
70 | }
71 |
72 | /**
73 | * Set the color of the permission text.
74 | */
75 | private fun setPermissionTextColor(textView: TextView)
76 | {
77 | // Get the color based on the API
78 | val color = context.getColor(R.color.red)
79 |
80 | // Set the color
81 | textView.setTextColor(color)
82 | }
83 |
84 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/system/permission/ignorebatteryoptimization/NacIgnoreBatteryOptimizationPermissionRequestDialog.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.system.permission.ignorebatteryoptimization
2 |
3 | import com.nfcalarmclock.R
4 | import com.nfcalarmclock.system.permission.NacPermissionRequestDialog
5 |
6 | /**
7 | * Dialog to request to ignore battery optimization.
8 | */
9 | class NacIgnoreBatteryOptimizationPermissionRequestDialog
10 | : NacPermissionRequestDialog()
11 | {
12 |
13 | /**
14 | * The actions to execute when the permission request is accepted.
15 | */
16 | override fun doPermissionRequestAccepted()
17 | {
18 | // Set the flag that the permission was requested
19 | sharedPreferences!!.wasIgnoreBatteryOptimizationPermissionRequested = true
20 |
21 | // Call the accepeted listeners
22 | super.doPermissionRequestAccepted()
23 | }
24 |
25 | /**
26 | * The actions to execute when the permission request is canceled.
27 | */
28 | override fun doPermissionRequestCanceled()
29 | {
30 | // Set the flag that the permission was requested
31 | sharedPreferences!!.wasIgnoreBatteryOptimizationPermissionRequested = true
32 |
33 | // Call the accepeted listeners
34 | super.doPermissionRequestCanceled()
35 | }
36 |
37 | /**
38 | * The ID of the layout.
39 | */
40 | override val layoutId: Int
41 | get() = R.layout.dlg_request_ignore_battery_optimization_permission
42 |
43 | /**
44 | * The ID of the title string.
45 | */
46 | override val titleId: Int
47 | get() = R.string.title_permission_disable_battery_optimization
48 |
49 | companion object
50 | {
51 |
52 | /**
53 | * Tag for the class.
54 | */
55 | const val TAG = "NacIgnoreBatteryOptimizationPermissionDialog"
56 |
57 | }
58 |
59 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/system/permission/postnotifications/NacPostNotificationsPermissionRequestDialog.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.system.permission.postnotifications
2 |
3 | import android.os.Build
4 | import androidx.annotation.RequiresApi
5 | import com.nfcalarmclock.R
6 | import com.nfcalarmclock.system.permission.NacPermissionRequestDialog
7 |
8 | /**
9 | * Dialog to request to allow posting notifications.
10 | */
11 | @RequiresApi(api = Build.VERSION_CODES.TIRAMISU)
12 | class NacPostNotificationsPermissionRequestDialog
13 | : NacPermissionRequestDialog()
14 | {
15 |
16 | /**
17 | * The name of the permission.
18 | */
19 | override val permission: String = NacPostNotificationsPermission.permissionName
20 |
21 | /**
22 | * The ID of the layout.
23 | */
24 | override val layoutId: Int = R.layout.dlg_request_post_notifications_permission
25 |
26 | /**
27 | * The ID of the title string.
28 | */
29 | override val titleId: Int = R.string.title_permission_show_notifications
30 |
31 | /**
32 | * The ID of the text string.
33 | */
34 | override val textId: Int = R.string.message_permission_post_notifications_request
35 |
36 | /**
37 | * The actions to execute when the permission request is accepted.
38 | */
39 | override fun doPermissionRequestAccepted()
40 | {
41 | // Set the flag that the permission was requested
42 | sharedPreferences!!.wasPostNotificationsPermissionRequested = true
43 |
44 | // Call the accepeted listeners
45 | super.doPermissionRequestAccepted()
46 | }
47 |
48 | /**
49 | * The actions to execute when the permission request is canceled.
50 | */
51 | override fun doPermissionRequestCanceled()
52 | {
53 | // Set the flag that the permission was requested
54 | sharedPreferences!!.wasPostNotificationsPermissionRequested = true
55 |
56 | // Call the canceled listeners
57 | super.doPermissionRequestCanceled()
58 | }
59 |
60 | companion object
61 | {
62 |
63 | /**
64 | * Tag for the class.
65 | */
66 | const val TAG = "NacPostNotificationsPermissionDialog"
67 |
68 | }
69 |
70 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/system/permission/readmediaaudio/NacReadMediaAudioPermission.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.system.permission.readmediaaudio
2 |
3 | import android.Manifest
4 | import android.app.Activity
5 | import android.content.Context
6 | import android.content.pm.PackageManager
7 | import android.os.Build
8 | import androidx.core.app.ActivityCompat
9 | import androidx.core.content.ContextCompat
10 |
11 | /**
12 | * Helper functions for the READ_MEDIA_AUDIO/READ_EXTERNAL_STORAGE permission.
13 | */
14 | object NacReadMediaAudioPermission
15 | {
16 |
17 | /**
18 | * The name of the READ_MEDIA_AUDIO/READ_EXTERNAL_STORAGE permission.
19 | */
20 | private val permissionName: String
21 | get() {
22 |
23 | // Define the permission string based on which version of Android is
24 | // running. Later versions need the more granular READ_MEDIA_AUDIO
25 | // permission whereas older versions can request READ_EXTERNAL_STORAGE
26 | // which allows an app to see a lot more files that are stored on the
27 | // user's phone
28 | return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
29 | {
30 | Manifest.permission.READ_MEDIA_AUDIO
31 | }
32 | else
33 | {
34 | Manifest.permission.READ_EXTERNAL_STORAGE
35 | }
36 | }
37 |
38 | /**
39 | * Check if the app has the READ_MEDIA_AUDIO/READ_EXTERNAL_STORAGE
40 | * permission or not.
41 | *
42 | * @return True if the app has the READ_MEDIA_AUDIO/READ_EXTERNAL_STORAGE
43 | * permission, and False otherwise.
44 | */
45 | @JvmStatic
46 | fun hasPermission(context: Context): Boolean
47 | {
48 | // Check if the app has permission to read external storage/media audio
49 | // (depending on version)
50 | return (ContextCompat.checkSelfPermission(context, permissionName)
51 | == PackageManager.PERMISSION_GRANTED)
52 | }
53 |
54 | /**
55 | * Request the READ_MEDIA_AUDIO/READ_EXTERNAL_STORAGE permission.
56 | */
57 | @JvmStatic
58 | fun requestPermission(activity: Activity, requestCode: Int)
59 | {
60 | // Request the permission
61 | ActivityCompat.requestPermissions(activity, arrayOf(permissionName), requestCode)
62 | }
63 |
64 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/system/permission/scheduleexactalarm/NacScheduleExactAlarmPermissionChangedBroadcastReceiver.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.system.permission.scheduleexactalarm
2 |
3 | import android.app.AlarmManager
4 | import android.content.BroadcastReceiver
5 | import android.content.Context
6 | import android.content.Intent
7 | import android.os.Build
8 | import com.nfcalarmclock.alarm.NacAlarmRepository
9 | import com.nfcalarmclock.system.scheduler.NacScheduler
10 | import com.nfcalarmclock.util.goAsync
11 | import dagger.hilt.android.AndroidEntryPoint
12 | import javax.inject.Inject
13 |
14 | /**
15 | * Refresh all alarms when the Schedule Exact Alarm Permission is granted.
16 | */
17 | @AndroidEntryPoint
18 | class NacScheduleExactAlarmPermissionChangedBroadcastReceiver
19 | : BroadcastReceiver()
20 | {
21 |
22 | /**
23 | * Alarm repository.
24 | */
25 | @Inject
26 | lateinit var alarmRepository: NacAlarmRepository
27 |
28 | /**
29 | * It is possible for another actor to send a spoofed intent with no
30 | * action string or a different action string and cause undesired behavior.
31 | * Ensure that the received Intent's action string matches the expected
32 | * value before restoring alarms.
33 | */
34 | override fun onReceive(context: Context, intent: Intent) = goAsync {
35 |
36 | // Do not do anything if the Android version is not correct
37 | if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S)
38 | {
39 | return@goAsync
40 | }
41 |
42 | // Check the intent action corresponds to the permission being changed
43 | if (intent.action == AlarmManager.ACTION_SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED)
44 | {
45 | val alarmManager = context.getSystemService(
46 | Context.ALARM_SERVICE) as AlarmManager
47 |
48 | // Make sure the permission was changed such that exact alarms can be
49 | // scheduled
50 | if (alarmManager.canScheduleExactAlarms())
51 | {
52 | // Get all alarms from the repository
53 | val alarms = alarmRepository.getAllAlarms()
54 |
55 | // Refresh all alarms
56 | NacScheduler.refreshAll(context, alarms)
57 | }
58 | }
59 |
60 | }
61 |
62 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/system/permission/scheduleexactalarm/NacScheduleExactAlarmPermissionRequestDialog.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.system.permission.scheduleexactalarm
2 |
3 | import android.os.Build
4 | import androidx.annotation.RequiresApi
5 | import com.nfcalarmclock.R
6 | import com.nfcalarmclock.system.permission.NacPermissionRequestDialog
7 |
8 | /**
9 | * Dialog to request to allow scheduling an exact alarm.
10 | */
11 | @RequiresApi(api = Build.VERSION_CODES.S)
12 | class NacScheduleExactAlarmPermissionRequestDialog
13 | : NacPermissionRequestDialog()
14 | {
15 |
16 | /**
17 | * The name of the permission.
18 | */
19 | override val permission: String
20 | get() = NacScheduleExactAlarmPermission.permissionName
21 |
22 | /**
23 | * The ID of the layout.
24 | */
25 | override val layoutId: Int
26 | get() = R.layout.dlg_request_schedule_exact_alarm_permission
27 |
28 | /**
29 | * The ID of the title string.
30 | */
31 | override val titleId: Int
32 | get() = R.string.title_request_permission_schedule_exact_alarm
33 |
34 | /**
35 | * The ID of the text string.
36 | */
37 | override val textId: Int = R.string.message_permission_schedule_exact_alarm_request
38 |
39 | /**
40 | * The actions to execute when the permission request is accepted.
41 | */
42 | override fun doPermissionRequestAccepted()
43 | {
44 | // Set the flag that the permission was requested
45 | sharedPreferences!!.wasScheduleExactAlarmPermissionRequested = true
46 |
47 | // Call the accepeted listeners
48 | super.doPermissionRequestAccepted()
49 | }
50 |
51 | /**
52 | * The actions to execute when the permission request is canceled.
53 | */
54 | override fun doPermissionRequestCanceled()
55 | {
56 | // Set the flag that the permission was requested
57 | sharedPreferences!!.wasScheduleExactAlarmPermissionRequested = true
58 |
59 | // Call the accepeted listeners
60 | super.doPermissionRequestCanceled()
61 | }
62 |
63 | companion object
64 | {
65 |
66 | /**
67 | * Tag for the class.
68 | */
69 | const val TAG = "NacScheduleExactAlarmPermissionDialog"
70 |
71 | }
72 |
73 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/system/triggers/appupdate/NacAppUpdatedBroadcastReceiver.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.system.triggers.appupdate
2 |
3 | import android.content.BroadcastReceiver
4 | import android.content.Context
5 | import android.content.Intent
6 | import com.nfcalarmclock.db.NacAlarmDatabase
7 | import com.nfcalarmclock.shared.NacSharedPreferences
8 | import com.nfcalarmclock.system.scheduler.NacScheduler
9 | import com.nfcalarmclock.util.goAsync
10 |
11 | /**
12 | * After the app is updated, reapply the alarms.
13 | *
14 | * When the app is updated, any alarms that were set are lost. This will attempt to restore those
15 | * alarms.
16 | */
17 | class NacAppUpdatedBroadcastReceiver
18 | : BroadcastReceiver()
19 | {
20 |
21 | /**
22 | * It is possible for another actor to send a spoofed intent with no
23 | * action string or a different action string and cause undesired behavior.
24 | * Ensure that the received Intent's action string matches the expected
25 | * value before restoring alarms.
26 | */
27 | override fun onReceive(context: Context, intent: Intent) = goAsync {
28 |
29 | // Check that the action is correct
30 | if (intent.action == Intent.ACTION_MY_PACKAGE_REPLACED)
31 | {
32 | // Move shared preferences to device protected storage
33 | NacSharedPreferences.moveToDeviceProtectedStorage(context)
34 |
35 | // Get the database. Before opening it, a check will run to move the database
36 | // to device protected storage
37 | val db = NacAlarmDatabase.getInstance(context)
38 | val sharedPreferences = NacSharedPreferences(context)
39 |
40 | // Get all the alarms
41 | val alarmDao = db.alarmDao()
42 | val allAlarms = alarmDao.getAllAlarms()
43 |
44 | // Reschedule all the alarms
45 | NacScheduler.updateAll(context, allAlarms)
46 |
47 | // Check if should fix any auto dismiss, auto snooze, or snooze duration values
48 | // that are set to 0 in alarms.
49 | if (!sharedPreferences.eventFixZeroAutoDismissAndSnooze)
50 | {
51 | sharedPreferences.runEventFixZeroAutoDismissAndSnooze(
52 | allAlarms,
53 | onAlarmChanged = { alarm ->
54 |
55 | // Update the database and reschedule the alarm
56 | alarmDao.update(alarm)
57 | NacScheduler.update(context, alarm)
58 |
59 | })
60 | }
61 |
62 | // Save the next alarm
63 | sharedPreferences.saveNextAlarm(allAlarms)
64 | }
65 |
66 | }
67 |
68 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/system/triggers/shutdown/NacShutdownBroadcastReceiver.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.system.triggers.shutdown
2 |
3 | import android.content.BroadcastReceiver
4 | import android.content.Context
5 | import android.content.Intent
6 | import com.nfcalarmclock.alarm.NacAlarmRepository
7 | import com.nfcalarmclock.system.scheduler.NacScheduler
8 | import com.nfcalarmclock.util.goAsync
9 | import dagger.hilt.android.AndroidEntryPoint
10 | import javax.inject.Inject
11 |
12 | /**
13 | * Remove any active alarms on shutdown or reboot.
14 | *
15 | * Note: This needs to be registered in NacMainActivity because:
16 | *
17 | * "As of Build.VERSION_CODES#P this broadcast is only sent to receivers
18 | * registered through Context.registerReceiver."
19 | */
20 | @AndroidEntryPoint
21 | class NacShutdownBroadcastReceiver
22 | : BroadcastReceiver()
23 | {
24 |
25 | /**
26 | * Alarm repository.
27 | */
28 | @Inject
29 | lateinit var alarmRepository: NacAlarmRepository
30 |
31 | /**
32 | * It is possible for another actor to send a spoofed intent with no
33 | * action string or a different action string and cause undesired behavior.
34 | * Ensure that the received Intent's action string matches the expected
35 | * value before restoring alarms.
36 | */
37 | override fun onReceive(context: Context, intent: Intent) = goAsync {
38 |
39 | // Check that the intent action is correct
40 | if ((intent.action == Intent.ACTION_SHUTDOWN)
41 | || (intent.action == Intent.ACTION_REBOOT))
42 | {
43 | // Get the active alarms from the repository
44 | val alarms = alarmRepository.getActiveAlarms()
45 |
46 | // Iterate over each active alarm
47 | for (a in alarms)
48 | {
49 | // Dismiss the alarm
50 | a.dismiss()
51 |
52 | // Update the repo now that the alarm is no longer active
53 | alarmRepository.update(a)
54 |
55 | // Cancel the alarm
56 | NacScheduler.cancel(context, a)
57 | }
58 | }
59 |
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/system/triggers/startup/NacStartupBroadcastReceiver.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.system.triggers.startup
2 |
3 | import android.content.BroadcastReceiver
4 | import android.content.Context
5 | import android.content.Intent
6 | import com.nfcalarmclock.alarm.NacAlarmRepository
7 | import com.nfcalarmclock.system.scheduler.NacScheduler
8 | import com.nfcalarmclock.util.goAsync
9 | import dagger.hilt.android.AndroidEntryPoint
10 | import javax.inject.Inject
11 |
12 | /**
13 | * Restore alarms on startup. This should support direct boot mode as well.
14 | */
15 | @AndroidEntryPoint
16 | class NacStartupBroadcastReceiver
17 | : BroadcastReceiver()
18 | {
19 |
20 | /**
21 | * Alarm repository.
22 | */
23 | @Inject
24 | lateinit var alarmRepository: NacAlarmRepository
25 |
26 | /**
27 | * It is possible for another actor to send a spoofed intent with no
28 | * action string or a different action string and cause undesired behavior.
29 | * Ensure that the received Intent's action string matches the expected
30 | * value before restoring alarms.
31 | */
32 | override fun onReceive(context: Context, intent: Intent) = goAsync {
33 |
34 | //println("RECEIVED THE BROADCAST : ${intent.action}")
35 | // Check that the intent action is correct
36 | if ((intent.action == Intent.ACTION_BOOT_COMPLETED)
37 | || (intent.action == Intent.ACTION_LOCKED_BOOT_COMPLETED))
38 | {
39 | //println("READING ALARMS")
40 | // Get all the alarms
41 | val alarms = alarmRepository.getAllAlarms()
42 | //println("FOUND ALARMS : ${alarms.size}")
43 |
44 | // Update all the alarms
45 | //println("UPDATING SCHEDULE OF ALARMS")
46 | NacScheduler.updateAll(context, alarms)
47 | }
48 |
49 | }
50 |
51 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/system/triggers/timechange/NacTimeChangeBroadcastReceiver.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.system.triggers.timechange
2 |
3 | import android.content.BroadcastReceiver
4 | import android.content.Context
5 | import android.content.Intent
6 | import com.nfcalarmclock.alarm.NacAlarmRepository
7 | import com.nfcalarmclock.shared.NacSharedPreferences
8 | import com.nfcalarmclock.system.scheduler.NacScheduler
9 | import com.nfcalarmclock.util.goAsync
10 | import dagger.hilt.android.AndroidEntryPoint
11 | import javax.inject.Inject
12 |
13 | /**
14 | * Receive this signal from AlarmManager and start the foreground service.
15 | */
16 | @AndroidEntryPoint
17 | class NacTimeChangeBroadcastReceiver
18 | : BroadcastReceiver()
19 | {
20 |
21 | /**
22 | * Alarm repository.
23 | */
24 | @Inject
25 | lateinit var alarmRepository: NacAlarmRepository
26 |
27 | /**
28 | * It is possible for another actor to send a spoofed intent with no
29 | * action string or a different action string and cause undesired behavior.
30 | * Ensure that the received Intent's action string matches the expected
31 | * value before updating alarms.
32 | */
33 | override fun onReceive(context: Context, intent: Intent) = goAsync {
34 |
35 | // Check that the intent action is correct
36 | if ((intent.action == Intent.ACTION_DATE_CHANGED)
37 | || (intent.action == Intent.ACTION_TIME_CHANGED)
38 | || (intent.action == Intent.ACTION_TIMEZONE_CHANGED)
39 | || (intent.action == Intent.ACTION_LOCALE_CHANGED))
40 | {
41 | // Get all the alarms
42 | val sharedPreferences = NacSharedPreferences(context)
43 | val allAlarms = alarmRepository.getAllAlarms()
44 |
45 | // Update all the alarms
46 | NacScheduler.updateAll(context, allAlarms)
47 |
48 | // Save the next alarm
49 | sharedPreferences.saveNextAlarm(allAlarms)
50 | }
51 |
52 | }
53 |
54 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/util/NacUtility.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.util
2 |
3 | import android.content.Context
4 | import android.view.View
5 | import android.view.View.MeasureSpec
6 | import android.view.ViewGroup.MarginLayoutParams
7 | import android.widget.Toast
8 |
9 | /**
10 | * NFC Alarm Clock Utility class.
11 | *
12 | * Composed of static methods that can be used for various things.
13 | */
14 | object NacUtility
15 | {
16 |
17 | /**
18 | * Determine the height of the view.
19 | *
20 | * @param view The view.
21 | *
22 | * @return The height of the view.
23 | */
24 | fun getHeight(view: View): Int
25 | {
26 | // Measure the view
27 | view.measure(MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED),
28 | MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED))
29 |
30 | // Calculate the height, including the margins
31 | val lp = view.layoutParams as MarginLayoutParams
32 | val margins = lp.topMargin + lp.bottomMargin
33 | val height = view.measuredHeight
34 |
35 | return height + margins
36 | }
37 |
38 | /**
39 | * Create a toast that displays for a short period of time.
40 | */
41 | fun quickToast(context: Context, message: String): Toast
42 | {
43 | return toast(context, message, Toast.LENGTH_SHORT)
44 | }
45 |
46 | /**
47 | * Create a toast that displays for a short period of time.
48 | */
49 | fun quickToast(context: Context, resId: Int): Toast
50 | {
51 | // Get the message
52 | val message = context.getString(resId)
53 |
54 | // Show the toast
55 | return toast(context, message, Toast.LENGTH_SHORT)
56 | }
57 |
58 | /**
59 | * Create a toast.
60 | */
61 | fun toast(context: Context, resId: Int): Toast
62 | {
63 | // Get the message
64 | val message = context.getString(resId)
65 |
66 | // Show the toast
67 | return toast(context, message, Toast.LENGTH_LONG)
68 | }
69 |
70 | /**
71 | * Create a toast.
72 | */
73 | fun toast(context: Context, message: String): Toast
74 | {
75 | return toast(context, message, Toast.LENGTH_LONG)
76 | }
77 |
78 | /**
79 | * Create a toast.
80 | */
81 | fun toast(context: Context, message: String, duration: Int): Toast
82 | {
83 | // Create the toast
84 | val toast = Toast.makeText(context, message, duration)
85 |
86 | // Show the toast
87 | toast.show()
88 |
89 | return toast
90 | }
91 |
92 | }
--------------------------------------------------------------------------------
/app/src/main/kotlin/com/nfcalarmclock/view/alarmoptionlayout/NacAlarmOptionLayout.kt:
--------------------------------------------------------------------------------
1 | package com.nfcalarmclock.view.alarmoptionlayout
2 |
3 | import android.content.Context
4 | import android.util.AttributeSet
5 | import android.widget.LinearLayout
6 | import com.google.android.material.button.MaterialButton
7 | import com.nfcalarmclock.R
8 |
9 | /**
10 | * Alarm option layout so that the layout can be consistent across each new alarm option.
11 | */
12 | class NacAlarmOptionLayout @JvmOverloads constructor(
13 | context: Context,
14 | attrs: AttributeSet? = null
15 | ) : LinearLayout(context, attrs)
16 | {
17 |
18 | /**
19 | * Constructor.
20 | */
21 | init
22 | {
23 | inflate(context, R.layout.nac_alarm_option_layout, this)
24 | }
25 |
26 | /**
27 | * Add child views when finished being inflated.
28 | */
29 | override fun onFinishInflate()
30 | {
31 | // Super
32 | super.onFinishInflate()
33 |
34 | // Check if has more than one child. This should always be the case, but better to
35 | // be cautious
36 | if (childCount <= 1)
37 | {
38 | return
39 | }
40 |
41 | // Get the main and inner most layouts
42 | val mainLayout: LinearLayout = getChildAt(0) as LinearLayout
43 | val innerLayout: LinearLayout = findViewById(R.id.container)
44 |
45 | // Iterate over each child
46 | for (i in 1..
2 |
3 |
4 |
15 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/fade_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/pulse.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
17 |
18 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/animator/card_color_collapse.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/animator/card_color_expand.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/animator/card_color_highlight.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/animator/nac_day_button_alpha.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | -
6 |
7 |
15 |
16 |
17 |
18 | -
19 |
20 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/animator/nac_day_button_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | -
6 |
7 |
14 |
15 |
16 |
17 | -
18 |
19 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/animator/support_development.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/color/card_toggle_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
10 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/color/nac_day_button_stroke.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
9 |
10 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/alarm.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/analytics.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/arrow_left.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/arrow_right.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/auto_delete.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/battery_alert.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cancel.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/card_divider.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/collapse.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/color_example.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
9 |
10 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/color_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/copy.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/delete.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/dismiss.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/edit.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/expand.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/favorite.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/flashlight_on_32.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/folder.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/format_align_left_23.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/format_bold.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/format_size.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/import_export.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/info.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/label.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/launch_32.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/list.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/minus_24.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/music_note.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/notifications.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/opacity.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/palette.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/play.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/plus.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/position_32.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/repeat.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/reset.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/round_action_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/schedule.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/send.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/settings.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shader_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
9 |
10 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/slider_path.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | -
6 |
7 |
8 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/snooze.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/tap_and_play.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/vibrate.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/visibility.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/volume_high.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/volume_low.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/volume_med.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/volume_off.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/act_setting.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/act_sound.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
16 |
17 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/card_copy.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
21 |
22 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/card_delete.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
21 |
22 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/card_frame.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dlg_alarm_days.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dlg_alarm_name.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
20 |
21 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dlg_audio_source.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
15 |
16 |
17 |
23 |
24 |
25 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dlg_delete_nfc_tag.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
21 |
22 |
23 |
31 |
32 |
33 |
34 |
35 |
36 |
44 |
45 |
46 |
54 |
55 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dlg_import_export.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
21 |
22 |
23 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dlg_media_playlist.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
19 |
25 |
26 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dlg_save_nfc_tag.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
15 |
16 |
17 |
23 |
24 |
25 |
37 |
38 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dlg_select_nfc_tag.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
15 |
16 |
17 |
23 |
24 |
25 |
29 |
30 |
31 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dlg_whats_new.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
24 |
25 |
38 |
39 |
40 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/frg_buttons.xml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
18 |
19 |
24 |
25 |
33 |
34 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/frg_manage_nfc_tags.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/frg_music.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
13 |
27 |
28 |
29 |
35 |
36 |
37 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/frg_ringtone.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
23 |
24 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nac_alarm_option_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
21 |
22 |
23 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
44 |
45 |
46 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nac_color_picker.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
11 |
12 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nac_day_button_filled.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nac_day_button_outlined.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nac_day_of_week.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
12 |
13 |
21 |
22 |
30 |
31 |
39 |
40 |
48 |
49 |
57 |
58 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nac_file_entry.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
25 |
26 |
35 |
36 |
42 |
43 |
50 |
51 |
52 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nac_preference.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nac_preference_alarm_card.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nac_preference_checkbox.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
15 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nac_preference_color.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
15 |
16 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nac_preference_day_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
14 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nac_preference_permission.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
28 |
29 |
44 |
45 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nac_preference_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
18 |
19 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nac_preference_volume.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
18 |
19 |
29 |
30 |
36 |
37 |
50 |
51 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nac_select_add_remove_nfc_tag.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
17 |
18 |
24 |
25 |
26 |
27 |
31 |
32 |
33 |
44 |
45 |
46 |
57 |
58 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nac_whats_new_entry.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
16 |
17 |
18 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/nac_whats_new_entry_version.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
18 |
19 |
20 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/radio_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/radio_button_ringtone.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_action_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_card.xml:
--------------------------------------------------------------------------------
1 |
2 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/app.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/app/src/main/res/mipmap-hdpi/app.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/app.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/app/src/main/res/mipmap-mdpi/app.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/app.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/app/src/main/res/mipmap-xhdpi/app.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/app.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/app/src/main/res/mipmap-xxhdpi/app.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/app.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/app/src/main/res/mipmap-xxxhdpi/app.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/values-b+es/arrays_whats_new.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | - 12.5.4
9 | - Se solucionó el problema por el cual <b>omitir siguiente alarma</b> seguía omitiendo la alarma.
10 | - 12.5.3
11 | - Se solucionó el problema con <b>voz</b> donde la conversión de texto a voz usaba la voz predeterminada aunque se hubiera seleccionado una voz diferente.
12 | - Se agregó la opción <b>alineación</b> al <b>widget</b> para alinear todo el texto.
13 | - Se agregó la opción <b>posición</b> al <b>widget</b> para posicionar el texto de la alarma.
14 | - Se agregó la opción <b>mostrar solo alarmas de la aplicación</b> al <b>widget</b> que controla si solo se mostrarán las alarmas creadas en esta aplicación o si se mostrarán las alarmas creadas en cualquier aplicación.
15 | - Se agregó información sobre el <b>número restante de repeticiones de alarma</b> al deslizar el dedo para posponer una alarma activa.
16 | - Aspecto actualizado del cuadro de diálogo <b>Novedades</b>.
17 | - 12.5.2
18 | - Se agregó la función para <b>seleccionar múltiples etiquetas NFC</b> que pueden descartar una alarma.
19 | - Se agregó <b>velocidad de voz</b> a la opción de texto a voz para cambiar la velocidad a la que hablará.
20 | - Se solucionó un problema con la <b>linterna</b> donde, cuando el parpadeo estaba deshabilitado, aún parpadeaba.
21 | - 12.5.0
22 | - Se actualizó el aspecto de la <b>tarjeta de alarma</b> para mostrar botones para opciones de descartar, opciones de posponer y opciones de alarma normales.
23 | - Se agregó la opción <b>patrón de vibración personalizado</b> para las alarmas.
24 | - Se agregó la opción <b>ahorro de batería</b> para mantener la pantalla apagada cuando hay una alarma activa. Se encuentra en Configuración > General.
25 | - Se agregó la opción <b>voz</b> a <b>texto a voz</b> para elegir qué voz usar.
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/values-bn/arrays_whats_new.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | - 12.5.4
9 | - পরবর্তী অ্যালার্ম এড়িয়ে গেলে বারবার অ্যালার্ম এড়িয়ে যাওয়ার সমস্যা সমাধান করা হয়েছে।
10 | - 12.5.3
11 | - <b>ভয়েস</b> এর সাথে স্থির করা হয়েছে যেখানে পাঠ্য থেকে বক্তৃতা ডিফল্ট ভয়েস ব্যবহার করছিল যদিও একটি ভিন্ন ভয়েস নির্বাচন করা হয়েছিল।
12 | - সমস্ত পাঠ্য সারিবদ্ধ করতে <b>উইজেট</b>-এ <b>সারিবদ্ধকরণ</b> বিকল্প যোগ করা হয়েছে।
13 | - অ্যালার্ম পাঠ্যের অবস্থানের জন্য <b>উইজেট</b>-এ <b>অবস্থান</b> বিকল্প যোগ করা হয়েছে।
14 | - <b>উইজেট< তে <b>শুধু অ্যাপ অ্যালার্ম দেখান</b> বিকল্পটি যোগ করা হয়েছে যা নিয়ন্ত্রণ করে যে শুধুমাত্র এই অ্যাপে তৈরি করা অ্যালার্ম দেখানো হবে, নাকি যে কোনও অ্যাপে তৈরি করা অ্যালার্ম দেখানো হবে।
15 | - একটি সক্রিয় অ্যালার্ম স্নুজ করতে সোয়াইপ করার সময় <b>বাকি সংখ্যক স্নুজ</b> সম্পর্কিত তথ্য যোগ করা হয়েছে।
16 | - <b>নতুন কী</b> ডায়ালগের আপডেট করা চেহারা৷
17 | - 12.5.2
18 | - একটি অ্যালার্ম খারিজ করতে পারে এমন <b>একাধিক NFC ট্যাগ নির্বাচন করুন/b> বৈশিষ্ট্য যুক্ত করা হয়েছে৷
19 | - টেক্সট-টু-স্পিচ বিকল্পে <b>স্পিচ রেট</b> যোগ করা হয়েছে যাতে এটি কথা বলার গতি পরিবর্তন করে।
20 | - <b>ফ্ল্যাশলাইট</b> এর সাথে একটি সমস্যা সমাধান করা হয়েছে যেখানে, যখন ব্লিঙ্ক অক্ষম করা হয়েছিল, তখনও এটি জ্বলজ্বল করবে৷
21 | - 12.5.0
22 | - আপডেট করা <b>অ্যালার্ম কার্ড</b> খারিজ বিকল্প, স্নুজ বিকল্প এবং নিয়মিত অ্যালার্ম বিকল্পগুলির জন্য বোতামগুলি দেখান৷
23 | - অ্যালার্মের জন্য <b>কাস্টম ভাইব্রেশন প্যাটার্ন</b> বিকল্প যোগ করা হয়েছে।
24 | - অ্যালার্ম সক্রিয় থাকলে স্ক্রীন বন্ধ রাখতে <b>ব্যাটারি সেভার</b> বিকল্প যোগ করা হয়েছে। সেটিংস > সাধারণ এ পাওয়া যায়।
25 | - কোন ভয়েস ব্যবহার করতে হবে তা বেছে নিতে <b>টেক্সট-টু-স্পীচ</b>-এ <b>ভয়েস</b> বিকল্প যোগ করা হয়েছে।
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/values-hi/arrays_whats_new.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | - 12.5.4
9 | - उस समस्या को ठीक कर दिया गया है जहां <b>अगला अलार्म छोड़ें</b> अलार्म को छोड़ देता था।
10 | - 12.5.3
11 | - <b>आवाज़</b> से संबंधित समस्या को ठीक किया गया, जहां टेक्स्ट-टू-स्पीच डिफ़ॉल्ट आवाज़ का उपयोग कर रहा था, भले ही एक अलग आवाज़ का चयन किया गया था।
12 | - सभी पाठ को संरेखित करने के लिए <b>विजेट</b> में <b>संरेखण</b> विकल्प जोड़ा गया।
13 | - अलार्म पाठ को स्थान देने के लिए <b>विजेट</b> में <b>स्थिति</b> विकल्प जोड़ा गया।
14 | - <b>विजेट</b> में <b>केवल ऐप अलार्म दिखाएं</b> विकल्प जोड़ा गया है जो यह नियंत्रित करता है कि क्या केवल इस ऐप में बनाए गए अलार्म दिखाए जाएंगे, या किसी भी ऐप में बनाए गए अलार्म दिखाए जाएंगे।
15 | - सक्रिय अलार्म को स्नूज़ करने के लिए स्वाइप करते समय <b>शेष स्नूज़ संख्या</b> के बारे में जानकारी जोड़ी गई।
16 | - <b>नया क्या है</b> संवाद का स्वरूप अद्यतन किया गया.
17 | - 12.5.2
18 | - <b>अनेक NFC टैग्स का चयन</b> करने की सुविधा जोड़ी गई है जो अलार्म को खारिज कर सकती है।
19 | - बोलने की गति को बदलने के लिए टेक्स्ट-टू-स्पीच विकल्प में <b>भाषण दर</b> जोड़ा गया।
20 | - <b>फ्लैशलाइट</b> से संबंधित एक समस्या को ठीक किया गया, जहां ब्लिंक अक्षम होने पर भी यह ब्लिंक करती रहती थी।
21 | - 12.5.0
22 | - <b>अलार्म कार्ड</b> के स्वरूप को अपडेट किया गया है, जिसमें खारिज करने के विकल्प, स्नूज़ विकल्प, तथा नियमित अलार्म विकल्पों के लिए बटन दिखाए गए हैं।
23 | - अलार्म के लिए <b>कस्टम कंपन पैटर्न</b> विकल्प जोड़ा गया.
24 | - अलार्म सक्रिय होने पर स्क्रीन को बंद रखने के लिए <b>बैटरी सेवर</b> विकल्प जोड़ा गया। सेटिंग्स > जनरल में पाया गया।
25 | - किस आवाज का उपयोग करना है, यह चुनने के लिए <b>टेक्स्ट-टू-स्पीच</b> में <b>वॉयस</b> विकल्प जोड़ा गया है।
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ht/arrays_whats_new.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | - 12.5.4
9 | - Pwoblèm fiks kote <b>sote pwochen alam</b> ta kontinye sote alam la.
10 | - 12.5.3
11 | - Pwoblèm ranje ak <b>vwa</b> kote tèks-a-lapawòl t ap itilize vwa default menmsi yo te chwazi yon vwa diferan.
12 | - Te ajoute opsyon <b>aliyman</b> nan <b>widget</b> pou fè aliman tout tèks yo.
13 | - Te ajoute opsyon <b>pozisyon</b> nan <b>widget</b> pou pozisyon tèks alam la.
14 | - Te ajoute opsyon <b>sèlman montre alam aplikasyon yo</b> nan <b>widget</b> ki kontwole si yo pral montre sèlman alam ki te kreye nan aplikasyon sa a, oswa si alam ki te kreye nan nenpòt aplikasyon yo pral montre.
15 | - Te ajoute enfòmasyon sou <b>kantite repetisyon ki rete yo</b> lè w ap glise pou fè yon alam aktif.
16 | - Mizajou gade nan dyalòg <b>Ki Nouvo</b>.
17 | - 12.5.2
18 | - Te ajoute yon karakteristik nan <b>chwazi plizyè tag NFC</b> ki ka anile yon alam.
19 | - Te ajoute <b>pousantaj lapawòl</b> nan opsyon tèks-a-lapawòl pou chanje vitès la ke li pral pale.
20 | - Fikse yon pwoblèm ak <b>flèch</b> kote, lè blink te enfim, li ta toujou bat.
21 | - 12.5.0
22 | - Mizajou <b>kat alam</b> gade pou montre bouton pou opsyon ranvwaye, opsyon snooze, ak opsyon alam regilye.
23 | - Te ajoute <b>modèl Vibration Customized</b> opsyon pou alam.
24 | - Te ajoute opsyon <b>ekonomizeur batri</b> pou kenbe ekran an etenn lè yon alam aktif. Jwenn nan Anviwònman> Jeneral.
25 | - Te ajoute opsyon <b>vwa</b> nan <b>tèks-a-lapawòl</b> pou chwazi ki vwa pou itilize.
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/values-pt-rBR/arrays_whats_new.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | - 12.5.4
9 | - Problema corrigido em que <b>ignorar próximo alarme</b>continuava pulando o alarme.
10 | - 12.5.3
11 | - Problema corrigido com <b>voz</b>, em que a conversão de texto em fala estava usando a voz padrão, mesmo que uma voz diferente estivesse selecionada.
12 | - Adicionada a opção <b>alinhamento</b> ao <b>widget</b> para alinhar todo o texto.
13 | - Adicionada a opção <b>position</b> ao <b>widget</b> para posicionar o texto do alarme.
14 | - Adicionada a opção <b>mostrar somente alarmes do aplicativo</b> ao <b>widget</b> que controla se somente os alarmes criados neste aplicativo serão exibidos ou se os alarmes criados em qualquer aplicativo serão exibidos.
15 | - Adicionadas informações sobre o <b>número restante de sonecas</b> ao deslizar para adiar um alarme ativo.
16 | - Aparência atualizada da caixa de diálogo <b>O que há de novo</b>.
17 | - 12.5.2
18 | - Recurso adicionado para <b>selecionar várias tags NFC</b> que podem ignorar um alarme.
19 | - Adicionado <b>velocidade de fala</b> à opção de conversão de texto em fala para alterar a velocidade com que o texto será falado.
20 | - Corrigido um problema com <b>lanterna</b> em que, quando o piscar estava desativado, ele ainda piscava.
21 | - 12.5.0
22 | - O visual do <b>cartão de alarme</b> foi atualizado para mostrar botões para opções de dispensar, opções de soneca e opções de alarme normal.
23 | - Adicionada a opção <b>padrão de vibração personalizado</b> para alarmes.
24 | - Adicionada a opção <b>economizador de bateria</b> para manter a tela desligada quando um alarme estiver ativo. Encontrada em Ajustes > Geral.
25 | - Adicionada a opção <b>voz</b> para <b>texto para fala</b> para escolher qual voz usar.
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/values-vi/arrays_whats_new.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | - 12.5.4
9 | - Đã khắc phục sự cố trong đó <b>bỏ qua báo thức tiếp theo</b> sẽ tiếp tục bỏ qua báo thức.
10 | - 12.5.3
11 | - Đã khắc phục sự cố liên quan đến <b>giọng nói</b> khi tính năng chuyển văn bản thành giọng nói sử dụng giọng nói mặc định ngay cả khi đã chọn giọng nói khác.
12 | - Đã thêm tùy chọn <b>căn chỉnh</b> vào tiện ích </b> để căn chỉnh toàn bộ văn bản.
13 | - Đã thêm tùy chọn <b>vị trí</b> vào <b>tiện ích</b> để định vị văn bản cảnh báo.
14 | - Đã thêm tùy chọn <b>chỉ hiển thị báo thức ứng dụng</b> vào <b>tiện ích</b> để kiểm soát việc chỉ hiển thị báo thức được tạo trong ứng dụng này hay báo thức được tạo trong bất kỳ ứng dụng nào.
15 | - Đã thêm thông tin về <b>số lần báo lại còn lại</b> khi vuốt để báo lại báo thức đang hoạt động.
16 | - Cập nhật giao diện của hộp thoại <b>Có gì mới</b>.
17 | - 12.5.2
18 | - Đã thêm tính năng <b>chọn nhiều thẻ NFC</b> để có thể tắt báo thức.
19 | - Đã thêm <b>tốc độ giọng nói</b> vào tùy chọn chuyển văn bản thành giọng nói để thay đổi tốc độ nói.
20 | - Đã khắc phục sự cố liên quan đến đèn pin khi tắt chức năng nhấp nháy thì đèn vẫn nhấp nháy.
21 | - 12.5.0
22 | - Đã cập nhật giao diện <b>thẻ báo thức</b> để hiển thị các nút cho tùy chọn hủy báo thức, tùy chọn báo lại và tùy chọn báo thức thông thường.
23 | - Đã thêm tùy chọn <b>mẫu rung tùy chỉnh</b> cho báo thức.
24 | - Đã thêm tùy chọn <b>tiết kiệm pin</b> để tắt màn hình khi báo thức đang hoạt động. Tìm thấy trong Cài đặt > Chung.
25 | - Đã thêm tùy chọn <b>giọng nói</b> vào <b>chuyển văn bản thành giọng nói</b> để chọn giọng nói sẽ sử dụng.
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/values/arrays_whats_new.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | - 12.5.4
9 | - Fixed issue where <b>skip next alarm</b> would keep skipping the alarm.
10 | - 12.5.3
11 | - Fixed issue with <b>voice</b> where text-to-speech was using the default voice even though a different voice was selected.
12 | - Added <b>alignment</b> option to the <b>widget</b> to align all text.
13 | - Added <b>position</b> option to the <b>widget</b> to position the alarm text.
14 | - Added <b>only show app alarms</b> option to the <b>widget</b> which controls whether only alarms created in this app will be shown, or alarms created in any app will be shown.
15 | - Added information on the <b>remaining number of snoozes</b> when swiping to snooze an active alarm.
16 | - Updated look of the <b>What\'s New</b> dialog.
17 | - 12.5.2
18 | - Added feature to <b>select multiple NFC tags</b> that can dismiss an alarm.
19 | - Added <b>speech rate</b> to text-to-speech option to change the speed that it will speak.
20 | - Fixed an issue with <b>flashlight</b> where, when blink was disabled, it would still blink.
21 | - 12.5.0
22 | - Updated <b>alarm card</b> look to show buttons for dismiss options, snooze options, and regular alarm options.
23 | - Added <b>custom vibration pattern</b> option for alarms.
24 | - Added <b>battery saver</b> option to keep the screen off when an alarm is active. Found in Settings > General.
25 | - Added <b>voice</b> option to <b>text-to-speech</b> to choose which voice to use.
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/values/bools.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | true
6 | false
7 | false
8 |
9 |
10 | false
11 | false
12 | false
13 |
14 |
15 | false
16 | true
17 |
18 |
19 | true
20 | true
21 | false
22 | false
23 | false
24 |
25 |
26 | true
27 |
28 |
29 | true
30 | true
31 | true
32 | true
33 | false
34 | true
35 | true
36 | true
37 |
38 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
12 | #000000
13 | #3c3c3c
14 | #262626
15 | #1a1a1a
16 | #101010
17 | #fb8c00
18 | #ff0000
19 | #c00000
20 | #ff2020
21 | #00d000
22 | #008000
23 | #00c0fb
24 | #ffffff
25 | #b2b2b2
26 | #999999
27 | #FF5F2D
28 |
29 |
56 |
57 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 0dp
5 | 1dp
6 | 2dp
7 | 4dp
8 | 8dp
9 | 12dp
10 | 16dp
11 | 20dp
12 | 24dp
13 | 28dp
14 | 32dp
15 | 36dp
16 | 100dp
17 |
18 |
19 | 16dp
20 | 20dp
21 | 24dp
22 | 28dp
23 | 32dp
24 | 36dp
25 | 40dp
26 | 44dp
27 | 54dp
28 | 72dp
29 | 30dp
30 |
31 |
32 | 10sp
33 | 12sp
34 | 14sp
35 | 16sp
36 | 18sp
37 | 20sp
38 | 28sp
39 | 32sp
40 | 40sp
41 | 52sp
42 | 78sp
43 |
44 |
45 | 48dp
46 | 6dp
47 | 16dp
48 | 16dp
49 | 84dp
50 | 420dp
51 |
52 |
53 |
--------------------------------------------------------------------------------
/app/src/main/res/values/integers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -999
5 | -1
6 | 62
7 | 75
8 | 7
9 | 11
10 | 4
11 |
12 | 0xffffffff
13 | 0xfffb8c00
14 | 0xff00c0fb
15 | 0xfffb8c00
16 | 0xffffffff
17 | 0xffffffff
18 | 0xffffffff
19 | 0xffff0000
20 | 0xffff0000
21 | 1
22 | 0
23 | 0
24 |
25 | 200
26 | 280
27 | 300
28 | 150
29 | 400
30 |
31 | 150
32 | 512
33 | 6
34 |
35 | 0xff000000
36 | 0xffffffff
37 | 0xffffffff
38 | 0xffffffff
39 | 0xffffffff
40 | 0xffffffff
41 | 0xfffb8c00
42 |
43 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles_alarm_option_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
12 |
13 |
14 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/full_backup_content.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/main_preferences.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
13 |
14 |
15 |
21 |
22 |
23 |
30 |
31 |
32 |
38 |
39 |
40 |
47 |
48 |
49 |
55 |
56 |
57 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/nac_clock_widget_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/nfc_tech_filter.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | android.nfc.tech.NfcA
6 |
7 |
8 |
9 | android.nfc.tech.NfcB
10 |
11 |
12 |
13 | android.nfc.tech.NfcBarcode
14 |
15 |
16 |
17 | android.nfc.tech.NfcF
18 |
19 |
20 |
21 | android.nfc.tech.NfcV
22 |
23 |
24 |
25 | android.nfc.tech.IsoDep
26 |
27 |
28 |
29 | android.nfc.tech.Ndef
30 |
31 |
32 |
33 | android.nfc.tech.NdefFormatable
34 |
35 |
36 |
37 | android.nfc.tech.MifareClassic
38 |
39 |
40 |
41 | android.nfc.tech.MifareUltralight
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/provider_filepaths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
--------------------------------------------------------------------------------
/build.gradle.kts:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | plugins {
4 | id("com.android.application") version "8.7.2" apply false
5 | id("org.jetbrains.kotlin.android") version "1.9.20" apply false
6 | id("com.google.dagger.hilt.android") version "2.51.1" apply false
7 | // KSP version works by: -
8 | // This is why the Kotlin part should always match the Kotlin version above
9 | id("com.google.devtools.ksp") version "1.9.20-1.0.14" apply false
10 | }
11 |
12 | // Add this snippet to main project build file like this.
13 | allprojects {
14 | gradle.projectsEvaluated {
15 | tasks.withType {
16 | options.compilerArgs.addAll(listOf("-Xlint:unchecked", "-Xlint:deprecation", "-Xdiags:verbose"))
17 | }
18 | }
19 | }
20 |
21 | configurations {
22 | all {
23 | exclude(group = "com.google.firebase")
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/406.txt:
--------------------------------------------------------------------------------
1 | * Updated package versions. Because of the Room package update, this seems to
2 | cause crashes that, according to the Google Developer console, aren't visible
3 | to users, so maybe it's ok? Hopefully a later update to the Room package
4 | fixes this.
5 | * Added auto-snooze feature because someone wanted it.
6 | * Fixed exception issues from using the flashlight feature.
7 | * Removed some unnecessary code, and updated the width/height of some Views to
8 | placate some accessibility warnings I was getting.
9 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/436.txt:
--------------------------------------------------------------------------------
1 | * Added support for direct boot, which will allow alarms to run when the phone is locked after a reboot.
2 | * Added clock widget for home screen, and many customization options to go with it.
3 | * Updated auto dismiss, auto snooze, and snooze duration to allow setting the seconds, as well as minutes.
4 | * Added translations for Bengali, Hindi, and Brazilian Portuguese.
5 | * Added system file chooser button when choosing a song for an alarm.
6 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/439.txt:
--------------------------------------------------------------------------------
1 | * Added support for direct boot, which will allow alarms to run when the phone is locked after a reboot.
2 | * Added clock widget for home screen, and many customization options to go with it.
3 | * Updated auto dismiss, auto snooze, and snooze duration to allow setting the seconds, as well as minutes.
4 | * Added translations for Bengali, Hindi, and Brazilian Portuguese.
5 | * Added system file chooser button when choosing a song for an alarm.
6 | * Fixed issue with clock widget.
7 | * Fixed issue with color picker.
8 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/440.txt:
--------------------------------------------------------------------------------
1 | * Fixed issue with clock widget.
2 | * Fixed issue with color picker.
3 | * Fixed issue with computing correct values with the new minute/second dropdowns.
4 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/442.txt:
--------------------------------------------------------------------------------
1 | * Fixed issue where alarms would have their auto dismiss, auto snooze, and
2 | snooze duration times set to 0, resulting in alarms dismissing immediately
3 | and being marked as "missed".
4 | * Fixed issue with clock widget where the configuration activity would crash
5 | due to the computed default slider values not being correct.
6 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/462.txt:
--------------------------------------------------------------------------------
1 | * Updated alarm card look to show buttons for dismiss options, snooze options,
2 | and regular options.
3 | * Added custom vibration pattern option for alarms.
4 | * Added battery saver option to keep the screen off when an alarm is active.
5 | Found in Settings > General.
6 | * Added voice option to text-to-speech to choose which voice to use.
7 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/466.txt:
--------------------------------------------------------------------------------
1 | * Fixed alarm options not showing everything and not being scrollable if there were too many things to display.
2 | * Fixed rare crashes that occur initializing the flashlight.
3 | * Show the NFC tag ID if the tag name is not saved.
4 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/471.txt:
--------------------------------------------------------------------------------
1 | * Added feature to select multiple NFC tags that can be used to dismiss an
2 | alarm.
3 | * Added speech rate to text-to-speech to change the speed it would speak.
4 | * Fixed issue with flashlight where (assuming flashlight was being used) if
5 | blink was disabled, it would still blink the flashlight.
6 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/474.txt:
--------------------------------------------------------------------------------
1 | * Fixed issue with voice where text-to-speech was using default voice even when different voice was selected.
2 | * Added alignment option to the widget to align all text.
3 | * Added position option to the widget to position the alarm text.
4 | * Added only show app alarms option to the widget which controls whether only alarms created in this app vs. in any app will be shown.
5 | * Added information on remaining number of snoozes when swiping to snooze an active alarm.
6 | * Updated look of What's New dialog.
7 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/full_description.txt:
--------------------------------------------------------------------------------
1 | Alarm clock that allows you to:
2 |
3 | * Customize the colors of your alarms
4 | * Customize what is shown in the alarm screen
5 | * Swipe to copy/delete an alarm
6 | * Play your own music to wake up
7 | * Use an NFC tag/card to dismiss an alarm
8 | * Gradually increase the volume when an alarm goes off
9 | * Restrict the volume when an alarm goes off
10 | * Use text-to-speech to say the time and/or the name of the alarm when it goes off
11 | * Dismiss the alarm early so that you don't have to wait for it to go off
12 | * Set reminders for an alarm
13 | * See (simple) statistics on your alarm usage
14 | * See how each permission in the app is used
15 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/fastlane/metadata/android/en-US/images/icon.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/short_description.txt:
--------------------------------------------------------------------------------
1 | Customizable and feature-rich alarm clock app.
2 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/title.txt:
--------------------------------------------------------------------------------
1 | NFC Alarm Clock
2 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 |
10 | # The Gradle daemon aims to improve the startup and execution time of Gradle.
11 | # When set to true the Gradle daemon is to run the build.
12 | org.gradle.daemon=true
13 |
14 | # Specifies the JVM arguments used for the daemon process.
15 | # The setting is particularly useful for tweaking memory settings.
16 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
17 | #org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
18 | org.gradle.jvmargs=-Xmx10248m
19 |
20 | # When configured, Gradle will run in incubating parallel mode.
21 | # This option should only be used with decoupled projects. More details, visit
22 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
23 | org.gradle.parallel=false
24 |
25 | # Enables new incubating mode that makes Gradle selective when configuring projects.
26 | # Only relevant projects are configured which results in faster builds for large multi-projects.
27 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:configuration_on_demand
28 | org.gradle.configureondemand=true
29 |
30 | # Migrate to androidx
31 | #android.enableR8=true
32 | android.useAndroidX=true
33 |
34 | # Generate BuildConfig
35 | android.defaults.buildfeatures.buildconfig=true
36 |
37 | # Generate R classes for resources and do make them final fields
38 | android.nonTransitiveRClass=false
39 | android.nonFinalResIds=false
40 |
41 | # AGP 8.0 enables R8 full mode by default, so disable it
42 | android.enableR8.fullMode=false
43 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabeg805/NFC-Alarm-Clock/bad7b7da229b76d6b953ea08ef1f52663e51a4d2/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/javadoc/package-list:
--------------------------------------------------------------------------------
1 | com.nfcalarmclock
2 |
--------------------------------------------------------------------------------
/javadoc/script.js:
--------------------------------------------------------------------------------
1 | function show(type)
2 | {
3 | count = 0;
4 | for (var key in methods) {
5 | var row = document.getElementById(key);
6 | if ((methods[key] & type) != 0) {
7 | row.style.display = '';
8 | row.className = (count++ % 2) ? rowColor : altColor;
9 | }
10 | else
11 | row.style.display = 'none';
12 | }
13 | updateTabs(type);
14 | }
15 |
16 | function updateTabs(type)
17 | {
18 | for (var value in tabs) {
19 | var sNode = document.getElementById(tabs[value][0]);
20 | var spanNode = sNode.firstChild;
21 | if (value == type) {
22 | sNode.className = activeTableTab;
23 | spanNode.innerHTML = tabs[value][1];
24 | }
25 | else {
26 | sNode.className = tableTab;
27 | spanNode.innerHTML = "" + tabs[value][1] + "";
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 |
3 | /**
4 | * The pluginManagement.repositories block configures the
5 | * repositories Gradle uses to search or download the Gradle plugins and
6 | * their transitive dependencies. Gradle pre-configures support for remote
7 | * repositories such as JCenter, Maven Central, and Ivy. You can also use
8 | * local repositories or define your own remote repositories. The code below
9 | * defines the Gradle Plugin Portal, Google's Maven repository,
10 | * and the Maven Central Repository as the repositories Gradle should use to look for its
11 | * dependencies.
12 | */
13 |
14 | repositories {
15 | gradlePluginPortal()
16 | google()
17 | mavenCentral()
18 | }
19 |
20 | }
21 |
22 | dependencyResolutionManagement {
23 |
24 | /**
25 | * The dependencyResolutionManagement.repositories
26 | * block is where you configure the repositories and dependencies used by
27 | * all modules in your project, such as libraries that you are using to
28 | * create your application. However, you should configure module-specific
29 | * dependencies in each module-level build.gradle file. For new projects,
30 | * Android Studio includes Google's Maven repository and the Maven Central
31 | * Repository by default, but it does not configure any dependencies (unless
32 | * you select a template that requires some).
33 | */
34 |
35 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
36 | repositories {
37 | google()
38 | mavenCentral()
39 | }
40 | }
41 |
42 | rootProject.name = "NFC Alarm Clock"
43 | include(":app")
44 |
--------------------------------------------------------------------------------