Rudimentary ogg uploading support

Requires that the file already be in ogg format.
Can not be picked from inside the app. You need to use 'share'
feature from some other app to send it to this
Has display oddities. No thumbnails
This commit is contained in:
YuviPanda 2013-03-01 22:08:15 +05:30
parent 203aa6721d
commit 74c7928997
2 changed files with 6 additions and 4 deletions

View file

@ -45,7 +45,7 @@
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<!-- Remove Audio Support for now <data android:mimeType="audio/*" /> -->
<data android:mimeType="audio/ogg" />
</intent-filter>
</activity>
<activity

View file

@ -97,9 +97,11 @@ public class ShareActivity extends AuthenticatedActivity {
cursor.moveToFirst();
dateCreated = new Date(cursor.getLong(0));
} // FIXME: Alternate way of setting dateCreated if this data is not found
} /* else if (mimeType.startsWith("audio/")) {
Removed Audio implementationf or now
} */
} else if (mimeType.equals("audio/ogg")) {
if(!title.endsWith(".ogg") || !title.endsWith(".oga")) {
title += ".oga";
}
}
Contribution contribution = new Contribution(mediaUri, null, title, description, length, dateCreated, null, app.getCurrentAccount().name, CommonsApplication.DEFAULT_EDIT_SUMMARY);
contribution.setSource(source);
return contribution;