This repository was archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Add support for push notifications on class seat openings #45
Open
divad12
wants to merge
14
commits into
master
Choose a base branch
from
david-push-notifications
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
8a43b8d
Add Google Play Services SDK to allow use of GCM
divad12 35bcf85
Get a registration ID from GCM on main app start
divad12 1a9fcbd
Alert and start app on course page on push notification
divad12 5cb1bcb
Don't use a WakefulBroadcastReceiver and remove WAKE_LOCK permission
divad12 6c3fa88
Revert "Remove checkbox for push notification on class schedule for now"
divad12 9ba958c
Use button instead of checkbox for course alerts
divad12 2a8563d
Use random ID for push notification notification; add TODO comment
divad12 9d206cc
Properly display notification contents from server
divad12 a3c4293
Update receiver to match server response format
divad12 e24d0b7
Actually send a POST request to add alert
divad12 98b041a
Send user ID in POST /api/v1/alerts/course/gcm
divad12 68731a8
Redesign course sections screen to make alert on seats clearer
divad12 ff990ba
Reorder profile tabs to have courses as 1st tab, since no class sched…
divad12 1526d60
Remove local testing code
divad12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,46 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<TableRow xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" android:layout_height="wrap_content"> | ||
<TextView android:id="@+id/col1" android:layout_gravity="fill" android:layout_weight="1" android:paddingLeft="10dp"/> | ||
<TextView android:id="@+id/col2" android:layout_gravity="fill" android:layout_weight="1" /> | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:paddingTop="3dp" | ||
android:paddingBottom="3dp" | ||
android:paddingLeft="10dp" | ||
android:paddingRight="10dp"> | ||
<TextView | ||
android:id="@+id/col1" | ||
android:gravity="center|left" | ||
android:text="LEC\n001" | ||
android:layout_width="50dp" | ||
android:layout_height="fill_parent" | ||
android:textSize="18dp"/> | ||
<TextView | ||
android:id="@+id/col2" | ||
android:text="7:00PM - 8:50PM\nMTWThFSSu\nMC 4059 - UW U\nByron Weber Becker" | ||
android:layout_gravity="center_vertical" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" /> | ||
<LinearLayout | ||
android:layout_gravity="center_vertical|right" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal"> | ||
<TextView | ||
android:id="@+id/seats_available_textview" | ||
android:layout_gravity="center" | ||
android:layout_height="wrap_content" | ||
android:layout_width="wrap_content" | ||
android:gravity="center|right" | ||
android:text="0/0\nseats" | ||
android:layout_weight="1" /> | ||
<ImageButton android:id="@+id/add_alert_button" | ||
style="@style/Flow.StyledButton" | ||
android:padding="5dp" | ||
android:layout_gravity="center_vertical" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:background="@drawable/blue_button" | ||
android:layout_marginLeft="10dp" | ||
android:src="@drawable/ic_add_alert" /> | ||
</LinearLayout> | ||
</TableRow> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should uncheck any selected nav drawer entries if the app is being opened to a course. Maybe a setAllItemsUnchecked() method?