Commit 6b92e1f7 authored by RAUSHAN RAJ's avatar RAUSHAN RAJ

Firebase_Integration branch merged and Documentation initial commit

parent 8c87a0cf
# Remindly
Android reminderDO app
Features
-------
- Material Design UI
- Repeating reminderDOS. Set intervals in minutes, hours, days, weeks and months
- Completely free and ad-free
<a href="https://play.google.com/store/apps/details?id=com.blanyal.remindly&utm_source=global_co&utm_medium=prtnr&utm_content=Mar2515&utm_campaign=PartBadge&pcampaignid=MKT-AC-global-none-all-co-pr-py-PartBadges-Oct1515-1"><img alt="Get it on Google Play" src="https://play.google.com/intl/en_us/badges/images/apps/en-play-badge.png" width="400"/></a>
Screenshots
-------
<img src="https://github.com/blanyal/Remindly/blob/master/screenshots/screenshot1.png" width="400">
<img src="https://github.com/blanyal/Remindly/blob/master/screenshots/screenshot2.png" width="400">
<img src="https://github.com/blanyal/Remindly/blob/master/screenshots/screenshot3.png" width="400">
License
-------
Copyright 2015 Blanyal D'Souza
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
package com.sudogeeks.talking_reminder;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
......@@ -14,26 +13,23 @@ import androidx.core.app.NotificationCompat;
import java.util.Calendar;
/** \brief A class to do something
*
* description class ke andar
*
*
*
*
/**
* \brief A class implementing basic alarm functions
* This class includes very basic features for an alarm
*/
public class AlarmReceiver extends BroadcastReceiver {
AlarmManager mAlarmManager;
PendingIntent mPendingIntent;
@Override
/** description
* @param context: what context is
* @return void
*
/**
* Notifies user at the time of alarm
*
* @param context:
* @param intent
* @return void
*/
@Override
public void onReceive(Context context, Intent intent) {
int mReceivedID = Integer.parseInt(intent.getStringExtra(ReminderEditActivity.EXTRA_REMINDER_ID));
......@@ -48,20 +44,7 @@ public class AlarmReceiver extends BroadcastReceiver {
editIntent.putExtra(ReminderEditActivity.EXTRA_REMINDER_ID, Integer.toString(mReceivedID));
PendingIntent mClick = PendingIntent.getActivity(context, mReceivedID, editIntent, PendingIntent.FLAG_UPDATE_CURRENT);
// // Create Notification
// NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context,"MyChannelId_01")
// .setLargeIcon(BitmapFactory.decodeResource(context.getResources(), R.mipmap.ic_launcher))
// .setSmallIcon(R.drawable.ic_alarm_on_white_24dp)
// .setContentTitle(context.getResources().getString(R.string.app_name))
// .setTicker(mTitle)
// .setContentText(mTitle)
// .setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION))
// .setContentIntent(mClick)
// .setAutoCancel(true)
// .setOnlyAlertOnce(true);
//
// NotificationManager nManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
// nManager.notify(mReceivedID, mBuilder.build());
NotificationHelper notificationHelper = new NotificationHelper(context, intent);
NotificationCompat.Builder nb = notificationHelper.getChannelNotification();
......@@ -77,28 +60,15 @@ public class AlarmReceiver extends BroadcastReceiver {
context.startService(i);
//context.startService(new Intent(context, ReadReminderTextService.class));
// Intent speechIntent = new Intent();
// speechIntent.setClass(context, ReadReminderTextService.class);
// speechIntent.putExtra("MESSAGE",mTitle );
// speechIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
// context.startActivity(speechIntent);
// Intent speechIntent = new Intent();
// speechIntent.putExtra("MESSAGE", "Bluetooth is on.");
// ReadReminderTextService.enqueueWork(context, speechIntent);
//
}
/**
* Method for setting an alarm
*
* @param context
* @param calendar
* @param ID
* @param calendar Calendar instance encapsulating date and time of alarm
* @param ID Id of the alarm
* @return void
*/
public void setAlarm(Context context, Calendar calendar, int ID) {
mAlarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
......@@ -126,6 +96,14 @@ public class AlarmReceiver extends BroadcastReceiver {
PackageManager.DONT_KILL_APP);
}
/**
* Method for setting repeating alarm
*
* @param context
* @param calendar Calendar instance encapsulating date and time of alarm
* @param ID Id of the alarm
* @param RepeatTime repeat time of alaram
*/
public void setRepeatAlarm(Context context, Calendar calendar, int ID, long RepeatTime) {
mAlarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
......@@ -152,6 +130,12 @@ public class AlarmReceiver extends BroadcastReceiver {
PackageManager.DONT_KILL_APP);
}
/**
* Method for cancelling an alarm
*
* @param context
* @param ID Id of the alarm to cancel
*/
public void cancelAlarm(Context context, int ID) {
mAlarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
......
......@@ -7,7 +7,11 @@ import android.content.Intent;
import java.util.Calendar;
import java.util.List;
/**
* \brief A class For handling the reboot scenarios.
* In this case this class reschedules the alarms if the device boots
*
*/
public class BootReceiver extends BroadcastReceiver {
// Constant values in milliseconds
......@@ -30,6 +34,11 @@ public class BootReceiver extends BroadcastReceiver {
private Calendar mCalendar;
private AlarmReceiver mAlarmReceiver;
/**
* Overrides onReceive method of BroadcastReceiver class. Once the device boot completes, this method will schedule the alarms again
* @param context
* @param intent
*/
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals("android.intent.action.BOOT_COMPLETED")) {
......
package com.sudogeeks.talking_reminder;
// Class to create DateTime objects for easy sorting
/**
* \brief Data Object class for creating DateTime objects to facilitate easy sorting
*
*/
public class DateTimeSorter {
public int mIndex;
public String mDateTime;
private int mIndex;
private String mDateTime;
public DateTimeSorter(int index, String DateTime) {
......@@ -14,7 +17,6 @@ public class DateTimeSorter {
public DateTimeSorter() {
}
public int getIndex() {
return mIndex;
}
......
package com.sudogeeks.talking_reminder;
//package com.example.application.alarmmanagerproject;
import android.annotation.TargetApi;
import android.app.NotificationChannel;
......@@ -15,7 +14,9 @@ import android.speech.tts.TextToSpeech;
import androidx.core.app.NotificationCompat;
/**
*
*/
public class NotificationHelper extends ContextWrapper {
public static final String channelID = "channelID";
public static final String channelName = "Channel Name";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment