├── webservice
├── log
│ └── .keep
├── app
│ ├── mailers
│ │ └── .keep
│ ├── models
│ │ ├── .keep
│ │ ├── concerns
│ │ │ └── .keep
│ │ ├── meeting.rb
│ │ └── rating.rb
│ ├── assets
│ │ ├── images
│ │ │ └── .keep
│ │ ├── javascripts
│ │ │ └── application.js
│ │ └── stylesheets
│ │ │ └── application.css
│ ├── controllers
│ │ ├── concerns
│ │ │ └── .keep
│ │ ├── application_controller.rb
│ │ └── meetings_controller.rb
│ ├── helpers
│ │ └── application_helper.rb
│ └── views
│ │ ├── meetings
│ │ ├── mymeetings.json.jbuilder
│ │ ├── create.json.jbuilder
│ │ ├── show.json.jbuilder
│ │ └── index.json.jbuilder
│ │ └── layouts
│ │ └── application.html.erb
├── lib
│ ├── assets
│ │ └── .keep
│ ├── tasks
│ │ └── .keep
│ └── response.rb
├── test
│ ├── models
│ │ └── .keep
│ ├── controllers
│ │ └── .keep
│ ├── fixtures
│ │ └── .keep
│ ├── helpers
│ │ └── .keep
│ ├── integration
│ │ └── .keep
│ ├── mailers
│ │ └── .keep
│ └── test_helper.rb
├── public
│ ├── favicon.ico
│ ├── robots.txt
│ ├── 500.html
│ ├── 422.html
│ └── 404.html
├── vendor
│ └── assets
│ │ ├── javascripts
│ │ └── .keep
│ │ └── stylesheets
│ │ └── .keep
├── Procfile
├── config
│ ├── boot.rb
│ ├── initializers
│ │ ├── cookies_serializer.rb
│ │ ├── session_store.rb
│ │ ├── mime_types.rb
│ │ ├── filter_parameter_logging.rb
│ │ ├── backtrace_silencers.rb
│ │ ├── assets.rb
│ │ ├── wrap_parameters.rb
│ │ └── inflections.rb
│ ├── environment.rb
│ ├── routes.rb
│ ├── database.yml
│ ├── locales
│ │ └── en.yml
│ ├── secrets.yml
│ ├── application.rb
│ └── environments
│ │ ├── development.rb
│ │ ├── test.rb
│ │ └── production.rb
├── config.ru
├── Rakefile
├── db
│ ├── migrate
│ │ ├── 20150323194915_add_event_id_to_rating.rb
│ │ ├── 20150323140001_create_meetings.rb
│ │ └── 20150323140011_create_ratings.rb
│ ├── seeds.rb
│ └── schema.rb
├── README.md
├── .gitignore
├── Gemfile
└── Gemfile.lock
├── android_app
├── app
│ ├── .gitignore
│ ├── src
│ │ └── main
│ │ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── icon.png
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── icon.png
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── icon.png
│ │ │ │ └── ic_launcher.png
│ │ │ ├── drawable-mdpi
│ │ │ │ ├── icon.png
│ │ │ │ ├── splashnexus6.png
│ │ │ │ └── material_design_icons.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── icon.png
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── icon.png
│ │ │ ├── xml
│ │ │ │ └── network_security_config.xml
│ │ │ ├── values
│ │ │ │ ├── plurals.xml
│ │ │ │ ├── colors.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── styles.xml
│ │ │ │ └── strings.xml
│ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ ├── menu
│ │ │ │ └── menu_main.xml
│ │ │ └── layout
│ │ │ │ ├── activity_no_network_activity.xml
│ │ │ │ ├── activity_calendar.xml
│ │ │ │ ├── fragment_calendar_page.xml
│ │ │ │ ├── fragment_calendar_range_display.xml
│ │ │ │ ├── rating_view.xml
│ │ │ │ ├── activity_connect.xml
│ │ │ │ ├── fragment_rating_dialog.xml
│ │ │ │ ├── activity_navigation_drawer.xml
│ │ │ │ └── event_view.xml
│ │ │ ├── java
│ │ │ └── com
│ │ │ │ └── microsoft
│ │ │ │ └── office365
│ │ │ │ └── meetingfeedback
│ │ │ │ ├── PageSettable.java
│ │ │ │ ├── model
│ │ │ │ ├── EventFilter.java
│ │ │ │ ├── outlook
│ │ │ │ │ ├── payload
│ │ │ │ │ │ ├── From.java
│ │ │ │ │ │ ├── Sender.java
│ │ │ │ │ │ ├── Attendee.java
│ │ │ │ │ │ ├── Organizer.java
│ │ │ │ │ │ ├── ToRecipient.java
│ │ │ │ │ │ ├── Envelope.java
│ │ │ │ │ │ ├── Date.java
│ │ │ │ │ │ ├── Body.java
│ │ │ │ │ │ ├── EmailAddress.java
│ │ │ │ │ │ ├── MessageWrapper.java
│ │ │ │ │ │ ├── Message.java
│ │ │ │ │ │ └── Event.java
│ │ │ │ │ ├── EmailInterface.java
│ │ │ │ │ ├── CalendarInterface.java
│ │ │ │ │ └── CalendarService.java
│ │ │ │ ├── SavedRatings.java
│ │ │ │ ├── authentication
│ │ │ │ │ └── AuthenticationContextBuilder.java
│ │ │ │ ├── User.java
│ │ │ │ ├── webservice
│ │ │ │ │ ├── payload
│ │ │ │ │ │ ├── CreateRatingRequest.java
│ │ │ │ │ │ └── MeetingServiceResponseData.java
│ │ │ │ │ ├── RatingServiceInterface.java
│ │ │ │ │ ├── RatingService.java
│ │ │ │ │ └── RatingServiceManager.java
│ │ │ │ ├── meeting
│ │ │ │ │ ├── EventGroup.java
│ │ │ │ │ ├── DateRange.java
│ │ │ │ │ ├── RatingData.java
│ │ │ │ │ └── EventDecorator.java
│ │ │ │ ├── service
│ │ │ │ │ ├── MyMeetingsResponse.java
│ │ │ │ │ └── RatingServiceAlarmManager.java
│ │ │ │ ├── Constants.java
│ │ │ │ └── DataStore.java
│ │ │ │ ├── view
│ │ │ │ ├── ShowRatingDialogEvent.java
│ │ │ │ ├── DialogConfig.java
│ │ │ │ ├── CalendarFragmentPagerAdapter.java
│ │ │ │ ├── RateMyMeetingsDialogFragment.java
│ │ │ │ ├── RatingsRecyclerViewAdapter.java
│ │ │ │ ├── CalendarRangeFragment.java
│ │ │ │ ├── CalendarPageFragment.java
│ │ │ │ ├── EventsRecyclerViewAdapter.java
│ │ │ │ └── RatingDialogFragment.java
│ │ │ │ ├── RatingActivity.java
│ │ │ │ ├── MeetingFeedbackApplication.java
│ │ │ │ ├── util
│ │ │ │ ├── ConnectivityUtil.java
│ │ │ │ ├── SharedPrefsUtil.java
│ │ │ │ ├── FormatUtil.java
│ │ │ │ ├── CalendarUtil.java
│ │ │ │ └── DialogUtil.java
│ │ │ │ ├── BaseFragment.java
│ │ │ │ ├── BaseDialogFragment.java
│ │ │ │ ├── NoNetworkActivity.java
│ │ │ │ ├── inject
│ │ │ │ ├── ApplicationModule.java
│ │ │ │ └── ActivityModule.java
│ │ │ │ ├── ConnectActivity.java
│ │ │ │ ├── NavigationBarActivity.java
│ │ │ │ └── BaseActivity.java
│ │ │ └── AndroidManifest.xml
│ ├── proguard-rules.pro
│ └── build.gradle
├── settings.gradle
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── .gitignore
├── gradle.properties
├── build.gradle
└── gradlew.bat
├── readme-images
├── O365-Android-MeetingFeedback-SendAs.png
├── O365-Android-MeetingFeedback-Constants.png
└── O365-Android-MeetingFeedback-video_play_icon.png
├── .travis.yml
├── LICENSE.txt
├── NOTICES.md
└── README-Localized
├── README-zh-tw.md
├── README-zh-cn.md
└── README-ja-jp.md
/webservice/log/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/webservice/app/mailers/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/webservice/app/models/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/webservice/lib/assets/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/webservice/lib/tasks/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/webservice/test/models/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/webservice/public/favicon.ico:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/webservice/test/controllers/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/webservice/test/fixtures/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/webservice/test/helpers/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/webservice/test/integration/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/webservice/test/mailers/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/webservice/app/assets/images/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/webservice/app/models/concerns/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/android_app/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
3 |
--------------------------------------------------------------------------------
/webservice/app/controllers/concerns/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/webservice/vendor/assets/javascripts/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/webservice/vendor/assets/stylesheets/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/android_app/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/webservice/Procfile:
--------------------------------------------------------------------------------
1 | web: bundle exec thin start -p $PORT
--------------------------------------------------------------------------------
/webservice/config/boot.rb:
--------------------------------------------------------------------------------
1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
2 |
3 | require 'bundler/setup' # Set up gems listed in the Gemfile.
4 |
--------------------------------------------------------------------------------
/android_app/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/android-java-meetingfeedback-rest-sample/master/android_app/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android_app/app/src/main/res/mipmap-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/android-java-meetingfeedback-rest-sample/master/android_app/app/src/main/res/mipmap-hdpi/icon.png
--------------------------------------------------------------------------------
/android_app/app/src/main/res/mipmap-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/android-java-meetingfeedback-rest-sample/master/android_app/app/src/main/res/mipmap-mdpi/icon.png
--------------------------------------------------------------------------------
/android_app/app/src/main/res/mipmap-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/android-java-meetingfeedback-rest-sample/master/android_app/app/src/main/res/mipmap-xhdpi/icon.png
--------------------------------------------------------------------------------
/webservice/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require ::File.expand_path('../config/environment', __FILE__)
4 | run Rails.application
5 |
--------------------------------------------------------------------------------
/webservice/config/initializers/cookies_serializer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | Rails.application.config.action_dispatch.cookies_serializer = :json
4 |
--------------------------------------------------------------------------------
/android_app/app/src/main/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/android-java-meetingfeedback-rest-sample/master/android_app/app/src/main/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/android_app/app/src/main/res/mipmap-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/android-java-meetingfeedback-rest-sample/master/android_app/app/src/main/res/mipmap-xxhdpi/icon.png
--------------------------------------------------------------------------------
/android_app/app/src/main/res/mipmap-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/android-java-meetingfeedback-rest-sample/master/android_app/app/src/main/res/mipmap-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/readme-images/O365-Android-MeetingFeedback-SendAs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/android-java-meetingfeedback-rest-sample/master/readme-images/O365-Android-MeetingFeedback-SendAs.png
--------------------------------------------------------------------------------
/webservice/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require File.expand_path('../application', __FILE__)
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
--------------------------------------------------------------------------------
/webservice/config/initializers/session_store.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | Rails.application.config.session_store :cookie_store, key: '_MeetingData_session'
4 |
--------------------------------------------------------------------------------
/android_app/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/android-java-meetingfeedback-rest-sample/master/android_app/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android_app/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/android-java-meetingfeedback-rest-sample/master/android_app/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android_app/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/android-java-meetingfeedback-rest-sample/master/android_app/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/readme-images/O365-Android-MeetingFeedback-Constants.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/android-java-meetingfeedback-rest-sample/master/readme-images/O365-Android-MeetingFeedback-Constants.png
--------------------------------------------------------------------------------
/android_app/app/src/main/res/drawable-mdpi/splashnexus6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/android-java-meetingfeedback-rest-sample/master/android_app/app/src/main/res/drawable-mdpi/splashnexus6.png
--------------------------------------------------------------------------------
/android_app/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/android-java-meetingfeedback-rest-sample/master/android_app/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/readme-images/O365-Android-MeetingFeedback-video_play_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/android-java-meetingfeedback-rest-sample/master/readme-images/O365-Android-MeetingFeedback-video_play_icon.png
--------------------------------------------------------------------------------
/webservice/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 |
--------------------------------------------------------------------------------
/android_app/app/src/main/res/drawable-mdpi/material_design_icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/android-java-meetingfeedback-rest-sample/master/android_app/app/src/main/res/drawable-mdpi/material_design_icons.png
--------------------------------------------------------------------------------
/webservice/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | =begin
2 | Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | See LICENSE in the project root for license information.
4 | =end
5 | module ApplicationHelper
6 | end
7 |
--------------------------------------------------------------------------------
/webservice/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2 | #
3 | # To ban all spiders from the entire site uncomment the next two lines:
4 | # User-agent: *
5 | # Disallow: /
6 |
--------------------------------------------------------------------------------
/webservice/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure sensitive parameters which will be filtered from the log file.
4 | Rails.application.config.filter_parameters += [:password]
5 |
--------------------------------------------------------------------------------
/webservice/app/models/meeting.rb:
--------------------------------------------------------------------------------
1 | =begin
2 | Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | See LICENSE in the project root for license information.
4 | =end
5 | class Meeting < ActiveRecord::Base
6 | has_many :ratings
7 | end
8 |
--------------------------------------------------------------------------------
/webservice/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3 |
4 | require File.expand_path('../config/application', __FILE__)
5 |
6 | Rails.application.load_tasks
7 |
--------------------------------------------------------------------------------
/android_app/app/src/main/res/xml/network_security_config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 10.0.2.2
5 |
6 |
--------------------------------------------------------------------------------
/android_app/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon May 06 16:03:03 EAT 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
7 |
--------------------------------------------------------------------------------
/android_app/.gitignore:
--------------------------------------------------------------------------------
1 | *.ap_
2 | *.apk
3 | *.class
4 | *.dex
5 | *.iml
6 | *.ipr
7 | *.iws
8 | .DS_Store
9 | .classpath
10 | .gradle
11 | .idea
12 | .project
13 | /.idea/libraries
14 | /.idea/workspace.xml
15 | /build
16 | /captures
17 | /local.properties
18 | Thumbs.db
19 | bin/
20 | build/
21 | gen/
22 | out/
--------------------------------------------------------------------------------
/webservice/app/models/rating.rb:
--------------------------------------------------------------------------------
1 | =begin
2 | Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | See LICENSE in the project root for license information.
4 | =end
5 | class Rating < ActiveRecord::Base
6 | belongs_to :meeting
7 | validates :username, uniqueness: {scope: [:meeting_id]}
8 | end
9 |
--------------------------------------------------------------------------------
/webservice/app/views/meetings/mymeetings.json.jbuilder:
--------------------------------------------------------------------------------
1 | # Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
2 | # See LICENSE in the project root for license information.
3 |
4 | json.meeting_data @mymeetings do |meeting|
5 | json.event_id meeting[:event_id]
6 | json.num_ratings meeting[:num_ratings]
7 | end
8 |
--------------------------------------------------------------------------------
/webservice/db/migrate/20150323194915_add_event_id_to_rating.rb:
--------------------------------------------------------------------------------
1 | =begin
2 | Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | See LICENSE in the project root for license information.
4 | =end
5 | class AddEventIdToRating < ActiveRecord::Migration
6 | def change
7 | add_column :ratings, :event_id, :string
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/webservice/db/seeds.rb:
--------------------------------------------------------------------------------
1 | # This file should contain all the record creation needed to seed the database with its default values.
2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3 | #
4 | # Examples:
5 | #
6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7 | # Mayor.create(name: 'Emanuel', city: cities.first)
8 |
--------------------------------------------------------------------------------
/webservice/test/test_helper.rb:
--------------------------------------------------------------------------------
1 | ENV['RAILS_ENV'] ||= 'test'
2 | require File.expand_path('../../config/environment', __FILE__)
3 | require 'rails/test_help'
4 |
5 | class ActiveSupport::TestCase
6 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
7 | fixtures :all
8 |
9 | # Add more helper methods to be used by all tests here...
10 | end
11 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/PageSettable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback;
6 |
7 | public interface PageSettable {
8 | void onPageSet(int page);
9 | }
10 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/EventFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model;
6 |
7 | public enum EventFilter {
8 | MY_MEETINGS,
9 | RATE_MEETINGS
10 | }
11 |
--------------------------------------------------------------------------------
/android_app/app/src/main/res/values/plurals.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 | - Rating
8 | - Ratings
9 |
10 |
11 |
--------------------------------------------------------------------------------
/android_app/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 | - #ffffff
7 | - #363636
8 | #006E8D
9 |
10 |
--------------------------------------------------------------------------------
/webservice/app/views/layouts/application.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | MeetingData
5 | <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6 | <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7 | <%= csrf_meta_tags %>
8 |
9 |
10 |
11 | <%= yield %>
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/webservice/db/migrate/20150323140001_create_meetings.rb:
--------------------------------------------------------------------------------
1 | =begin
2 | Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | See LICENSE in the project root for license information.
4 | =end
5 | class CreateMeetings < ActiveRecord::Migration
6 | def change
7 | create_table :meetings do |t|
8 | t.string :event_id
9 | t.string :owner
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/webservice/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | =begin
2 | Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | See LICENSE in the project root for license information.
4 | =end
5 | class ApplicationController < ActionController::Base
6 | # Prevent CSRF attacks by raising an exception.
7 | # For APIs, you may want to use :null_session instead.
8 | # protect_from_forgery with: :exception
9 | end
10 |
--------------------------------------------------------------------------------
/webservice/config/routes.rb:
--------------------------------------------------------------------------------
1 | =begin
2 | Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | See LICENSE in the project root for license information.
4 | =end
5 | Rails.application.routes.draw do
6 |
7 | resources :meetings, :defaults => { :format => 'json' } do
8 | resource :rating
9 |
10 | end
11 |
12 | get 'mymeetings', controller: :meetings,
13 | action: :mymeetings
14 |
15 | end
16 |
--------------------------------------------------------------------------------
/webservice/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5 |
6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7 | # Rails.backtrace_cleaner.remove_silencers!
8 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/view/ShowRatingDialogEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.view;
6 |
7 | public class ShowRatingDialogEvent {
8 | public String mEventId;
9 |
10 | public ShowRatingDialogEvent(String eventId) {
11 | mEventId = eventId;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/webservice/README.md:
--------------------------------------------------------------------------------
1 | == RateMyMeetings WebService
2 |
3 | This app currently runs on Azure at ratemymeetings.cloudapp.net
4 |
5 | service directory:
6 | /home/josh/office365-android/webservice
7 |
8 | start:
9 |
10 | `bundle exec foreman start`
11 |
12 | stop:
13 |
14 | `kill $(ps aux | grep -E 'thin' | grep -v grep | awk '{print $2}')`
15 |
16 | check running:
17 |
18 | `netstat -tulpn`
19 |
20 | clear database:
21 |
22 | `rake db:drop`
23 |
24 | `rake db:create`
25 |
26 | `rake db:migrate`
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/outlook/payload/From.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.outlook.payload;
6 |
7 | import com.google.gson.annotations.SerializedName;
8 |
9 | public class From {
10 |
11 | @SerializedName("EmailAddress")
12 | public EmailAddress emailAddress;
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/outlook/payload/Sender.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.outlook.payload;
6 |
7 | import com.google.gson.annotations.SerializedName;
8 |
9 | public class Sender {
10 |
11 | @SerializedName("EmailAddress")
12 | public EmailAddress emailAddress;
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/webservice/db/migrate/20150323140011_create_ratings.rb:
--------------------------------------------------------------------------------
1 | =begin
2 | Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | See LICENSE in the project root for license information.
4 | =end
5 | class CreateRatings < ActiveRecord::Migration
6 | def change
7 | create_table :ratings do |t|
8 | t.decimal :value, required: true
9 | t.belongs_to :meeting
10 | t.text :comment
11 | t.string :username
12 | end
13 | add_index :ratings, :meeting_id
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/RatingActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback;
6 |
7 | import com.microsoft.office365.meetingfeedback.model.meeting.RatingData;
8 |
9 | public interface RatingActivity {
10 | void onSendRating(com.microsoft.graph.models.extensions.Event event, RatingData ratingData);
11 | }
12 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/outlook/payload/Attendee.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.outlook.payload;
6 |
7 | import com.google.gson.annotations.SerializedName;
8 |
9 | public class Attendee {
10 |
11 | @SerializedName("EmailAddress")
12 | public EmailAddress emailAddress;
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/outlook/payload/Organizer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.outlook.payload;
6 |
7 | import com.google.gson.annotations.SerializedName;
8 |
9 | public class Organizer {
10 |
11 | @SerializedName("emailAddress")
12 | public EmailAddress emailAddress;
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/outlook/payload/ToRecipient.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.outlook.payload;
6 |
7 | import com.google.gson.annotations.SerializedName;
8 |
9 | public class ToRecipient {
10 |
11 | @SerializedName("EmailAddress")
12 | public EmailAddress emailAddress;
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/webservice/app/views/meetings/create.json.jbuilder:
--------------------------------------------------------------------------------
1 | # Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
2 | # See LICENSE in the project root for license information.
3 |
4 | json.event_id @response.event_id
5 | json.owner @response.owner
6 | json.is_meeting_owner @response.meeting_owner?
7 | json.has_already_rated @response.has_already_rated?
8 | if @response.has_already_rated?
9 | json.your_rating @response.your_rating
10 | end
11 | json.avg_rating @response.avg_rating
12 | json.ratings @response.ratings
13 |
--------------------------------------------------------------------------------
/webservice/app/views/meetings/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | # Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
2 | # See LICENSE in the project root for license information.
3 |
4 | json.event_id @response.event_id
5 | json.owner @response.owner
6 | json.is_meeting_owner @response.meeting_owner?
7 | json.has_already_rated @response.has_already_rated?
8 | if @response.has_already_rated?
9 | json.your_rating @response.your_rating
10 | end
11 | json.avg_rating @response.avg_rating
12 | json.ratings @response.ratings
13 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/outlook/payload/Envelope.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.outlook.payload;
6 |
7 | import com.google.gson.annotations.SerializedName;
8 |
9 | import java.util.List;
10 |
11 | public class Envelope {
12 |
13 | @SerializedName("value")
14 | public List mValues;
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/webservice/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2 | #
3 | # If you find yourself ignoring temporary files generated by your text editor
4 | # or operating system, you probably want to add a global ignore instead:
5 | # git config --global core.excludesfile '~/.gitignore_global'
6 |
7 | # Ignore bundler config.
8 | /.bundle
9 |
10 | # Ignore the default SQLite database.
11 | /db/*.sqlite3
12 | /db/*.sqlite3-journal
13 |
14 | # Ignore all logfiles and tempfiles.
15 | /log/*
16 | !/log/.keep
17 | /tmp
18 |
--------------------------------------------------------------------------------
/webservice/config/initializers/assets.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Version of your assets, change this if you want to expire all your assets.
4 | Rails.application.config.assets.version = '1.0'
5 |
6 | # Add additional assets to the asset load path
7 | # Rails.application.config.assets.paths << Emoji.images_path
8 |
9 | # Precompile additional assets.
10 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
11 | # Rails.application.config.assets.precompile += %w( search.js )
12 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/outlook/payload/Date.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.outlook.payload;
6 |
7 | import com.google.gson.annotations.SerializedName;
8 |
9 | public class Date {
10 |
11 | @SerializedName("dateTime")
12 | public String mDateTime;
13 |
14 | @SerializedName("timeZone")
15 | public String mTimeZone;
16 | }
17 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/outlook/payload/Body.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.outlook.payload;
6 |
7 | import com.google.gson.annotations.SerializedName;
8 |
9 | public class Body {
10 |
11 | @SerializedName("ContentType")
12 | public String mContentType;
13 |
14 | @SerializedName("Content")
15 | public String mContent;
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/outlook/payload/EmailAddress.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.outlook.payload;
6 |
7 | import com.google.gson.annotations.SerializedName;
8 |
9 | public class EmailAddress {
10 |
11 | @SerializedName("name")
12 | public String mName;
13 |
14 | @SerializedName("address")
15 | public String mAddress;
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/android_app/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
9 | 64dp
10 |
11 |
--------------------------------------------------------------------------------
/webservice/app/views/meetings/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | # Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
2 | # See LICENSE in the project root for license information.
3 |
4 | json.array! @responses do |response|
5 | json.event_id response.event_id
6 | json.owner response.owner
7 | json.is_meeting_owner response.meeting_owner?
8 | json.has_already_rated response.has_already_rated?
9 | if response.has_already_rated?
10 | json.your_rating response.your_rating
11 | end
12 | json.avg_rating response.avg_rating
13 | json.ratings response.ratings
14 | end
15 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/outlook/payload/MessageWrapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.outlook.payload;
6 |
7 | import com.google.gson.annotations.SerializedName;
8 |
9 | public class MessageWrapper {
10 |
11 | @SerializedName("Message")
12 | public Message mMessage;
13 |
14 | public MessageWrapper(Message msg) {
15 | mMessage = msg;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/webservice/config/initializers/wrap_parameters.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # This file contains settings for ActionController::ParamsWrapper which
4 | # is enabled by default.
5 |
6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7 | ActiveSupport.on_load(:action_controller) do
8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9 | end
10 |
11 | # To enable root element in JSON for ActiveRecord objects.
12 | # ActiveSupport.on_load(:active_record) do
13 | # self.include_root_in_json = true
14 | # end
15 |
--------------------------------------------------------------------------------
/android_app/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
5 |
14 |
--------------------------------------------------------------------------------
/webservice/config/database.yml:
--------------------------------------------------------------------------------
1 | # SQLite version 3.x
2 | # gem install sqlite3
3 | #
4 | # Ensure the SQLite 3 gem is defined in your Gemfile
5 | # gem 'sqlite3'
6 | #
7 | default: &default
8 | adapter: sqlite3
9 | pool: 5
10 | timeout: 5000
11 |
12 | development:
13 | <<: *default
14 | database: db/development.sqlite3
15 |
16 | # Warning: The database defined as "test" will be erased and
17 | # re-generated from your development database when you run "rake".
18 | # Do not set this db to the same as development or production.
19 | test:
20 | <<: *default
21 | database: db/test.sqlite3
22 |
23 | production:
24 | <<: *default
25 | database: db/production.sqlite3
26 |
--------------------------------------------------------------------------------
/webservice/Gemfile:
--------------------------------------------------------------------------------
1 | =begin
2 | Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | See LICENSE in the project root for license information.
4 | =end
5 | source 'https://rubygems.org'
6 |
7 | ruby '2.0.0'
8 |
9 | gem 'tzinfo-data'
10 | gem 'foreman'
11 | gem 'thin'
12 | gem 'rails', '4.2.1.rc2'
13 | gem 'responders'
14 | gem 'sqlite3'
15 | gem 'sass-rails', '~> 5.0'
16 | gem 'uglifier', '>= 1.3.0'
17 | gem 'coffee-rails', '~> 4.1.0'
18 | gem 'jquery-rails'
19 | gem 'turbolinks'
20 | gem 'jbuilder', '~> 2.0'
21 | gem 'sdoc', '~> 0.4.0', group: :doc
22 |
23 | group :development, :test do
24 | gem 'pry'
25 | gem 'web-console', '~> 2.0'
26 | gem 'spring'
27 | end
28 |
--------------------------------------------------------------------------------
/webservice/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format. Inflections
4 | # are locale specific, and you may define rules for as many different
5 | # locales as you wish. All of these examples are active by default:
6 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
7 | # inflect.plural /^(ox)$/i, '\1en'
8 | # inflect.singular /^(ox)en/i, '\1'
9 | # inflect.irregular 'person', 'people'
10 | # inflect.uncountable %w( fish sheep )
11 | # end
12 |
13 | # These inflection rules are supported but not enabled by default:
14 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
15 | # inflect.acronym 'RESTful'
16 | # end
17 |
--------------------------------------------------------------------------------
/android_app/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/joshskeen/android-sdks/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/webservice/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | # Files in the config/locales directory are used for internationalization
2 | # and are automatically loaded by Rails. If you want to use locales other
3 | # than English, add the necessary files in this directory.
4 | #
5 | # To use the locales, use `I18n.t`:
6 | #
7 | # I18n.t 'hello'
8 | #
9 | # In views, this is aliased to just `t`:
10 | #
11 | # <%= t('hello') %>
12 | #
13 | # To use a different locale, set it with `I18n.locale`:
14 | #
15 | # I18n.locale = :es
16 | #
17 | # This would use the information in config/locales/es.yml.
18 | #
19 | # To learn more, please read the Rails Internationalization guide
20 | # available at http://guides.rubyonrails.org/i18n.html.
21 |
22 | en:
23 | hello: "Hello world"
24 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/SavedRatings.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model;
6 |
7 | import com.microsoft.office365.meetingfeedback.model.meeting.RatingData;
8 |
9 | import java.util.Map;
10 |
11 | public class SavedRatings {
12 |
13 | Map mSavedRatings;
14 |
15 | public SavedRatings(Map savedRatings) {
16 | mSavedRatings = savedRatings;
17 | }
18 |
19 | public Map getSavedRatings() {
20 | return mSavedRatings;
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/authentication/AuthenticationContextBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.authentication;
6 |
7 | import android.content.Context;
8 |
9 | import com.microsoft.identity.client.PublicClientApplication;
10 | import com.microsoft.office365.meetingfeedback.model.Constants;
11 |
12 | public class AuthenticationContextBuilder {
13 |
14 | public static PublicClientApplication newInstance(Context context) {
15 | return new PublicClientApplication(context, Constants.CLIENT_ID);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/webservice/app/assets/javascripts/application.js:
--------------------------------------------------------------------------------
1 | // This is a manifest file that'll be compiled into application.js, which will include all the files
2 | // listed below.
3 | //
4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5 | // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6 | //
7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8 | // compiled file.
9 | //
10 | // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11 | // about supported directives.
12 | //
13 | //= require jquery
14 | //= require jquery_ujs
15 | //= require turbolinks
16 | //= require_tree .
17 |
--------------------------------------------------------------------------------
/webservice/app/assets/stylesheets/application.css:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a manifest file that'll be compiled into application.css, which will include all the files
3 | * listed below.
4 | *
5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6 | * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7 | *
8 | * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9 | * compiled file so the styles you add here take precedence over styles defined in any styles
10 | * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11 | * file per style scope.
12 | *
13 | *= require_tree .
14 | *= require_self
15 | */
16 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/view/DialogConfig.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.view;
6 |
7 | import java.io.Serializable;
8 |
9 | public class DialogConfig implements Serializable {
10 |
11 | public String mTitle;
12 | public String mMessage;
13 | public DialogType mDialogType;
14 |
15 | public enum DialogType {
16 | ALERT,
17 | PROGRESS
18 | }
19 |
20 | public DialogConfig(String title, String message, DialogType dialogType) {
21 | mTitle = title;
22 | mMessage = message;
23 | mDialogType = dialogType;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/User.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model;
6 |
7 | import com.microsoft.identity.client.IAccount;
8 |
9 | public class User {
10 |
11 | private String mUserId;
12 | private String mUsername;
13 |
14 |
15 | public User(IAccount userInfo) {
16 | mUserId = userInfo.getAccountIdentifier().getIdentifier();
17 | mUsername = userInfo.getUsername();
18 | }
19 |
20 | public String getUserId() {
21 | return mUserId;
22 | }
23 |
24 | public String getUsername() {
25 | return mUsername;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/outlook/EmailInterface.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.outlook;
6 |
7 | import com.microsoft.office365.meetingfeedback.model.outlook.payload.MessageWrapper;
8 |
9 | import retrofit.Callback;
10 | import retrofit.http.Body;
11 | import retrofit.http.Header;
12 | import retrofit.http.POST;
13 |
14 | public interface EmailInterface {
15 | @POST("/me/microsoft.graph.sendmail")
16 | void sendMail(
17 | @Header("Content-type") String contentTypeHeader,
18 | @Body MessageWrapper mail,
19 | Callback callback);
20 | }
21 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/outlook/payload/Message.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.outlook.payload;
6 |
7 | import com.google.gson.annotations.SerializedName;
8 |
9 | /**
10 | * Mail Value Object for holding values in an email
11 | */
12 | public class Message {
13 |
14 | @SerializedName("Subject")
15 | public String mSubject;
16 |
17 | @SerializedName("Body")
18 | public Body mBody;
19 |
20 | @SerializedName("ToRecipients")
21 | public ToRecipient[] mToRecipients;
22 |
23 | @SerializedName("sender")
24 | public Sender mSender;
25 |
26 | @SerializedName("from")
27 | public From mFrom;
28 | }
29 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/MeetingFeedbackApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback;
6 |
7 | import android.app.Application;
8 |
9 | import com.microsoft.office365.meetingfeedback.inject.ApplicationModule;
10 |
11 | import dagger.ObjectGraph;
12 |
13 | public class MeetingFeedbackApplication extends Application {
14 |
15 | private ObjectGraph applicationGraph;
16 |
17 | @Override
18 | public void onCreate() {
19 | super.onCreate();
20 |
21 | applicationGraph = ObjectGraph.create(new ApplicationModule(this));
22 | }
23 |
24 | public ObjectGraph getApplicationGraph() {
25 | return applicationGraph;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/android_app/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/util/ConnectivityUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.util;
6 |
7 | import android.content.Context;
8 | import android.net.ConnectivityManager;
9 | import android.net.NetworkInfo;
10 |
11 | public class ConnectivityUtil {
12 |
13 | private final ConnectivityManager mConnectivityManager;
14 |
15 | public ConnectivityUtil(Context context) {
16 | mConnectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
17 | }
18 |
19 | public boolean hasNetworkConnection() {
20 | NetworkInfo activeNetworkInfo = mConnectivityManager.getActiveNetworkInfo();
21 | return activeNetworkInfo != null && activeNetworkInfo.isConnectedOrConnecting();
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/android_app/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | maven{
7 | url 'https://maven.google.com'
8 | }
9 | jcenter{ // add this repository
10 | url 'http://oss.jfrog.org/oss-snapshot-local'
11 | }
12 | }
13 | dependencies {
14 | classpath 'com.android.tools.build:gradle:3.4.0'
15 |
16 | // NOTE: Do not place your application dependencies here; they belong
17 | // in the individual module build.gradle files
18 | }
19 | }
20 |
21 | allprojects {
22 | repositories {
23 | maven{
24 | url 'https://maven.google.com'
25 | }
26 | jcenter{ // add this repository
27 | url 'http://oss.jfrog.org/oss-snapshot-local'
28 | }
29 | jcenter()
30 | mavenCentral()
31 | mavenLocal()
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/view/CalendarFragmentPagerAdapter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.view;
6 |
7 | import android.support.v4.app.FragmentManager;
8 | import android.support.v4.app.FragmentStatePagerAdapter;
9 |
10 | import com.microsoft.office365.meetingfeedback.util.CalendarUtil;
11 |
12 | public class CalendarFragmentPagerAdapter extends FragmentStatePagerAdapter {
13 |
14 | public CalendarFragmentPagerAdapter(FragmentManager fm) {
15 | super(fm);
16 | }
17 |
18 | @Override
19 | public CalendarPageFragment getItem(int position) {
20 | return CalendarPageFragment.newInstance(position);
21 | }
22 |
23 | @Override
24 | public int getCount() {
25 | return CalendarUtil.NUM_PAGES_IN_CALENDAR;
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/webservice/payload/CreateRatingRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.webservice.payload;
6 |
7 | import com.google.gson.annotations.SerializedName;
8 | import com.microsoft.office365.meetingfeedback.model.meeting.RatingData;
9 |
10 | public class CreateRatingRequest {
11 |
12 | @SerializedName("event_id")
13 | public final String mEventId;
14 |
15 | @SerializedName("owner")
16 | public final String mEventOwner;
17 |
18 | @SerializedName("rating")
19 | public final RatingData mRatingData;
20 |
21 | public CreateRatingRequest(String eventId, String eventOwner, RatingData ratingData) {
22 | mEventId = eventId;
23 | mEventOwner = eventOwner;
24 | mRatingData = ratingData;
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/android_app/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 | 16dp
8 | 16dp
9 |
10 |
11 | 8dp
12 | 16dp
13 | 24dp
14 |
15 |
16 | 4dp
17 | 12dp
18 | 16sp
19 | 14sp
20 | 18sp
21 |
22 |
23 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/outlook/payload/Event.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.outlook.payload;
6 |
7 | import com.google.gson.annotations.SerializedName;
8 |
9 | public class Event {
10 |
11 | @SerializedName("iCalUId")
12 | public String mICalUId;
13 |
14 | @SerializedName("subject")
15 | public String mSubject;
16 |
17 | @SerializedName("start")
18 | public Date mStart;
19 |
20 | @SerializedName("end")
21 | public Date mEnd;
22 |
23 | @SerializedName("organizer")
24 | public Organizer mOrganizer;
25 |
26 | @SerializedName("isOrganizer")
27 | public boolean mIsOrganizer;
28 |
29 | @SerializedName("attendees")
30 | public Attendee[] mAttendees;
31 |
32 | @SerializedName("bodyPreview")
33 | public String mBodyPreview;
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: android
2 | android:
3 | components:
4 | - tools
5 | - platform-tools
6 | - extra
7 | - android-28
8 | - build-tools-28.0.0
9 | script:
10 | - ./android_app/gradlew clean build -p android_app/app/
11 | notifications:
12 | slack:
13 | secure: baYp2E1zWyGfFMD/7yhrKi9XNy28ryL4dnTybNouOXcoEPy8f+XDD/AkavZ2BqPK+w1407OhgIzB0lkQqcKErUN9Vl1x6tixdmc42Wb4uZ7tle6u2EDuOud8Rl8rOeMQCXz03J8F2RtdkbUZJuPkp40jbpw3Og9RPqIs7wEQAEoeqtjquZD94xwwK7WG+2plZqFm6zUqpl4wWXjSSY0cnqDj0xQjG5A6d2OLNj7z4Kp/MODMavJtfhqUyNnCML21GLlUkE3D67A1n36Jc7bNuNTaoho0D2vxmJftW3RinLS6HW0HdR+vH9+acvuB4t4cc6NejYaJiVXS9HTfD//uexxCHTPUOSmL6KPC3xzIHU/BnPwona/jZLwYk3enPp0UyNKi+bzBKaaGgUl0pnnWYbou+uDxpQdDB1KIQDdWGk90ykwSklHqUHkvCrUiAnDUbR1OqksDiOfVTSySQMIMVHaUJSTmL5HjYrYCAtyUOY+gSVZ85WjLJjjZp3d3dh+3ZUvQZLUUFNe2E3FZ4BORpeYLD8sKPeH/RTmXYnvjnHhGpDsJAg/tk4dEWjNKkVRfMpy8UydJ/OGkajnOy01kedzI7MeAhPy/uQtTQ1sDxU5qwWWJOOQrVc/+/WLAIIyAwglfmasIK0q6OqYjve7QPhjXh2kYR4kHRO6NlU6WUNs=
14 | email:
15 | recipients:
16 | - jak@microsoft.com
17 | on_success: never
18 | on_failure: always
19 |
--------------------------------------------------------------------------------
/webservice/config/secrets.yml:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Your secret key is used for verifying the integrity of signed cookies.
4 | # If you change this key, all old signed cookies will become invalid!
5 |
6 | # Make sure the secret is at least 30 characters and all random,
7 | # no regular words or you'll be exposed to dictionary attacks.
8 | # You can use `rake secret` to generate a secure secret key.
9 |
10 | # Make sure the secrets in this file are kept private
11 | # if you're sharing your code publicly.
12 |
13 | development:
14 | secret_key_base: 4783bebe357be4f0f06743dcd07ff07dfcbb35f360fd7eb651d9fab01f695e4242e18732aed935bbef5047be2fffe798ed4b6d889106a918cae6d9f75cde3c64
15 |
16 | test:
17 | secret_key_base: f7c2d67eff6523a14ca8772ae5948701403a306d5bd1ece2607d99094fe6f5795c0fcbac7a1bf0a05ffefd31d6eda8630a548e324402166d11315221d5705aa0
18 |
19 | # Do not keep production secrets in the repository,
20 | # instead read values from the environment.
21 | production:
22 | secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
23 |
--------------------------------------------------------------------------------
/android_app/app/src/main/res/layout/activity_no_network_activity.xml:
--------------------------------------------------------------------------------
1 |
5 |
10 |
11 |
19 |
20 |
27 |
28 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/BaseFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback;
6 |
7 | import android.os.Bundle;
8 | import android.support.v4.app.Fragment;
9 |
10 | import com.microsoft.office365.meetingfeedback.inject.ActivityModule;
11 |
12 | import dagger.ObjectGraph;
13 |
14 | public abstract class BaseFragment extends Fragment {
15 |
16 | private ObjectGraph mActivityGraph;
17 |
18 | @Override
19 | public void onCreate(Bundle savedInstanceState) {
20 | super.onCreate(savedInstanceState);
21 | MeetingFeedbackApplication application = (MeetingFeedbackApplication) getActivity().getApplication();
22 | mActivityGraph = application.getApplicationGraph().plus(new ActivityModule(getBaseActivity()));
23 | mActivityGraph.inject(this);
24 | }
25 |
26 | public BaseActivity getBaseActivity() {
27 | return (BaseActivity) getActivity();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/meeting/EventGroup.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.meeting;
6 |
7 | import java.io.Serializable;
8 | import java.util.List;
9 |
10 | public class EventGroup implements Serializable {
11 |
12 | public int mPage;
13 | public DateRange mDateRange;
14 | public List mGroupedEventDecorators;
15 |
16 | public EventGroup(int page, DateRange dateRange, List groupedEventDecorators) {
17 | mPage = page;
18 | mDateRange = dateRange;
19 | mGroupedEventDecorators = groupedEventDecorators;
20 | }
21 |
22 | @Override
23 | public String toString() {
24 | return "EventsGroupedByDateRange{" +
25 | "mPage=" + mPage +
26 | ", mDateRange=" + mDateRange +
27 | ", mGroupedEventDecorators=" + mGroupedEventDecorators +
28 | '}';
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/BaseDialogFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback;
6 |
7 | import android.os.Bundle;
8 | import android.support.v4.app.DialogFragment;
9 |
10 | import com.microsoft.office365.meetingfeedback.inject.ActivityModule;
11 |
12 | import dagger.ObjectGraph;
13 |
14 | public abstract class BaseDialogFragment extends DialogFragment {
15 |
16 | private ObjectGraph mActivityGraph;
17 |
18 | @Override
19 | public void onCreate(Bundle savedInstanceState) {
20 | super.onCreate(savedInstanceState);
21 | MeetingFeedbackApplication application = (MeetingFeedbackApplication) getActivity().getApplication();
22 | mActivityGraph = application.getApplicationGraph().plus(new ActivityModule(getBaseActivity()));
23 | mActivityGraph.inject(this);
24 | }
25 |
26 | public BaseActivity getBaseActivity() {
27 | return (BaseActivity) getActivity();
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/service/MyMeetingsResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.service;
6 |
7 | import com.google.gson.annotations.SerializedName;
8 |
9 | import java.util.HashMap;
10 | import java.util.List;
11 | import java.util.Map;
12 |
13 | public class MyMeetingsResponse {
14 |
15 | @SerializedName("meeting_data")
16 | public List mMyMeetingDatas;
17 |
18 | private class MyMeetingData {
19 | @SerializedName("event_id")
20 | public String mEventId;
21 |
22 | @SerializedName("num_ratings")
23 | public Double mNumRatings;
24 | }
25 |
26 | public Map toMap() {
27 | Map map = new HashMap<>();
28 | for (MyMeetingData myMeetingData : mMyMeetingDatas) {
29 | map.put(myMeetingData.mEventId, myMeetingData.mNumRatings);
30 | }
31 | return map;
32 | }
33 |
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/webservice/lib/response.rb:
--------------------------------------------------------------------------------
1 | =begin
2 | Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | See LICENSE in the project root for license information.
4 | =end
5 | class Response
6 |
7 | attr_reader :event_id, :username, :ratings, :avg_rating, :owner
8 |
9 | def initialize(args={})
10 | @meeting = args.fetch(:meeting)
11 | @user_param = args.fetch(:username)
12 | end
13 |
14 | def meeting_owner?
15 | @user_param == owner
16 | end
17 |
18 | def has_already_rated?
19 | your_rating_data.present?
20 | end
21 |
22 | def your_rating
23 | return 0.0 if your_rating_data.nil?
24 | your_rating_data.value
25 | end
26 |
27 | def owner
28 | @meeting.owner
29 | end
30 |
31 | def ratings
32 | @meeting.ratings
33 | end
34 |
35 | def event_id
36 | @meeting.event_id
37 | end
38 |
39 | def avg_rating
40 | return 0.0 if ratings.empty?
41 | ratings.map{ |x| x.value }.inject{|sum, el| sum + el}.to_f / ratings.size
42 | end
43 |
44 | private
45 |
46 | def your_rating_data
47 | ratings.where('username = ?', @user_param).first
48 | end
49 |
50 | end
51 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/Constants.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model;
6 |
7 | public interface Constants {
8 | String AUTHORITY_URL = "https://login.microsoftonline.com/common";
9 | //Replace with your specific identifiers
10 | String CLIENT_ID = "";
11 | String SERVICE_ENDPOINT = ""; //The Ruby On Rails app in the webservice folder. format as http://10.0.2.2:3000
12 | String REVIEW_SENDER_ADDRESS = "";
13 | String[] Scopes = {"openid",
14 | "https://graph.microsoft.com/Calendars.ReadWrite",
15 | "https://graph.microsoft.com/Mail.ReadWrite",
16 | "https://graph.microsoft.com/Mail.Send",
17 | "https://graph.microsoft.com/User.Read"};
18 | String MICROSOFT_GRAPH_ENDPOINT = "https://graph.microsoft.com/v1.0/";
19 | String MICROSOFT_GRAPH_RESOURCE_ID = "https://graph.microsoft.com";
20 | }
21 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Microsoft. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/outlook/CalendarInterface.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.outlook;
6 |
7 | import com.microsoft.office365.meetingfeedback.model.outlook.payload.Envelope;
8 | import com.microsoft.office365.meetingfeedback.model.outlook.payload.Event;
9 |
10 | import retrofit.Callback;
11 | import retrofit.http.GET;
12 | import retrofit.http.Header;
13 | import retrofit.http.Query;
14 |
15 | public interface CalendarInterface {
16 | @GET("/me/calendarview")
17 | void getEvents(
18 | @Header("Content-type") String contentTypeHeader,
19 | @Header("Prefer") String preferHeader,
20 | @Query("startdatetime") String startDateTime,
21 | @Query("enddatetime") String endDateTime,
22 | @Query("$select") String select,
23 | @Query("$orderby") String orderBy,
24 | @Query("$top") String top,
25 | Callback> callback
26 | );
27 | }
28 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/NoNetworkActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback;
6 |
7 | import android.content.Intent;
8 | import android.os.Bundle;
9 | import android.support.v7.app.AppCompatActivity;
10 | import android.view.View;
11 | import android.widget.Button;
12 |
13 | public class NoNetworkActivity extends AppCompatActivity {
14 |
15 | private Button mTryAgainButton;
16 |
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 |
21 | setContentView(R.layout.activity_no_network_activity);
22 | mTryAgainButton = (Button) findViewById(R.id.try_again_button);
23 | mTryAgainButton.setOnClickListener(new View.OnClickListener() {
24 | @Override
25 | public void onClick(View v) {
26 | finish();
27 | startActivity(new Intent(NoNetworkActivity.this, ConnectActivity.class));
28 | }
29 | });
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/webservice/config/application.rb:
--------------------------------------------------------------------------------
1 | require File.expand_path('../boot', __FILE__)
2 |
3 | require 'rails/all'
4 |
5 | # Require the gems listed in Gemfile, including any gems
6 | # you've limited to :test, :development, or :production.
7 | Bundler.require(*Rails.groups)
8 |
9 | module MeetingData
10 | class Application < Rails::Application
11 | # Settings in config/environments/* take precedence over those specified here.
12 | # Application configuration should go into files in config/initializers
13 | # -- all .rb files in that directory are automatically loaded.
14 |
15 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
16 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
17 | # config.time_zone = 'Central Time (US & Canada)'
18 |
19 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
20 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
21 | # config.i18n.default_locale = :de
22 |
23 | # Do not swallow errors in after_commit/after_rollback callbacks.
24 | config.autoload_paths << Rails.root.join('lib')
25 | config.active_record.raise_in_transactional_callbacks = true
26 | end
27 | end
28 |
--------------------------------------------------------------------------------
/webservice/db/schema.rb:
--------------------------------------------------------------------------------
1 | # encoding: UTF-8
2 | # This file is auto-generated from the current state of the database. Instead
3 | # of editing this file, please use the migrations feature of Active Record to
4 | # incrementally modify your database, and then regenerate this schema definition.
5 | #
6 | # Note that this schema.rb definition is the authoritative source for your
7 | # database schema. If you need to create the application database on another
8 | # system, you should be using db:schema:load, not running all the migrations
9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10 | # you'll amass, the slower it'll run and the greater likelihood for issues).
11 | #
12 | # It's strongly recommended that you check this file into your version control system.
13 |
14 | ActiveRecord::Schema.define(version: 20150323194915) do
15 |
16 | create_table "meetings", force: :cascade do |t|
17 | t.string "event_id"
18 | t.string "owner"
19 | end
20 |
21 | create_table "ratings", force: :cascade do |t|
22 | t.decimal "value"
23 | t.integer "meeting_id"
24 | t.text "comment"
25 | t.string "username"
26 | t.string "event_id"
27 | end
28 |
29 | add_index "ratings", ["meeting_id"], name: "index_ratings_on_meeting_id"
30 |
31 | end
32 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/webservice/payload/MeetingServiceResponseData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.webservice.payload;
6 |
7 | import com.google.gson.annotations.SerializedName;
8 | import com.microsoft.office365.meetingfeedback.model.meeting.RatingData;
9 |
10 | import java.io.Serializable;
11 | import java.util.List;
12 |
13 | public class MeetingServiceResponseData implements Serializable {
14 |
15 | @SerializedName("event_id")
16 | public String mEventId;
17 |
18 | @SerializedName("owner")
19 | public String mOwner;
20 |
21 | @SerializedName("avg_rating")
22 | public Float mAverageRating;
23 |
24 | @SerializedName("has_already_rated")
25 | public boolean mHasAlreadyRated;
26 |
27 | @SerializedName("your_rating")
28 | public float mYourRating;
29 |
30 | @SerializedName("is_meeting_owner")
31 | public boolean mIsMeetingOwner;
32 |
33 | @SerializedName("ratings")
34 | public List mRatings;
35 |
36 | public boolean hasRatings() {
37 | return mRatings != null && mRatings.size() > 0;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/android_app/app/src/main/res/layout/activity_calendar.xml:
--------------------------------------------------------------------------------
1 |
5 |
9 |
10 |
14 |
15 |
21 |
22 |
23 |
24 |
28 |
29 |
30 |
31 |
35 |
36 |
--------------------------------------------------------------------------------
/android_app/app/src/main/res/layout/fragment_calendar_page.xml:
--------------------------------------------------------------------------------
1 |
5 |
9 |
10 |
15 |
16 |
21 |
22 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/meeting/DateRange.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.meeting;
6 |
7 | import com.microsoft.graph.models.extensions.Event;
8 | import com.microsoft.office365.meetingfeedback.util.FormatUtil;
9 |
10 | import java.io.Serializable;
11 | import java.util.Calendar;
12 | import java.util.Date;
13 |
14 | public class DateRange implements Serializable {
15 | public Calendar mStart;
16 | public Calendar mEnd;
17 |
18 | public DateRange(Calendar start, Calendar end) {
19 | mStart = start;
20 | mEnd = end;
21 | }
22 |
23 | public boolean isWithinRange(Event event) {
24 | Date dateToCompare = FormatUtil.convertStringToDate(event.start.dateTime);
25 | Date start = mStart.getTime();
26 | Date end = mEnd.getTime();
27 | return !(dateToCompare.after(end) || dateToCompare.before(start));
28 | }
29 |
30 | public String getRangeAsFormattedString() {
31 | String start = FormatUtil.formatDate(mStart.getTime());
32 | String end = FormatUtil.formatDate(mEnd.getTime());
33 | return String.format("%s - %s", end, start);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/webservice/app/controllers/meetings_controller.rb:
--------------------------------------------------------------------------------
1 | =begin
2 | Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | See LICENSE in the project root for license information.
4 | =end
5 | class MeetingsController < ApplicationController
6 |
7 | respond_to :json
8 |
9 | def index
10 | @responses = Meeting.all.includes(:ratings).map{|x|
11 | Response.new(meeting: x, username: params[:username])
12 | }
13 | end
14 |
15 | def create
16 | @meeting = find_or_create_meeting(params[:event_id])
17 | @meeting.ratings << Rating.create(rating_params)
18 | @meeting.reload
19 | @response = Response.new(meeting: @meeting,
20 | username: params[:username])
21 | end
22 |
23 | def mymeetings
24 | meetings = Meeting.where(owner: params[:username]).includes(:ratings)
25 | @mymeetings = meetings.map{ |x| {event_id: x.event_id, num_ratings: x.ratings.count}}
26 | end
27 |
28 | def show
29 | meeting = find_or_create_meeting(params[:id])
30 | @response = Response.new(meeting: meeting, username: params[:username])
31 | end
32 |
33 | private
34 |
35 | def rating_params
36 | params.require(:rating).permit(:value, :comment, :username, :event_id)
37 | end
38 |
39 | def find_or_create_meeting(id)
40 | meeting = Meeting.where(event_id: id).first
41 | return meeting if meeting.present?
42 | Meeting.create(event_id: id, owner: params[:owner])
43 | end
44 |
45 | end
46 |
--------------------------------------------------------------------------------
/android_app/app/src/main/res/layout/fragment_calendar_range_display.xml:
--------------------------------------------------------------------------------
1 |
5 |
11 |
12 |
19 |
20 |
27 |
28 |
35 |
36 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/webservice/RatingServiceInterface.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.webservice;
6 |
7 | import com.microsoft.office365.meetingfeedback.model.service.MyMeetingsResponse;
8 | import com.microsoft.office365.meetingfeedback.model.webservice.payload.CreateRatingRequest;
9 | import com.microsoft.office365.meetingfeedback.model.webservice.payload.MeetingServiceResponseData;
10 |
11 | import java.util.List;
12 |
13 | import retrofit.Callback;
14 | import retrofit.http.Body;
15 | import retrofit.http.GET;
16 | import retrofit.http.POST;
17 | import retrofit.http.Path;
18 | import retrofit.http.Query;
19 |
20 | public interface RatingServiceInterface {
21 |
22 | @GET("/meetings")
23 | void getMeetingsAsync(@Query("username") String username, Callback> callback);
24 |
25 | @POST("/meetings")
26 | void postRatingAsync(@Query("username") String username, @Query("owner") String owner, @Body CreateRatingRequest requestData, Callback callback);
27 |
28 | @GET("/meetings/{id}")
29 | void getMeetingAsync(@Path("id") String eventId, @Query("username") String username, @Query("owner") String owner, Callback callback);
30 |
31 | @GET("/mymeetings")
32 | void getMyMeetingsAsync(@Query("username") String username, Callback callback);
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/webservice/public/500.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | We're sorry, but something went wrong (500)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
We're sorry, but something went wrong.
62 |
63 |
If you are the application owner check the logs for more information.
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/service/RatingServiceAlarmManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.service;
6 |
7 | import android.app.AlarmManager;
8 | import android.app.PendingIntent;
9 | import android.content.Context;
10 | import android.content.Intent;
11 |
12 | public class RatingServiceAlarmManager {
13 |
14 | public static final int TEN_SECONDS_IN_MILLIS = 10000;
15 | private final AlarmManager mAlarmManager;
16 | private Context mContext;
17 |
18 | public RatingServiceAlarmManager(Context context) {
19 | mContext = context;
20 | mAlarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE);
21 | }
22 |
23 | public void scheduleRatingService() {
24 | Intent meetingsServiceIntent = new Intent(mContext, MyMeetingsService.class);
25 | final PendingIntent pIntent = PendingIntent.getService(mContext, MyMeetingsService.MEETING_REQUEST_CODE, meetingsServiceIntent, PendingIntent.FLAG_UPDATE_CURRENT);
26 | long firstMillis = System.currentTimeMillis();
27 | int intervalMillis = TEN_SECONDS_IN_MILLIS;
28 | mAlarmManager.setInexactRepeating(AlarmManager.RTC_WAKEUP, firstMillis, intervalMillis, pIntent);
29 | }
30 |
31 | public void cancelRatingService() {
32 | Intent intent = new Intent(mContext, MyMeetingsService.class);
33 | final PendingIntent pIntent = PendingIntent.getBroadcast(mContext, MyMeetingsService.MEETING_REQUEST_CODE, intent, PendingIntent.FLAG_UPDATE_CURRENT);
34 | mAlarmManager.cancel(pIntent);
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/webservice/config/environments/development.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # In the development environment your application's code is reloaded on
5 | # every request. This slows down response time but is perfect for development
6 | # since you don't have to restart the web server when you make code changes.
7 | config.cache_classes = false
8 |
9 | # Do not eager load code on boot.
10 | config.eager_load = false
11 |
12 | # Show full error reports and disable caching.
13 | config.consider_all_requests_local = true
14 | config.action_controller.perform_caching = false
15 |
16 | # Don't care if the mailer can't send.
17 | config.action_mailer.raise_delivery_errors = false
18 |
19 | # Print deprecation notices to the Rails logger.
20 | config.active_support.deprecation = :log
21 |
22 | # Raise an error on page load if there are pending migrations.
23 | config.active_record.migration_error = :page_load
24 |
25 | # Debug mode disables concatenation and preprocessing of assets.
26 | # This option may cause significant delays in view rendering with a large
27 | # number of complex assets.
28 | config.assets.debug = true
29 |
30 | # Asset digests allow you to set far-future HTTP expiration dates on all assets,
31 | # yet still be able to expire them through the digest params.
32 | config.assets.digest = true
33 |
34 | # Adds additional error checking when serving assets at runtime.
35 | # Checks for improperly declared sprockets dependencies.
36 | # Raises helpful error messages.
37 | config.assets.raise_runtime_errors = true
38 |
39 | # Raises error for missing translations
40 | # config.action_view.raise_on_missing_translations = true
41 | end
42 |
--------------------------------------------------------------------------------
/webservice/public/422.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The change you wanted was rejected (422)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
The change you wanted was rejected.
62 |
Maybe you tried to change something you didn't have access to.
63 |
64 |
If you are the application owner check the logs for more information.
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/android_app/app/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | apply plugin: 'com.android.application'
6 |
7 | android {
8 | compileSdkVersion 28
9 |
10 | defaultConfig {
11 | applicationId "com.microsoft.office365.meetingfeedback"
12 | minSdkVersion 24
13 | targetSdkVersion 28
14 | versionCode 1
15 | versionName "1.0"
16 | }
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 | packagingOptions {
24 | exclude 'META-INF/LICENSE.txt'
25 | exclude 'META-INF/NOTICE.txt'
26 | exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
27 | exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
28 | exclude 'META-INF/jersey-module-version'
29 | }
30 | configurations {
31 | all {
32 | resolutionStrategy.force 'com.android.support:support-annotations:25.3.1'
33 | }
34 | }
35 | productFlavors {
36 | }
37 | }
38 |
39 | dependencies {
40 | implementation fileTree(dir: 'libs', include: ['*.jar'])
41 | implementation 'com.android.support:appcompat-v7:28.0.0'
42 | implementation 'com.android.support:recyclerview-v7:28.0.0'
43 |
44 | // Dependency injection
45 | implementation 'com.squareup.dagger:dagger:1.2.2'
46 | compileOnly 'com.squareup.dagger:dagger-compiler:1.2.2'
47 | // REST interface
48 | implementation 'com.squareup.retrofit:retrofit:1.9.0'
49 | annotationProcessor 'com.squareup.dagger:dagger-compiler:1.2.2'
50 |
51 | implementation 'com.microsoft.graph:microsoft-graph-android-auth:0.1.0-SNAPSHOT'
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/webservice/public/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The page you were looking for doesn't exist (404)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
The page you were looking for doesn't exist.
62 |
You may have mistyped the address or the page may have moved.
63 |
64 |
If you are the application owner check the logs for more information.
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/android_app/app/src/main/res/layout/rating_view.xml:
--------------------------------------------------------------------------------
1 |
5 |
11 |
12 |
19 |
20 |
30 |
31 |
38 |
39 |
40 |
41 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/webservice/config/environments/test.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # The test environment is used exclusively to run your application's
5 | # test suite. You never need to work with it otherwise. Remember that
6 | # your test database is "scratch space" for the test suite and is wiped
7 | # and recreated between test runs. Don't rely on the data there!
8 | config.cache_classes = true
9 |
10 | # Do not eager load code on boot. This avoids loading your whole application
11 | # just for the purpose of running a single test. If you are using a tool that
12 | # preloads Rails for running tests, you may have to set it to true.
13 | config.eager_load = false
14 |
15 | # Configure static file server for tests with Cache-Control for performance.
16 | config.serve_static_files = true
17 | config.static_cache_control = 'public, max-age=3600'
18 |
19 | # Show full error reports and disable caching.
20 | config.consider_all_requests_local = true
21 | config.action_controller.perform_caching = false
22 |
23 | # Raise exceptions instead of rendering exception templates.
24 | config.action_dispatch.show_exceptions = false
25 |
26 | # Disable request forgery protection in test environment.
27 | config.action_controller.allow_forgery_protection = false
28 |
29 | # Tell Action Mailer not to deliver emails to the real world.
30 | # The :test delivery method accumulates sent emails in the
31 | # ActionMailer::Base.deliveries array.
32 | config.action_mailer.delivery_method = :test
33 |
34 | # Randomize the order test cases are executed.
35 | config.active_support.test_order = :random
36 |
37 | # Print deprecation notices to the stderr.
38 | config.active_support.deprecation = :stderr
39 |
40 | # Raises error for missing translations
41 | # config.action_view.raise_on_missing_translations = true
42 | end
43 |
--------------------------------------------------------------------------------
/android_app/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
19 |
20 |
23 |
24 |
28 |
29 |
34 |
35 |
40 |
41 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/meeting/RatingData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.meeting;
6 |
7 | import android.text.TextUtils;
8 |
9 | import com.google.gson.annotations.SerializedName;
10 |
11 | import java.io.Serializable;
12 |
13 | public class RatingData implements Serializable {
14 |
15 | @SerializedName("event_id")
16 | public String mEventId;
17 | @SerializedName("value")
18 | public float mRating;
19 | @SerializedName("comment")
20 | public String mReview;
21 | @SerializedName("username")
22 | public String mUsername;
23 |
24 | public RatingData(String eventId, float rating, String review, String username) {
25 | mEventId = eventId;
26 | mRating = rating;
27 | mReview = review;
28 | mUsername = username;
29 | }
30 |
31 | public String getCommentString() {
32 | return TextUtils.isEmpty(mReview) ? "No Comment" : mReview;
33 | }
34 |
35 | @Override
36 | public String toString() {
37 | return "RatingData{" +
38 | "mEventId='" + mEventId + '\'' +
39 | ", mRating=" + mRating +
40 | ", mReview='" + mReview + '\'' +
41 | ", mUsername='" + mUsername + '\'' +
42 | '}';
43 | }
44 |
45 |
46 | @Override
47 | public boolean equals(Object o) {
48 | if (this == o) return true;
49 | if (o == null || getClass() != o.getClass()) return false;
50 |
51 | RatingData that = (RatingData) o;
52 |
53 | if (Float.compare(that.mRating, mRating) != 0) return false;
54 | if (!mEventId.equals(that.mEventId)) return false;
55 | if (!mReview.equals(that.mReview)) return false;
56 | return mUsername.equals(that.mUsername);
57 |
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/util/SharedPrefsUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.util;
6 |
7 | import android.content.Context;
8 | import android.content.SharedPreferences;
9 | import android.preference.PreferenceManager;
10 |
11 | import com.google.gson.Gson;
12 |
13 | import java.util.HashMap;
14 | import java.util.Map;
15 |
16 | public class SharedPrefsUtil {
17 |
18 | private static final String SERIALIZED_MEETINGS = "SERIALIZED_MEETINGS";
19 | private static final String SERIALIZED_USERNAME = "SERIALIZED_USERNAME";
20 | private static final String SERIALIZED_USERID = "SERIALIZED_USERID";
21 | private final SharedPreferences mSharedPrefs;
22 | private Context mContext;
23 |
24 | public SharedPrefsUtil(Context context) {
25 | mContext = context;
26 | mSharedPrefs = PreferenceManager.getDefaultSharedPreferences(mContext);
27 | }
28 |
29 |
30 | public String getSavedUsername() {
31 | return mSharedPrefs.getString(SERIALIZED_USERNAME, "");
32 | }
33 |
34 | public void setSavedUserId(String userId) {
35 | mSharedPrefs.edit().putString(SERIALIZED_USERID, userId).apply();
36 | }
37 |
38 | public String getSavedUserId() {
39 | return mSharedPrefs.getString(SERIALIZED_USERID, "");
40 | }
41 |
42 | public Map getSavedMeetingResults() {
43 | String string = mSharedPrefs.getString(SERIALIZED_MEETINGS, "");
44 | Map map = new HashMap<>();
45 | return new Gson().fromJson(string, map.getClass());
46 | }
47 |
48 | public void setSavedMeetingResults(Map meetingResults) {
49 | String meetingResultsAsString = new Gson().toJson(meetingResults);
50 | mSharedPrefs.edit().putString(SERIALIZED_MEETINGS, meetingResultsAsString).apply();
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/android_app/app/src/main/res/layout/activity_connect.xml:
--------------------------------------------------------------------------------
1 |
5 |
16 |
17 |
24 |
25 |
32 |
33 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/util/FormatUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.util;
6 |
7 | import java.text.ParseException;
8 | import java.text.SimpleDateFormat;
9 | import java.util.Date;
10 | import java.util.Locale;
11 |
12 | public class FormatUtil {
13 | private static final String RAW_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSSSSS";
14 |
15 | public static String displayFormattedEventDate(com.microsoft.graph.models.extensions.Event event) {
16 | return formatDate(convertStringToDate(event.start.dateTime));
17 | }
18 |
19 | public static String formatDate(Date eventDate) {
20 | return new SimpleDateFormat("MMMM dd", Locale.getDefault()).format(eventDate);
21 | }
22 | public static String formatDateCompact(Date eventDate) {
23 | return new SimpleDateFormat("MMM dd", Locale.getDefault()).format(eventDate);
24 | }
25 |
26 | public static String displayFormattedEventTime(com.microsoft.graph.models.extensions.Event event) {
27 | Date eventDate = convertStringToDate(event.start.dateTime);
28 | Date eventDateEnd = convertStringToDate(event.end.dateTime);
29 | String formattedStartTime = new SimpleDateFormat("HH:mm", Locale.US).format(eventDate);
30 | String formattedEndTime = new SimpleDateFormat("HH:mm", Locale.US).format(eventDateEnd);
31 | return String.format("%s - %s", formattedStartTime, formattedEndTime);
32 | }
33 |
34 | public static Date convertStringToDate(String date) {
35 | SimpleDateFormat format = new SimpleDateFormat(RAW_DATE_FORMAT, Locale.getDefault());
36 | try {
37 | return format.parse(date);
38 | } catch(ParseException pe) {
39 | throw new IllegalArgumentException(pe);
40 | }
41 | }
42 |
43 | public static String convertDateToUrlString(Date date) {
44 | SimpleDateFormat simpleDateFormat = new SimpleDateFormat(RAW_DATE_FORMAT, Locale.getDefault());
45 | return simpleDateFormat.format(date);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/inject/ApplicationModule.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.inject;
6 |
7 | import com.microsoft.office365.meetingfeedback.MeetingFeedbackApplication;
8 | import com.microsoft.office365.meetingfeedback.model.DataStore;
9 | import com.microsoft.office365.meetingfeedback.model.service.MyMeetingsService;
10 | import com.microsoft.office365.meetingfeedback.model.service.RatingServiceAlarmManager;
11 | import com.microsoft.office365.meetingfeedback.model.webservice.RatingService;
12 | import com.microsoft.office365.meetingfeedback.model.webservice.RatingServiceManager;
13 | import com.microsoft.office365.meetingfeedback.util.ConnectivityUtil;
14 | import com.microsoft.office365.meetingfeedback.util.SharedPrefsUtil;
15 |
16 | import javax.inject.Singleton;
17 |
18 | import dagger.Module;
19 | import dagger.Provides;
20 |
21 | @Module(library = true, injects = {MyMeetingsService.class})
22 | public class ApplicationModule {
23 |
24 | private final MeetingFeedbackApplication mApplication;
25 |
26 | public ApplicationModule(MeetingFeedbackApplication application) {
27 | this.mApplication = application;
28 | }
29 |
30 | @Provides
31 | @Singleton
32 | public RatingServiceManager providesRatingServiceManager(DataStore dataStore) {
33 | return new RatingServiceManager(new RatingService(), dataStore);
34 | }
35 |
36 | @Provides
37 | public SharedPrefsUtil providesSharedPrefsUtil() {
38 | return new SharedPrefsUtil(mApplication);
39 | }
40 |
41 | @Provides
42 | @Singleton
43 | public DataStore providesDataStore(SharedPrefsUtil sharedPrefsUtil) {
44 | return new DataStore(sharedPrefsUtil);
45 | }
46 |
47 | @Provides
48 | public ConnectivityUtil providesConnectivityUtil() {
49 | return new ConnectivityUtil(mApplication);
50 | }
51 |
52 | @Provides
53 | public RatingServiceAlarmManager providesRatingServiceAlarmManager() {
54 | return new RatingServiceAlarmManager(mApplication);
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/util/CalendarUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.util;
6 |
7 | import com.microsoft.office365.meetingfeedback.model.DataStore;
8 | import com.microsoft.office365.meetingfeedback.model.meeting.DateRange;
9 | import com.microsoft.office365.meetingfeedback.model.meeting.EventDecorator;
10 | import com.microsoft.office365.meetingfeedback.model.meeting.EventGroup;
11 |
12 | import java.util.ArrayList;
13 | import java.util.Calendar;
14 | import java.util.List;
15 |
16 | public class CalendarUtil {
17 |
18 | public static final int NUM_PAGES_IN_CALENDAR = 4;
19 | public static final int DAYS_PER_PAGE = 7;
20 |
21 | private static DateRange buildDateRangeForPage(int page) {
22 | int endOffset = page * DAYS_PER_PAGE;
23 | int startOffset = (page + 1) * DAYS_PER_PAGE;
24 | Calendar end = Calendar.getInstance();
25 | end.add(Calendar.DAY_OF_MONTH, -endOffset);
26 | Calendar start = Calendar.getInstance();
27 | start.add(Calendar.DAY_OF_MONTH, -startOffset);
28 | return new DateRange(start, end);
29 | }
30 |
31 | public static List eventsAsEventDecorators(DataStore dataStore) {
32 | List eventsGroupedByDateRanges = new ArrayList<>();
33 | List events = dataStore.getFilteredEvents();
34 | for (int i = 0; i < NUM_PAGES_IN_CALENDAR; i++) {
35 | DateRange dateRange = buildDateRangeForPage(i);
36 | List eventDecorators = new ArrayList<>();
37 | for (com.microsoft.graph.models.extensions.Event event : events) {
38 | if (dateRange.isWithinRange(event)) {
39 | eventDecorators.add(new EventDecorator(event, dataStore.getWebServiceRatingDataForEvent(event.iCalUId)));
40 | }
41 | }
42 | eventsGroupedByDateRanges.add(new EventGroup(i, dateRange, eventDecorators));
43 | }
44 | return eventsGroupedByDateRanges;
45 | }
46 |
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/NOTICES.md:
--------------------------------------------------------------------------------
1 | This project includes the following third-party components:
2 |
3 | MS Open Tech Office 365 SDK for Android, which is Copyright (c) Microsoft Open Technologies, Inc. and is available under the [Apache License, Version 2.0](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.
4 |
5 | Android SDK, which is provided by the Android Open Source Project and is used according to terms described in the [Creative Commons 2.5 Attribution License](http://creativecommons.org/licenses/by/2.5/). The Android SDK is available at [http://developer.android.com/sdk/index.html](http://developer.android.com/sdk/index.html).
6 |
7 | Dagger, which is Copyright (c) Square, Inc. and is available under the [Apache License, Version 2.0](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.
8 |
9 | Retrofit, which is Copyright (c) Square, Inc. and is available under the [Apache License, Version 2.0](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.
10 |
11 | EventBus for Android, which is Copyright (c) Markus Junginger, greenrobot [http://greenrobot.de](http://greenrobot.de) and is available under the [Apache License, Version 2.0](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.
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/util/DialogUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.util;
6 |
7 | import android.support.v4.app.DialogFragment;
8 | import android.support.v4.app.Fragment;
9 | import android.util.Log;
10 |
11 | import com.microsoft.office365.meetingfeedback.BaseActivity;
12 | import com.microsoft.office365.meetingfeedback.view.DialogConfig.DialogType;
13 | import com.microsoft.office365.meetingfeedback.view.RateMyMeetingsDialogFragment;
14 |
15 | public class DialogUtil {
16 |
17 | public static final String TAG_DIALOG = "TAG_DIALOG";
18 | private static final String TAG = "DialogUtil";
19 |
20 | public void showProgressDialog(BaseActivity activity, int titleResId, int messageResId) {
21 | String title = null;
22 | if (titleResId > 0) {
23 | title = activity.getString(titleResId);
24 | }
25 | String message = null;
26 | if (messageResId > 0) {
27 | message = activity.getString(messageResId);
28 | }
29 | showProgressDialog(activity, title, message);
30 | }
31 |
32 | public void showProgressDialog(BaseActivity activity, String title, String message) {
33 | Log.d(TAG, "displaying!");
34 | activity.setDialog(RateMyMeetingsDialogFragment.newInstance(title, message, DialogType.PROGRESS));
35 | getDialog(activity).show(activity.getSupportFragmentManager(), TAG_DIALOG);
36 | }
37 |
38 | public void showAlertDialog(BaseActivity activity, String title, String message) {
39 | activity.setDialog(RateMyMeetingsDialogFragment.newInstance(title, message, DialogType.ALERT));
40 | getDialog(activity).show(activity.getSupportFragmentManager(), TAG_DIALOG);
41 | }
42 |
43 |
44 | public void dismissDialog(BaseActivity activity) {
45 | Fragment dialogFragment = activity.getSupportFragmentManager().findFragmentByTag(TAG_DIALOG);
46 | if (dialogFragment != null) {
47 | DialogFragment df = (DialogFragment) dialogFragment;
48 | df.dismiss();
49 | activity.setDialog(null);
50 | }
51 | }
52 |
53 | private RateMyMeetingsDialogFragment getDialog(BaseActivity activity) {
54 | return activity.getDialog();
55 | }
56 |
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/android_app/app/src/main/res/layout/fragment_rating_dialog.xml:
--------------------------------------------------------------------------------
1 |
5 |
11 |
12 |
21 |
22 |
30 |
31 |
38 |
39 |
45 |
46 |
52 |
53 |
54 |
61 |
62 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/view/RateMyMeetingsDialogFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.view;
6 |
7 | import android.app.AlertDialog;
8 | import android.app.ProgressDialog;
9 | import android.content.DialogInterface;
10 | import android.os.Bundle;
11 | import android.support.v4.app.DialogFragment;
12 |
13 | public class RateMyMeetingsDialogFragment extends DialogFragment {
14 |
15 | private static final String ARG_DIALOG_CONFIG = "ARG_DIALOG_CONFIG";
16 |
17 | public static RateMyMeetingsDialogFragment newInstance(String title, String message, DialogConfig.DialogType dialogType) {
18 | Bundle args = new Bundle();
19 | DialogConfig dialogConfig = new DialogConfig(title, message, dialogType);
20 | args.putSerializable(ARG_DIALOG_CONFIG, dialogConfig);
21 | RateMyMeetingsDialogFragment fragment = new RateMyMeetingsDialogFragment();
22 | fragment.setArguments(args);
23 | return fragment;
24 | }
25 |
26 | @Override
27 | public AlertDialog onCreateDialog(Bundle savedInstanceState) {
28 | DialogConfig dialogConfig = (DialogConfig) getArguments().getSerializable(ARG_DIALOG_CONFIG);
29 | setCancelable(false);
30 | switch (dialogConfig.mDialogType) {
31 | case ALERT:
32 | return buildAlertDialogFromConfig(dialogConfig);
33 | default:
34 | case PROGRESS:
35 | return buildProgressDialogFromConfig(dialogConfig);
36 | }
37 | }
38 |
39 | private AlertDialog buildAlertDialogFromConfig(DialogConfig dialogConfig) {
40 | return new AlertDialog.Builder(getActivity()).setTitle(dialogConfig.mTitle)
41 | .setMessage(dialogConfig.mMessage)
42 | .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
43 | @Override
44 | public void onClick(DialogInterface dialog, int which) {
45 | dialog.dismiss();
46 | }
47 | })
48 | .create();
49 | }
50 |
51 | private AlertDialog buildProgressDialogFromConfig(DialogConfig dialogConfig) {
52 | return new ProgressDialog.Builder(getActivity()).setTitle(dialogConfig.mTitle)
53 | .setMessage(dialogConfig.mMessage)
54 | .create();
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/android_app/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/webservice/RatingService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.webservice;
6 |
7 | import com.microsoft.office365.meetingfeedback.model.Constants;
8 | import com.microsoft.office365.meetingfeedback.model.service.MyMeetingsResponse;
9 | import com.microsoft.office365.meetingfeedback.model.webservice.payload.CreateRatingRequest;
10 | import com.microsoft.office365.meetingfeedback.model.webservice.payload.MeetingServiceResponseData;
11 |
12 | import java.util.List;
13 |
14 | import retrofit.Callback;
15 | import retrofit.RequestInterceptor;
16 | import retrofit.RestAdapter;
17 | import retrofit.http.Query;
18 |
19 | public class RatingService implements RatingServiceInterface {
20 |
21 | public static final String APPLICATION_JSON = "application/json";
22 |
23 | private final RatingServiceInterface mRatingServiceInterface;
24 |
25 | private RatingServiceInterface buildService() {
26 |
27 | RestAdapter build = new RestAdapter.Builder()
28 | .setEndpoint(Constants.SERVICE_ENDPOINT)
29 | .setLogLevel(RestAdapter.LogLevel.FULL)
30 | .setRequestInterceptor(new RequestInterceptor() {
31 | @Override
32 | public void intercept(RequestFacade request) {
33 | request.addHeader("Content-Type", APPLICATION_JSON);
34 | request.addHeader("Accept", APPLICATION_JSON);
35 | }
36 | })
37 | .build();
38 | return build.create(RatingServiceInterface.class);
39 | }
40 |
41 | public RatingService() {
42 | mRatingServiceInterface = buildService();
43 | }
44 |
45 | @Override
46 | public void postRatingAsync(String username, String owner, CreateRatingRequest requestData, Callback callback) {
47 | mRatingServiceInterface.postRatingAsync(username, owner, requestData, callback);
48 | }
49 |
50 | @Override
51 | public void getMeetingsAsync(String username, Callback> callback) {
52 | mRatingServiceInterface.getMeetingsAsync(username, callback);
53 | }
54 |
55 | @Override
56 | public void getMeetingAsync(String eventId, String username, String owner, Callback callback) {
57 | mRatingServiceInterface.getMeetingAsync(eventId, username, owner, callback);
58 | }
59 |
60 | @Override
61 | public void getMyMeetingsAsync(@Query("username") String username, Callback callback) {
62 | mRatingServiceInterface.getMyMeetingsAsync(username, callback);
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/android_app/app/src/main/res/layout/activity_navigation_drawer.xml:
--------------------------------------------------------------------------------
1 |
5 |
10 |
11 |
15 |
16 |
23 |
24 |
28 |
29 |
35 |
36 |
37 |
44 |
45 |
52 |
53 |
59 |
60 |
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/view/RatingsRecyclerViewAdapter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.view;
6 |
7 | import android.content.Context;
8 | import android.support.v7.widget.RecyclerView;
9 | import android.view.LayoutInflater;
10 | import android.view.View;
11 | import android.view.ViewGroup;
12 | import android.widget.RatingBar;
13 | import android.widget.TextView;
14 |
15 | import com.microsoft.office365.meetingfeedback.R;
16 | import com.microsoft.office365.meetingfeedback.model.meeting.RatingData;
17 | import com.microsoft.office365.meetingfeedback.model.webservice.payload.MeetingServiceResponseData;
18 |
19 | import java.text.DecimalFormat;
20 | import java.text.NumberFormat;
21 | import java.util.ArrayList;
22 | import java.util.List;
23 | import java.util.Locale;
24 |
25 | public class RatingsRecyclerViewAdapter extends RecyclerView.Adapter {
26 |
27 | private Context mContext;
28 | private MeetingServiceResponseData mResponseData;
29 |
30 | public RatingsRecyclerViewAdapter(Context context, MeetingServiceResponseData responseData) {
31 | mContext = context;
32 | mResponseData = responseData;
33 | }
34 |
35 | public List getRatings() {
36 | if (mResponseData == null) {
37 | return new ArrayList<>();
38 | }
39 | return mResponseData.mRatings;
40 | }
41 |
42 | @Override
43 | public RatingsViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
44 | View view = LayoutInflater.from(mContext).inflate(R.layout.rating_view, parent, false);
45 | return new RatingsViewHolder(view);
46 | }
47 |
48 | public RatingData getItem(int i) {
49 | return getRatings().get(i);
50 | }
51 |
52 |
53 | @Override
54 | public void onBindViewHolder(RatingsViewHolder holder, int position) {
55 | RatingData item = getItem(position);
56 | holder.mRatingBar.setRating(item.mRating);
57 | DecimalFormat decimalFormat = new DecimalFormat("#.##");
58 | holder.mRatingValue.setText(decimalFormat.format(item.mRating));
59 | holder.mRatingComments.setText(item.getCommentString());
60 | }
61 |
62 | @Override
63 | public int getItemCount() {
64 | return getRatings().size();
65 | }
66 |
67 | public class RatingsViewHolder extends RecyclerView.ViewHolder {
68 |
69 | RatingBar mRatingBar;
70 | TextView mRatingValue;
71 | TextView mRatingComments;
72 |
73 | public RatingsViewHolder(View view) {
74 | super(view);
75 | mRatingBar = (RatingBar) view.findViewById(R.id.view_rating_rating_bar);
76 | mRatingValue = (TextView) view.findViewById(R.id.view_rating_value);
77 | mRatingComments = (TextView) view.findViewById(R.id.view_rating_description);
78 | }
79 |
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/android_app/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
23 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
41 |
46 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/inject/ActivityModule.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.inject;
6 |
7 | import com.microsoft.graph.authentication.MSALAuthenticationProvider;
8 | import com.microsoft.identity.client.PublicClientApplication;
9 | import com.microsoft.office365.meetingfeedback.BaseActivity;
10 | import com.microsoft.office365.meetingfeedback.CalendarActivity;
11 | import com.microsoft.office365.meetingfeedback.ConnectActivity;
12 | import com.microsoft.office365.meetingfeedback.MeetingDetailActivity;
13 | import com.microsoft.office365.meetingfeedback.model.Constants;
14 | import com.microsoft.office365.meetingfeedback.model.DataStore;
15 | import com.microsoft.office365.meetingfeedback.model.outlook.CalendarService;
16 | import com.microsoft.office365.meetingfeedback.model.outlook.EmailService;
17 | import com.microsoft.office365.meetingfeedback.util.DialogUtil;
18 | import com.microsoft.office365.meetingfeedback.view.CalendarPageFragment;
19 | import com.microsoft.office365.meetingfeedback.view.CalendarRangeFragment;
20 | import com.microsoft.office365.meetingfeedback.view.RatingDialogFragment;
21 |
22 | import javax.inject.Singleton;
23 |
24 | import dagger.Module;
25 | import dagger.Provides;
26 |
27 | @Module(injects = {
28 | ConnectActivity.class,
29 | CalendarActivity.class,
30 | MeetingDetailActivity.class,
31 | CalendarRangeFragment.class,
32 | RatingDialogFragment.class,
33 | CalendarPageFragment.class,
34 | },
35 | addsTo = ApplicationModule.class,
36 | library = true)
37 |
38 | public class ActivityModule {
39 |
40 | private BaseActivity mActivity;
41 |
42 | public ActivityModule(BaseActivity activity) {
43 | mActivity = activity;
44 | }
45 |
46 | @Provides
47 | public DialogUtil providesDialogUtil() {
48 | return new DialogUtil();
49 | }
50 |
51 | @Provides
52 | @Singleton
53 | public MSALAuthenticationProvider providesMSALAuthenticationProvider(PublicClientApplication publicClientApplication) {
54 | MSALAuthenticationProvider msalAuthenticationProvider = new MSALAuthenticationProvider(mActivity,
55 | mActivity.getApplication(),
56 | publicClientApplication,
57 | Constants.Scopes);
58 | return msalAuthenticationProvider;
59 | }
60 |
61 | @Provides
62 | @Singleton
63 | public PublicClientApplication providesPublicClientApplication() {
64 | PublicClientApplication publicClientApplication = new PublicClientApplication(mActivity.getApplication(), Constants.CLIENT_ID, Constants.AUTHORITY_URL);//todo: will application context work in all cases here?
65 | return publicClientApplication;
66 | }
67 |
68 | @Provides
69 | @Singleton
70 | public EmailService providesEmailService(MSALAuthenticationProvider authenticationManager) {
71 | return new EmailService(authenticationManager);
72 | }
73 |
74 | @Provides
75 | @Singleton
76 | public CalendarService providesCalendarService(MSALAuthenticationProvider authenticationManager, DataStore dataStore) {
77 | return new CalendarService(authenticationManager, dataStore);
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/webservice/config/environments/production.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # Code is not reloaded between requests.
5 | config.cache_classes = true
6 |
7 | # Eager load code on boot. This eager loads most of Rails and
8 | # your application in memory, allowing both threaded web servers
9 | # and those relying on copy on write to perform better.
10 | # Rake tasks automatically ignore this option for performance.
11 | config.eager_load = true
12 |
13 | # Full error reports are disabled and caching is turned on.
14 | config.consider_all_requests_local = false
15 | config.action_controller.perform_caching = true
16 |
17 | # Enable Rack::Cache to put a simple HTTP cache in front of your application
18 | # Add `rack-cache` to your Gemfile before enabling this.
19 | # For large-scale production use, consider using a caching reverse proxy like
20 | # NGINX, varnish or squid.
21 | # config.action_dispatch.rack_cache = true
22 |
23 | # Disable serving static files from the `/public` folder by default since
24 | # Apache or NGINX already handles this.
25 | config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
26 |
27 | # Compress JavaScripts and CSS.
28 | config.assets.js_compressor = :uglifier
29 | # config.assets.css_compressor = :sass
30 |
31 | # Do not fallback to assets pipeline if a precompiled asset is missed.
32 | config.assets.compile = false
33 |
34 | # Asset digests allow you to set far-future HTTP expiration dates on all assets,
35 | # yet still be able to expire them through the digest params.
36 | config.assets.digest = true
37 |
38 | # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
39 |
40 | # Specifies the header that your server uses for sending files.
41 | # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
42 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
43 |
44 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
45 | # config.force_ssl = true
46 |
47 | # Use the lowest log level to ensure availability of diagnostic information
48 | # when problems arise.
49 | config.log_level = :debug
50 |
51 | # Prepend all log lines with the following tags.
52 | # config.log_tags = [ :subdomain, :uuid ]
53 |
54 | # Use a different logger for distributed setups.
55 | # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
56 |
57 | # Use a different cache store in production.
58 | # config.cache_store = :mem_cache_store
59 |
60 | # Enable serving of images, stylesheets, and JavaScripts from an asset server.
61 | # config.action_controller.asset_host = 'http://assets.example.com'
62 |
63 | # Ignore bad email addresses and do not raise email delivery errors.
64 | # Set this to true and configure the email server for immediate delivery to raise delivery errors.
65 | # config.action_mailer.raise_delivery_errors = false
66 |
67 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
68 | # the I18n.default_locale when a translation cannot be found).
69 | config.i18n.fallbacks = true
70 |
71 | # Send deprecation notices to registered listeners.
72 | config.active_support.deprecation = :notify
73 |
74 | # Use default logging formatter so that PID and timestamp are not suppressed.
75 | config.log_formatter = ::Logger::Formatter.new
76 |
77 | # Do not dump schema after migrations.
78 | config.active_record.dump_schema_after_migration = false
79 | end
80 |
--------------------------------------------------------------------------------
/android_app/app/src/main/java/com/microsoft/office365/meetingfeedback/model/outlook/CalendarService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 | package com.microsoft.office365.meetingfeedback.model.outlook;
6 |
7 | import com.microsoft.graph.authentication.MSALAuthenticationProvider;
8 | import com.microsoft.graph.concurrency.ICallback;
9 | import com.microsoft.graph.core.ClientException;
10 | import com.microsoft.graph.models.extensions.Event;
11 | import com.microsoft.graph.models.extensions.IGraphServiceClient;
12 | import com.microsoft.graph.options.HeaderOption;
13 | import com.microsoft.graph.options.Option;
14 | import com.microsoft.graph.options.QueryOption;
15 | import com.microsoft.graph.requests.extensions.GraphServiceClient;
16 | import com.microsoft.graph.requests.extensions.IEventCollectionPage;
17 | import com.microsoft.office365.meetingfeedback.model.DataStore;
18 | import com.microsoft.office365.meetingfeedback.model.meeting.DateRange;
19 | import com.microsoft.office365.meetingfeedback.util.FormatUtil;
20 |
21 | import java.util.Calendar;
22 | import java.util.List;
23 | import java.util.TimeZone;
24 |
25 | public class CalendarService {
26 |
27 | private IGraphServiceClient graphClient;
28 | private CalendarInterface mCalendarClient;
29 | private DataStore mDataStore;
30 | private List mAccumulatedEvents;
31 |
32 | public CalendarService(MSALAuthenticationProvider authenticationManager, DataStore dataStore) {
33 | mDataStore = dataStore;
34 | graphClient = GraphServiceClient
35 | .builder()
36 | .authenticationProvider(authenticationManager)
37 | .buildClient();
38 | }
39 |
40 | public void fetchEvents(final ICallback callback) {
41 | getEvents(new ICallback() {
42 | @Override
43 | public void success(IEventCollectionPage iEventCollectionPage) {
44 | mAccumulatedEvents = iEventCollectionPage.getCurrentPage();
45 | mDataStore.setEvents(mAccumulatedEvents);
46 | if(null != callback) {
47 | callback.success(iEventCollectionPage);
48 | }
49 | }
50 |
51 | @Override
52 | public void failure(ClientException error) {
53 | if(null != callback) {
54 | callback.failure(error);
55 | }
56 | }
57 | });
58 | }
59 |
60 | private void getEvents(ICallback callback) {
61 | DateRange dateRange = getDateRange();
62 | String startDateTime = FormatUtil.convertDateToUrlString(dateRange.mStart.getTime());
63 | String endDateTime = FormatUtil.convertDateToUrlString(dateRange.mEnd.getTime());
64 | String preferredTimezone = "outlook.timezone=\"" + TimeZone.getDefault().getID() + "\"";
65 |
66 | List