GithubHelp home page GithubHelp logo

mrkostua / smartalarm Goto Github PK

View Code? Open in Web Editor NEW
18.0 3.0 7.0 6.49 MB

Full working Alarm clock with various settings.

Home Page: https://play.google.com/store/apps/details?id=com.mrkostua.mathalarm

License: MIT License

Java 0.98% Kotlin 99.02%
android alarm-clock kotlin-android mvp clean-code junit espresso mockito robolectric hacktoberfest

smartalarm's Introduction

SmartAlarm

Description

Fully working alarm clock tested from API 16 -> API 28. Simple rule - only one alarm can be set at time. Contains basic features for typical alarm clock with simple animated task in the end to stop the alarm (which prevents user from stopping alarm in the first 2 seconds and gives some time to wake up).

Google Play link: SmartAlarm

Functionality

Name Description
Show alarm activity above the lock screen Wake up system using PartialWakeLock from background service and enabling few window flags .
option set time Simple fragment with TimePicker to set time and textView to inform about remaining time to sleep.
option set ringtone Fragment with RecycleView populated with custom layout(play/pause button), MediaPlayer, RingtoneManager.
option set text message Just scrollable EditText to type some message for morning (reminder, motivation to wake up).
option set deepSleep WakeUp Plays some calm music in the background and slowly increase its volume before starting main alarm ringtone.
drag-drop animation task to stop alarm 5 numbers <=10 dynamically added to layout with random layoutParams (top and left margin from calculated bounds), algorithm to generate random values with bounds, borders(not overlap each other) returns result from AsyncTask.

Used technologies:

  • main languages:
    • Kotlin
    • Java (10%)
    • Xml
  • architecture:
    • Dagger 2
    • MVP (70%)
  • additional :
    • RecycleView
    • DataBinding / MVVM
    • Material Design
  • testing:
    • JUnit
    • Mockito
    • Robolectric
    • Espresso

App screenshots:

smartAlarm app screenshots

Future releases plans:

smartalarm's People

Contributors

kikokoo avatar mrkostua avatar yasujizr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

smartalarm's Issues

New Logo for SmartAlarm

Hi,

I'm designing for open source projects, expanding my portfolio. I want designing an icon for your project. There are a few ideas in my mind, I hope you accept and I do them. If you have an idea, please let me know. In this way we create a icon.

Best Regards.

Perform remote actions in case of not stopping alarm or others scenarios

Consider adding schedule intent to Alarm Service which will fully secure user of waking up.

  1. Check the battery level every 2 h (depends on last results and if ti was plugged in ).
  2. Check if the alarm turn on and scheduled intent.
  3. Check if Alarm volume is turn off (or very low).

In all this cases inform user by mail or etc.
Also there can 2-3 level of argent (importance of this alarm) (in some case app will automatically changed Settings or start Playing music to attract user attention to low battery level).
more info (notes)

GUI updates

In particular main style colors and design of some layouts (screens)

OptionRingtone additional feature

add fun for adding ringtone from external path :

private fun addRingtoneFromExternalPath(): Int {
val openFileActionIntent: Intent
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
openFileActionIntent = Intent.makeMainSelectorActivity(Intent.ACTION_MAIN, Intent.CATEGORY_APP_MUSIC)
openFileActionIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
} else {
openFileActionIntent = Intent("android.intent.action.MUSIC_PLAYER")
}

    presenter.saveRingtoneFromExternalPath()
    startActivity(openFileActionIntent)

    // to do it faster we can just add one ringtone and save in SharedPreferences so one last added
    // ringtone will be available all the time or SharedPreferences Set<String>
    /**
     * return the path to this file and probably this list need to be saved somewhere (local DB ) SharedPreferences
     *  1 need to be some ListView populated by some ArrayList of music that can be updated by user
     *
     * user can click the button and search throw files tree to music location and by choosing ->
     * file with proper type it will be added to the list of ringtone's.
     */

    return 0
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.