Skip to content

Commit 10c18e8

Browse files
authored
Merge pull request #97 from learning-layers/integration
Release v1.6.0
2 parents 35624f1 + 99e04eb commit 10c18e8

27 files changed

+689
-104
lines changed

app/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ dependencies {
8181
// Nice core libraries for a multitude of tasks
8282
compile 'com.google.guava:guava:18.0'
8383

84+
compile 'org.florescu.android.rangeseekbar:rangeseekbar-library:0.3.0'
85+
8486
// Google Play Services APIs
8587
compile 'com.google.android.gms:play-services-base:8.1.0'
8688
compile 'com.google.android.gms:play-services-maps:8.1.0'

app/src/main/AndroidManifest.xml

Lines changed: 10 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest
3-
package="fi.aalto.legroup.achso"
4-
xmlns:android="http://schemas.android.com/apk/res/android">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="fi.aalto.legroup.achso">
54

65
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
76
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
@@ -24,15 +23,12 @@
2423
<uses-feature
2524
android:name="android.hardware.camera"
2625
android:required="false" />
27-
2826
<uses-feature
2927
android:name="android.hardware.camera.autofocus"
3028
android:required="false" />
31-
3229
<uses-feature
3330
android:name="android.hardware.location.gps"
3431
android:required="false" />
35-
3632
<uses-feature
3733
android:name="android.hardware.location"
3834
android:required="false" />
@@ -49,33 +45,28 @@
4945
android:icon="@drawable/ic_launcher"
5046
android:label="@string/app_name"
5147
android:theme="@style/Theme.Custom.Light">
52-
5348
<activity
5449
android:name=".browsing.BrowserActivity"
5550
android:label="@string/app_name">
56-
5751
<meta-data
5852
android:name="android.app.default_searchable"
5953
android:value=".browsing.SearchActivity" />
6054

6155
<intent-filter>
6256
<action android:name="android.intent.action.MAIN" />
57+
6358
<category android:name="android.intent.category.LAUNCHER" />
6459
</intent-filter>
65-
6660
</activity>
67-
6861
<activity
6962
android:name=".playback.PlayerActivity"
63+
android:exported="true"
7064
android:parentActivityName=".browsing.BrowserActivity"
71-
android:theme="@style/Theme.Custom.Immersive"
72-
android:exported="true">
73-
65+
android:theme="@style/Theme.Custom.Immersive">
7466
<intent-filter
7567
android:icon="@drawable/ic_launcher"
7668
android:label="@string/app_name"
7769
android:priority="1">
78-
7970
<action android:name="android.intent.action.VIEW" />
8071

8172
<category android:name="android.intent.category.DEFAULT" />
@@ -85,29 +76,24 @@
8576
android:host="*"
8677
android:mimeType="application/achso"
8778
android:pathPattern=".*\\.achso" />
88-
8979
</intent-filter>
90-
9180
<intent-filter
9281
android:icon="@drawable/ic_launcher"
9382
android:label="@string/app_name"
9483
android:priority="1">
95-
9684
<action android:name="fi.aalto.legroup.achso.action.VIEW" />
85+
9786
<category android:name="android.intent.category.DEFAULT" />
9887
<category android:name="android.intent.category.BROWSABLE" />
9988

10089
<data android:scheme="http" />
10190
<data android:scheme="https" />
102-
10391
<data android:mimeType="video/mp4" />
10492
</intent-filter>
105-
10693
<intent-filter
10794
android:icon="@drawable/ic_launcher"
10895
android:label="@string/app_name"
10996
android:priority="1">
110-
11197
<action android:name="android.intent.action.VIEW" />
11298
<action android:name="fi.aalto.legroup.achso.action.VIEW" />
11399

@@ -116,46 +102,37 @@
116102

117103
<data android:scheme="achso" />
118104
</intent-filter>
119-
120105
</activity>
121-
122106
<activity
123107
android:name=".browsing.SearchActivity"
124108
android:label="@string/search"
125109
android:launchMode="singleTop"
126110
android:parentActivityName=".browsing.BrowserActivity">
127-
128111
<meta-data
129112
android:name="android.app.searchable"
130113
android:resource="@xml/searchable" />
131114

132115
<intent-filter>
133116
<action android:name="android.intent.action.SEARCH" />
134117
</intent-filter>
135-
136118
</activity>
137-
138119
<activity
139120
android:name=".settings.SettingsActivity"
140121
android:label="@string/settings"
141122
android:parentActivityName=".browsing.BrowserActivity" />
142-
143123
<activity
144124
android:name=".browsing.DetailActivity"
145125
android:label="@string/title_activity_information"
146126
android:parentActivityName=".browsing.BrowserActivity" />
147-
148127
<activity
149128
android:name=".authentication.AuthorizationActivity"
150129
android:label="@string/app_name"
151130
android:parentActivityName=".browsing.BrowserActivity" />
152-
153131
<activity
154132
android:name=".sharing.SharingActivity"
133+
android:configChanges="orientation|screenSize"
155134
android:label="@string/app_name"
156-
android:parentActivityName=".browsing.BrowserActivity"
157-
android:configChanges="orientation|screenSize" />
158-
135+
android:parentActivityName=".browsing.BrowserActivity" />
159136
<activity
160137
android:name=".authentication.LoginActivity"
161138
android:label="@string/choose_account"
@@ -166,29 +143,26 @@
166143
<service android:name=".storage.remote.download.DownloadService" />
167144
<service android:name=".storage.remote.SyncService" />
168145
<service android:name=".authoring.VideoCreatorService" />
169-
170146
<service
171147
android:name=".authentication.AuthenticatorService"
172148
android:permission="android.permission.ACCOUNT_MANAGER">
173-
174149
<intent-filter>
175150
<action android:name="android.accounts.AccountAuthenticator" />
176151
</intent-filter>
177152

178153
<meta-data
179154
android:name="android.accounts.AccountAuthenticator"
180155
android:resource="@xml/authenticator" />
181-
182156
</service>
183157

184158
<meta-data
185159
android:name="com.google.android.gms.version"
186160
android:value="@integer/google_play_services_version" />
187-
188161
<meta-data
189162
android:name="com.google.android.maps.v2.API_KEY"
190163
android:value="@string/google_maps_api_key" />
191164

165+
<activity android:name=".authoring.VideoTrimActivity"></activity>
192166
</application>
193167

194-
</manifest>
168+
</manifest>

app/src/main/java/fi/aalto/legroup/achso/authoring/VideoCreatorService.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,11 @@ public VideoCreatorService() {
9797

9898
@Override
9999
protected void onHandleIntent(Intent intent) {
100-
bus.post(new VideoCreationStateEvent(VideoCreationStateEvent.Type.STARTED));
100+
UUID id = (UUID) intent.getSerializableExtra(ARG_VIDEO_ID);
101+
102+
bus.post(new VideoCreationStateEvent(VideoCreationStateEvent.Type.STARTED, id));
101103

102104
Uri videoContentUri = intent.getParcelableExtra(ARG_VIDEO_URI);
103-
UUID id = (UUID) intent.getSerializableExtra(ARG_VIDEO_ID);
104105
String title = intent.getStringExtra(ARG_VIDEO_TITLE);
105106
String tag = intent.getStringExtra(ARG_VIDEO_TAG);
106107
Date date = (Date) intent.getSerializableExtra(ARG_VIDEO_DATE);
@@ -137,7 +138,7 @@ protected void onHandleIntent(Intent intent) {
137138
ensureVideoContent(videoContentUri, videoFile);
138139
} catch (IOException e) {
139140
// TODO: Error message
140-
bus.post(new VideoCreationStateEvent(VideoCreationStateEvent.Type.ERROR));
141+
bus.post(new VideoCreationStateEvent(VideoCreationStateEvent.Type.ERROR, id));
141142
e.printStackTrace();
142143
return;
143144
}
@@ -166,7 +167,7 @@ protected void onHandleIntent(Intent intent) {
166167

167168
video.save(null);
168169

169-
bus.post(new VideoCreationStateEvent(VideoCreationStateEvent.Type.FINISHED));
170+
bus.post(new VideoCreationStateEvent(VideoCreationStateEvent.Type.FINISHED, id));
170171
}
171172

172173
/**
@@ -332,14 +333,19 @@ public static final class VideoCreationStateEvent {
332333

333334
private Type type;
334335

335-
public VideoCreationStateEvent(Type type) {
336+
private UUID uuid;
337+
338+
public VideoCreationStateEvent(Type type, UUID uuid) {
336339
this.type = type;
340+
this.uuid = uuid;
337341
}
338342

339343
public Type getType() {
340344
return this.type;
341345
}
342346

347+
public UUID getId() { return this.uuid; }
348+
343349
public enum Type {
344350
STARTED,
345351
FINISHED,

0 commit comments

Comments
 (0)