apps-android-commons/app/src/main/java/fr/free/nrw/commons
neslihanturan d29aa2e2e5 Fix urgent crashes A and E (#1749)
* Create utility class for contribution process

* implement method to save five from given URİ

* Add file utilities for directory checks

* Add ContributionUtils for saving file during upload

* Change method call acordingly with handleImagePicked() method

* Call method to save file temproarily when a photo to upload is chosen from contributions list.

* Call method to save file temproarily when a photo to upload is chosen from nearby list and map

* Arrange method call

* Write a method to save file temporarily during upload process. It will save the file to a internal path and it will be deleted by another method after upload process is done.

* Add a method to save a file to a given path from a content provider Uri

* On openAssetFileDescriptor method, use URi from temporarily saved file, instead of Contributions.getLocalUri which was Uri from content provider

* Edit uploadContribution method so that it will use FileInputStream from temporarily saved file, insdeat of the Uri from content provider.

* Make it work

* Code cleanup

* Add directory cleaner method

* Call temp directory cleaner method at the end of uplpoad process

* Use FileInputStream insted

* Add directory cleaner method

* Add file removal method

* Use external directory instead

* Make destination file name flexible

* Make it work with share action coming from another activity

* Make it work for Multiple hare Activity

* Code cleanup

* Solve camera issue

* Fix camera crash

* Cleanup

* Revert change of commenting out posibly useles code, because I am not sure if it is useless or not. Requires discussion

* Use timestamp in temoorary file names, so that we wont never create same file and access old file reference. It was a weird problem though

* Code cleanup

* Add nullable annotation to handleImagePicked method uri parameter

* Add Nullable anotation to method

* Code cleanup

* Bugfix: use uri.getPath() instead uri.toString

* Remove unecesarry file saving operation, which was added accidentally

* Fix travis fail

* Remove temp file if upload gets failed and file is still there

* Code cleanup:Remove unused parameters from removeTempFile method

* Empty temp directory on app create, in case some of files are still there

* Add null check to array to prevent NPE on first run

* Fix multiple uploads bug

* Remove file if upload is succeed

* Add external storage utility methods

* Check external file permission before saving files temporarily

* finish activity if permission is not granted

* Add log lines

* Remove files even if user decides to go back without sharing

* Add easy null check

* Change storage permission settings in singe upload fragment too

* Finish app if permission is not granted

* Code optimisation

* Remove temp file if upload process never is finalised on activity stop

* Bugfix maybe contribution is never created

* Fix travis build
2018-08-02 06:24:08 +10:00
..
achievements Merge gamification branch with master (#1752) 2018-07-28 01:09:23 +05:30
auth Merge remote-tracking branch 'origin/2.8-release' into 2.8-release 2018-07-28 23:39:15 +10:00
caching Refactoring to extract GpsCategoryModel and ensure single-responsibility-principle is maintained in CategoryApi. 2018-05-25 01:55:03 -05:00
category Merge remote-tracking branch 'origin/2.8-release' into 2.8-release 2018-07-28 23:39:15 +10:00
contributions Fix urgent crashes A and E (#1749) 2018-08-02 06:24:08 +10:00
data Add feature to Browse commons via app (#1716) 2018-07-24 10:17:24 +03:00
delete Revert "Wmhack2018 (#1536)" (#1539) 2018-05-19 23:02:29 +03:00
di Remove wrong imports that cause failed build (#1775) 2018-08-02 00:51:31 +10:00
explore Add feature to Browse commons via app (#1716) 2018-07-24 10:17:24 +03:00
glide Enable crosswiki notifications and minor UI fixes in displaying notif… (#1540) 2018-05-24 15:54:31 +03:00
location Make P18 edits to corresponding wikidata entity on uploading from Nearby (#1495) 2018-05-31 11:00:17 +10:00
media Removed extra space 2018-07-26 18:32:56 +09:00
modifications Fix conflict between different product flavors (#1726) 2018-07-20 02:03:28 +10:00
mwapi Fix urgent crashes A and E (#1749) 2018-08-02 06:24:08 +10:00
nearby Fix urgent crashes A and E (#1749) 2018-08-02 06:24:08 +10:00
notification Merge branch 'master' into wikidataEdits 2018-05-31 10:02:38 +05:30
quiz Merge gamification branch with master (#1752) 2018-07-28 01:09:23 +05:30
settings Change references to upload.FileUtils 2018-05-25 22:50:22 +10:00
theme Feedback module (#1742) 2018-07-26 13:12:51 +05:30
ui Allow for settings titles to expand across multiple lines instead of being truncated (#1671) 2018-07-23 08:50:46 +03:00
upload Fix urgent crashes A and E (#1749) 2018-08-02 06:24:08 +10:00
utils Fix urgent crashes A and E (#1749) 2018-08-02 06:24:08 +10:00
widget Added Basic Pic Of the Day App Widget (#1523) 2018-06-14 19:10:52 +10:00
wikidata Fix issue where Wikidata edits were not happening (#1682) 2018-07-05 20:13:37 +10:00
AboutActivity.java remove unused imports (#1606) 2018-06-21 07:28:27 +09:00
CommonsApplication.java Fix urgent crashes A and E (#1749) 2018-08-02 06:24:08 +10:00
HandlerService.java Refactoring based on comments 2018-01-13 23:59:45 +05:30
License.java added JavaDoc comments 2017-12-19 19:25:49 +05:30
LicenseList.java Update LicenseList.java 2017-12-21 20:56:25 +05:30
Media.java Add feature to Browse commons via app (#1716) 2018-07-24 10:17:24 +03:00
MediaDataExtractor.java Revert "Wmhack2018 (#1536)" (#1539) 2018-05-19 23:02:29 +03:00
MediaThumbnailFetchTask.java First baby steps into the world of dependency injection using Dagger. 2017-08-26 08:56:14 -05:00
MediaWikiImageView.java Fix urgent crashes A and E (#1749) 2018-08-02 06:24:08 +10:00
PageTitle.java Added JavaDocs 2017-12-10 00:28:51 -08:00
TokensTranslations.java Added the functionality 2018-03-17 09:53:17 +05:30
Utils.java Feedback module (#1742) 2018-07-26 13:12:51 +05:30
ViewHolder.java Refactored to move out nearby adapter from the activity 2017-04-02 22:21:05 +05:30
WelcomeActivity.java Merge gamification branch with master (#1752) 2018-07-28 01:09:23 +05:30
WelcomePagerAdapter.java Help button (#1415) 2018-04-30 14:31:27 +03:00