mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
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:
parent
203aa6721d
commit
74c7928997
2 changed files with 6 additions and 4 deletions
|
|
@ -45,7 +45,7 @@
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|
||||||
<data android:mimeType="image/*" />
|
<data android:mimeType="image/*" />
|
||||||
<!-- Remove Audio Support for now <data android:mimeType="audio/*" /> -->
|
<data android:mimeType="audio/ogg" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
<activity
|
||||||
|
|
|
||||||
|
|
@ -97,9 +97,11 @@ public class ShareActivity extends AuthenticatedActivity {
|
||||||
cursor.moveToFirst();
|
cursor.moveToFirst();
|
||||||
dateCreated = new Date(cursor.getLong(0));
|
dateCreated = new Date(cursor.getLong(0));
|
||||||
} // FIXME: Alternate way of setting dateCreated if this data is not found
|
} // FIXME: Alternate way of setting dateCreated if this data is not found
|
||||||
} /* else if (mimeType.startsWith("audio/")) {
|
} else if (mimeType.equals("audio/ogg")) {
|
||||||
Removed Audio implementationf or now
|
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 contribution = new Contribution(mediaUri, null, title, description, length, dateCreated, null, app.getCurrentAccount().name, CommonsApplication.DEFAULT_EDIT_SUMMARY);
|
||||||
contribution.setSource(source);
|
contribution.setSource(source);
|
||||||
return contribution;
|
return contribution;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue