Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show Persistent notification only when connected to pu wifi #13

Merged
merged 2 commits into from
Oct 23, 2014
Merged

Show Persistent notification only when connected to pu wifi #13

merged 2 commits into from
Oct 23, 2014

Conversation

Ashish-Bansal
Copy link
Member

No description provided.

Show persistent notification only when wifi is ON and connected to
pu@campus.
@@ -91,10 +112,6 @@ public IBinder onBind(Intent intent) {
* Show a notification if possible else stop service
*/
void showNotificationOrStop() {
prefNeedPersistence = preferences.getBoolean(SettingsActivity.KEY_PERSISTENCE, SettingsActivity.DEFAULT_KEY_PERSISTENCE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the preference option? Ideally the user should still have an option to choose whether or not display that notification.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I am not removing that option. This snippet is only accessing the values of that variables and it already has been done in onCreate method.

@ylogx ylogx merged commit 320b2ab into DevelopFreedom:master Oct 23, 2014
@ylogx
Copy link
Member

ylogx commented Oct 23, 2014

Great, so I merged this into release branch. I also created a separate ashish branch for you. It's recommended that you checkout that branch and push into the same branch(ashish).

Everybody works in their separate branch and I eventually merge all those changes into release branch.
Master branch has the production code that is tagged for release on F-Droid store i.e a new tag creates an update notification to all F-Droid users.

There are some tasks still pending. One of them is to get the url dynamically instead of hard-coded string (http:172....).

CASE 1: Redirections 302
  • I created this code to test redirections in PU@Campus http://fpaste.org/144654/
  • PU@Campus is weird, it sometimes redirects and sometimes serves a local page instead that redirects.
  • It isn't completly successful but works in some situations.
CASE 2: Local server serves page instead of google.com which redirects (UIET, PU@Campus sometimes does this)
  • We need to figure out a way to distinguish normal google homepage from the one served to us.
  • Then we need to parse that page data to get the url, which is easy (RegEx).
  • Then we need to find out what the username and password field's id are in response. This is tough part I guess. Let's reach till the above point and then we'll figure out a solution for this phase too.

Update: I just opened a separate issue #14 for this. Let's figure out ways to do this there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants