Share My Creation Alarm with simple task reminder

drachmad

Member
Licensed User
Alarm with simple task reminder.
As a Task reminder:
For QuickSet reminder just hit the Task Setup and Save, it will make a reminder of 30 minutes. If different, just adjust it by "Quick time adjustment".
Interval time, eg. for medication dispensing every 6 hours 3 times/day for 4 days.
Or recurrent every 30 days for 90 days.
Only one task needed for each task with automatic roll-over around midnight at the ended date.
The date can be set. Not only the days of week.
Recurrent by month (same day 1-28) or by year.
The notes can support many lines.
Task/Schedule group for easier viewing/manage.
As an Alarm:
List of the scheduled alarm.
The alarm after the latest snooze has different sound than the setting sound and a voice reminder.
(set in the application and max volume 100%)
The Maximum Volume is increased after each snooze (by 10%, fixed in the application).
In days of week task one or more of the days can be skip (Can be managed until next n days).

The other options that usually available in alarm application.
Each task can be set individually:
Setting the Days of Week
Sound duration
Sound type - Ringtone or music
Maximum Volume
Time to Maximum Volume (Ascending Sound)
Number of Snoozes
Time between Snoozes

Time display depend on the setting of "use 24-hour format"
Swipe Down to turn-off
Volume button as snooze button.
Maximum Volume is independent of the system volume setting.
Start sticky (the application can be killed for memory saving)

Limitation:
Vibrate fail on some Tab (No vibration device?), smartphone OK.
Ringtone can only get by number (not name) - SOLVED, thanks to Stevel05

In this version it use CSV file, easy to follow and modified/maintain in development.

Compile with b4a v 2.71
Libs use:
GestureDetector v.1.10 - swipe down
Phone v 2.20 - ringtone manager, wake up
SQL v 1.20 - SQLite sorting
StringUtils v 1.02 - CSV operation, Label height based on text height.
Reflection v 2.40 - ringtone name, unlock screen, vibration, ClsWheel
DateUtils v 1.03 - AnotherDatePicker (entering date)
Accessibilty v 1.00 - scaling font
IME v 1.05 - hiding keyboard
TTS v 1.00 - text to speech

Other implementation:
Custom Tab (Tab at the bottom)
Scrolling text view (Not using CustomListView Class)
Start_sticky (alarm still works although application is killed)
Customize AnotherDatePicker Class v 1.0 (with starting day Monday and limited year)
Changing from using Dialog v.2.92 (modal) to ClsWheel and ClsDialog (non modal).
Customize ClsWheel Class v.1.4 (entering time, number and custom data)
ClsDialog (non modal entering text, filename and msgbox).
Msgbox using HTML formatted string. The message text can be formatted, zoomed & scrolled.
Scaling font support (detecting the display font size setting large/huge).

All modules are in used (Activity, Class, Code, Service)
 

Attachments

Last edited:

drachmad

Member
Licensed User
Update implementing:
Custom Tab (Tab at the bottom)
Scrolling text view (Not using CustomListView Class)
 

drachmad

Member
Licensed User
Due to the introduction of interval time and vibration.
The data structure is changed
What you can do:
Uninstall and install the new download, reentry the required data.
Don't just reinstall, the data is still exists.
or
Use any text editor, look at Andorid/data/b4a.myAlarm/files/AlarmTask.csv
Adding an interval data.
Insert BEFORE the notes:
0 -> ...,0,Notes

Change AFTER the notes:
No -> 0 -> ...,Notes,0,
Yes -> 300 or any number

I apologize for the inconvenience.:sign0013:

Other improvements:
Make the custom tab more simple and looks nicer.
Make the alarm still work (START_STICKY) although the application is killed.
Adding a interval time option
Move the Snooze lower so that it can be touch single handed (for smartphone).

The vibration has tested on smartphone.
 
Last edited:

drachmad

Member
Licensed User
I change the name because I want to put it in Google Play Store.
The name myAlarm is already in use. At the beginning it is just a learning project.
(I am sorry it seem iRemindU is already used too - for Apple)
Although there are still bugs, but I hope you can learn a lot of basic tricks.
This is my last update. All next update will be available only in apk format in Google Play Store.

After reducing the sound file, now the beta version of the apk can be loaded in this forum.
Any comment welcome.

Due to the introduction of grouping.
The data structure is changed again.
What you can do:
Use any text editor, look at Andorid/data/b4a.myAlarm/files/AlarmTask.csv
Adding a group data (starting with 1 till 5).
Insert BEFORE the notes:
1 -> ...,1,Notes
Copy the file to Android/data/b4a.iRemindU/files/AlarmTask.csv

I apologize for the inconvenience.

Other improvements:
Using the AnotherDatePicker class for date input.
Adding group viewer/filter.
Adding view of the today previous schedule and an option to check mark it.
Designed & tested on Galaxy Tab 7" and tested on Galaxy Note II.
Note: if you are using the datetime sort algorithm in the previous version, please update.
 
Last edited:

drachmad

Member
Licensed User
For newbie, it is worth to see how to modified from modal -> non modal dialog
Non modal will not stop timer.
From modal:
if xxx.show(...) = DialogResponse.POSITIVE Then
...
end if

To non modal:
xxx.show("test")

Sub test_closed(...)
if ... then
...
end if
End sub

See at activity module Task Setup and class module AnotherDatePicker, ClsWheel and ClsDialog.

ver 0.4
Added Lib: Accessibilty v 1.00 for scaling font support (detecting the display font size setting large/huge).
Added Lib: TTS v 1.00 for Text to Speech (Voice reminder)
Change Lib: Gestures v 1.2 to GestureDetector v 1.1
Implementing ClsWheel Class v.1.4 for entering time, number, custom data
Adding ClsDialog for non modal dialog for entering text, filename and msgbox
Adding ExitApplication to reduce the memory used when exiting.
Maximum Volume is independent of the system volume setting
Volume button as snooze button.

Main bug solved:
Column Date or Time of the table is clicked.
To many "Doevents" is generated in the alarm (-> freeze?).
Swipe down implementation.
Saving the selected ringtone

I apologize for changing the name again. I hope now it will stay.
And for breaking my promise not update because in my opinion the non modal dialog sample is a good example for newbie.
 
Last edited:

drachmad

Member
Licensed User
Update to v 0.5 Beta

The main reason I update:
Wrong implementation of pwr.KeepAlive combine with SetShowWhenLocked.
The RingAction can not go to sleep if it kept idle, although it can be closed using snooze or dismiss action.
It drains the battery. The explanation is in the comments (see Alarm Service and RingAction activity)

lbl = Sender, lbl should not be initialized (Although I don't see any difference!)

Behavior change:
The TTS is activated when the volume is reached the specified max volume (to reduce startling effect).
If the time to max volume is bigger than the sound duration, the TTS will not be activated.

New implementation:
Msgbox using HTML formatted string. The message text can be formatted, zoomed & scrolled.

Bug solved:
RingAction can not go to sleep - due to above wrong implementation.
Error when choosing for music if the music folder is empty.
 
Last edited:
Top