IDCubed / oms-inside

Module repository for the OMS "Inside" Trusted Application Bundle (TAB)
Other
5 stars 10 forks source link

Enable Android Notification Settings control from App #9

Open a-laughlin opened 10 years ago

a-laughlin commented 10 years ago

Entering notification settings (e.g., hours a notification can display, # of notifications) in the web app should modify those settings in the Android shell.

a-laughlin commented 10 years ago

Adding to beta release.

Erin-Boehmer commented 10 years ago

In regard to the notification vs, pop-up survey question, see this question on StackOverflow (http://stackoverflow.com/questions/6645944/android-notification-popup-dialog-box). According to this person, using notifications is considered best practice over using pop-ups.

a-laughlin commented 10 years ago

Thanks @Erin-Boehmer.

@case-dubs, I'm leaning toward the pop-up too. Reflecting, I have a calendar app that does a pop-up with a snooze button. It isn't really bothersome.

Erin, any idea how easy it is to do a popup in Android, then change to a notification if it really annoys beta testers?

This would be a good question to throw Durga's way too. I'll track down her github username.

a-laughlin commented 10 years ago

@sDurgam Design-wise, some apps use notifications and others use popups. My calendar app (business calendar) uses both. A form that pops up would likely get more responses than a notification, but it has the potential to annoy users. Any idea how easy it is to add a webview to pop up the question form instead of a notification, but have a "snooze" button at the bottom? Also, how easy it would be to switch to a notification if many users find it too annoying?

I considered whether to give users an option there, but for data integrity, the fewer form presentation differences the better.

sDurgam commented 10 years ago

@a-laughlin I think it is possible to display web view in a pop up. I just tried a small example now. When I click on a button, a web view is displayed in a pop up. Here are links to screen shots of the same(https://f.cloud.github.com/assets/3854768/1702265/2f60d14c-608a-11e3-99a2-eab49ca16514.jpg and https://f.cloud.github.com/assets/3854768/1702266/34b716a6-608a-11e3-80bb-d6f7a17d3766.jpg). I did not understand why snooze option is required. I am working on the last one to switch to a notification instead of a pop up. I will let you know my comments soon about that.

a-laughlin commented 10 years ago

@sDurgam Awesome! Looking good in both! We should have some forms to put in those soon :).

The reason for the snooze button is so that if it pops up while we're using Google maps while driving, or doing some other activity we need to focus on, we need to be able to make it go away quickly. If the snooze button is possible (inside or outside the webview, it should hopefully be unnecessary to use notifications.

One challenge coming up is being able to set a time range in the webview, and have the pop-ups only happen during that time. Otherwise if they happen at 3am, they may wake users up.

Will you be there this Tuesday? We could look at how some other apps have handled that and draw some mockups on paper.

Adam

Sent via mobile. On Dec 8, 2013 11:30 PM, "sDurgam" notifications@github.com wrote:

@a-laughlin https://github.com/a-laughlin I think it is possible to display web view in a pop up. I just tried a small example now. When I click on a button, a web view is displayed in a pop up. Here are links to screen shots of the same( https://f.cloud.github.com/assets/3854768/1702265/2f60d14c-608a-11e3-99a2-eab49ca16514.jpgand https://f.cloud.github.com/assets/3854768/1702266/34b716a6-608a-11e3-80bb-d6f7a17d3766.jpg). I did not understand why snooze option is required. I am working on the last one to switch to a notification instead of a pop up. I will let you know my comments soon about that.

— Reply to this email directly or view it on GitHubhttps://github.com/IDCubed/oms-happathon/issues/9#issuecomment-30105110 .

sDurgam commented 10 years ago

@a-laughlin I am planning to come this Tuesday. I will let you know if I cannot make it.

sDurgam commented 10 years ago

@a-laughlin I am afraid I cannot make it today. But I can attend the hangout tomorrow evening at 5 pm. Durga.

a-laughlin commented 10 years ago

Hey @sDurgam. No worries. See you tomorrow!

Adam

On Tue, Dec 10, 2013 at 12:40 PM, sDurgam notifications@github.com wrote:

@a-laughlin https://github.com/a-laughlin I am afraid I cannot make it today. But I can attend the hangout tomorrow evening at 5 pm. Durga.

— Reply to this email directly or view it on GitHubhttps://github.com/IDCubed/oms-happathon/issues/9#issuecomment-30249883 .

Adam Laughlin

Cambridge, MA 303-929-7880 LinkedIn http://www.linkedin.com/profile/view?id=11468038 Twitter http://twitter.com/a_laughlin Google+ https://plus.google.com/107662649138779191300 a-laughlin.comhttp://a-laughlin.com/?utm_source=sig&utm_medium=em&utm_campaign=gnrl

sDurgam commented 10 years ago

Adam unfortunately I am still outside. Are you available today at 5:30 pm for hangout. My apologies.

a-laughlin commented 10 years ago

Hey @sDurgam . I just got back in state and was thinking of you. Will you be able to make it to code for Boston on Tuesday?

sDurgam commented 10 years ago

Yes Adam I am planning to attend as of now.

a-laughlin commented 10 years ago

Awesome! I look forward to seeing you there.

sDurgam commented 10 years ago

Adam I don't think I can attend today. It's very cold and my husband has some urgent work. I do not drive. Can we meet sometime during the weekend. Saturday or Sunday afternoon are you available?

a-laughlin commented 10 years ago

Totally understood. :) I just about froze my nose off walking here. Procrastinating walking home now. How is Sunday around 4 or 5pm?

Adam

On Tue, Jan 7, 2014 at 4:35 PM, sDurgam notifications@github.com wrote:

Adam I don't think I can attend today. It's very cold and my husband has some urgent work. I do not drive. Can we meet sometime during the weekend. Saturday or Sunday afternoon are you available?

— Reply to this email directly or view it on GitHubhttps://github.com/IDCubed/oms-happathon/issues/9#issuecomment-31782009 .

Adam Laughlin

Cambridge, MA 303-929-7880 LinkedIn http://www.linkedin.com/profile/view?id=11468038 Twitter http://twitter.com/a_laughlin Google+ https://plus.google.com/107662649138779191300 a-laughlin.comhttp://a-laughlin.com/?utm_source=sig&utm_medium=em&utm_campaign=gnrl

sDurgam commented 10 years ago

Adam 4pm on Sunday. Is the location to meet the same?

a-laughlin commented 10 years ago

4pm sounds great. Let's use https://plus.google.com/hangouts/_/event/cnpfng8vavg67eb8k7ecfqsmq4k. If you prefer to meet in person, I'll be up near Davis Sq right before that, so we could meet at a cafe instead.

sDurgam commented 10 years ago

Either way is fine.

a-laughlin commented 10 years ago

Let's do in person. Fewer tech glitches. Bourbon coffee at 4pm?

sDurgam commented 10 years ago

Sure Adam.

a-laughlin commented 10 years ago

Next step for me on this is implementing a button that will send a JSON request to the server.

Here's a sequence diagram that hopefully explains this a bit better.

sDurgam commented 10 years ago

Thanks Adam. I will look into the sequence diagram.

a-laughlin commented 10 years ago

The part I'm unsure about is how the popup scheduling code will get the settings. The sequence diagram just has it "observing" in some sense. Is that possible?

Another way might be to route all webview requests through a router of some sort. It could parse all outgoing requests. When the requests contain settings changes, it could get the settings and update the scheduler accordingly. Otherwise it could let all requests pass through normally.

So we'd have a scheduler class, a router class, and Funf, which would do the data sync.

How does that sound?

a-laughlin commented 10 years ago

Figuring this part out will help us determine what sort of dev environment we need to set up.

sDurgam commented 10 years ago

Adam have got homework to do. Will look into the sequence diagram and will follow up on that next week.

a-laughlin commented 10 years ago

Thanks for the heads up @sDurgam. Catch you next week!

sDurgam commented 10 years ago

Hi Adam any APsI right now to update server about user's choice

a-laughlin commented 10 years ago

Right now I'm working on getting the dev server up and running to create them.

How the APIs will be structured depends also on how Android can get the data. That's the part I'm unfamiliar with.

One method is to have the settings go from the web page, to the server, and back to the phone in some sort of sync. A simpler way might be to route all http requests through a router class of some sort in the webview. It could parse all outgoing requests. When the requests contain settings changes, it could get the settings and update the device scheduler class accordingly. Otherwise it could let all requests pass through normally. That would prevent having the settings first going to the server and then coming back.

So we'd have a scheduler class, a router class, and Funf, which would do the data sync.

How does that sound?

a-laughlin commented 10 years ago

@sDurgam I just emailed you a key for the development VM. It may be the wrong key. I'm having issues with it. Looking into that now.

sDurgam commented 10 years ago

@a-laughlin scheduler class and a router class idea sounds better. I will look for router class in Android

sDurgam commented 10 years ago

We can get and parse JSON data from Android code asynchronously also. Minimizing calls would be a best option.

sDurgam commented 10 years ago

@a-laughlin Thanks. Let me know once you get an update on the key.