Commit graph

26 commits

Author SHA1 Message Date
Vivek Maskara
d4fa9cfa45 Use wrapper for interacting with shared preferences (#2288)
* Use wrapper for accessing shared preferences across the app

* Use Json kv store for storing place object

* Fix tests

* Fix test failure

* Fix UI tests
2019-01-14 00:13:21 +05:30
sp2710
dabcd43a5b Removed default license settings, and implemented selecting last selected license as default licence(#2170) (#2218)
* Removed default license settings, and implemented selecting last selected license as default licence(#2170)
* Replace settings license tests with recent upload limit test
2019-01-04 15:26:39 +00:00
Vivek Maskara
f607c1c14d Multiple uploads with over haul (#1968)
* Added new upload activity that receives shared files from the gallery.  Cards show and hide, plus titles are correct.  Displayed thumbnails for the shared images

* Better handling of the view paging plus error handling for required fields.

* Code cleanup to make things more readable.

* Extracted a model from the category search fragment that can possibly be shared with the new upload activity.

* Added category selection to the combined upload screen.

* Cleanup before the home-stretch on the GUI.

* Adding license selection.

* Fixed build warnings + cleanup

* Start to support the dark theme.

* Work in progress to add quality checking.

* Fixing merge.

* GPSExtractor: optimized away the EXifInterface object

* Implemented submit functionality, temporarily fixed jacoco crash by disabling DUMMY UploadView object.

* Implemented uploading of categories along with the picture. The category screen now displays GPS and recent categories when nothing is searched.

* Implemented caching of files. Did some work on picture quality detection.

* Implemented too dark picture detection.

* Added a side card for zoom and map buttons along with pretty animations for stuff.

* Added duplicate image on commons checking and fixed files not getting proper file extensions in several places.

* Added support for map button and switched in-app upload buttons to UploadActivity

* Pretty pretty animations!

* Implemented zoom functionality for th background image. Just pinching on the image works instead of requiring buttons.

* Added multi-language descriptions with categories by region.

* Reimplemented the duplicate title checker and implemented a check against putting the same language twice in the description.

* Javadocs for Description and UploadPresenter, plus some general cleanup.

* Small code changes.

* Implemented login checks for the Upload screen.

* Implement receiving data from Nearby.

* Feature/permissions library (#1855)

* Added permission for Dexter, the runtime permission handling library

* [Preparing fir issue #1773] Added a utility function which would take the user to app settings screen where he could manually give us the required permission

* Added an alert dialog with positive and negative callback [Preparing fir issue #1773]

* Improvements in the way External Storage Permission is handled in MultipleShareActivity[Bug fix #1697]
1. Used dexter to handle the external storage permission
2. Behaviour changes : When user tries to share(uppload) images to commons via MultipleShareActivity, following decision tree is followed
	a. If the app has permission for external storage, normal upload operation is followed
	b. If the app does not has the permission for external storage, dexter is used to ask for the same
	c. If the user gives us the required permission, normal upload flow is proceeded
	d. If the doesnot gives us the required permission a rationale dialog is shown with the appropriate message to let him know why we need the permission
	e. If he presses okay, steps a-c are followed and if he presses cancel, we close the app.
	f. If while asking for permission, the user chooses never ask again, then next time he tries to upload an image via MSA, the rational dialog follows the app setting screen where he could manually give us the required permission and the onActivityResult of same is handled

* Added a Constants class to handle request and result codes from one place and other related constants common to the all app elements

* replaced hardcoded strings ok and cancel in DialogUtil to string resources

* init permission rationale dialog in activities onCreate

* Code formatting, updated access modifiers wherever required, added javadocs for new methods created

* *shifted constants to app class
*Added JavaDocs in PermissionUtils

* removed class REQUEST_CODES from CommonsApplication and instead put the enclosing constants in the App class itself

* Made Codacy happy.

* Abstarcted permission acquisition into new class DexterPermissionObtainer

* Fixed Nearby upload detection

* Migrated bad picture detection from AsyncTask to RxJava.

* Removed ShareActivity and related dead code

* Removed dead or duplicate code from FileProcessor

* Added info button to title EditText

* Fixed the add description button not disappearing.
Added "Starting Upload" toast.
Added link to the license on final screen.
Made it so that the map button is hidden when image lacks gps coords.

* Support in app multiple uploads

* Minor changes to fix build

* Changes to fix pending issues with upload flow

* Fix display of similar image fragment

* When uploading several files at once the date is missing #1854 (#2)

* Bug fix issue #1854
* updated ContributionsDao to save create date, which it was not doing currently [it was instead saving current date]
* UploadItem accepts are dateCreated param
* Added a function in UploadModel, getFileCreatedDate which tries to fetched the file creaction date from all possible content providers.

* Fix pending issues in upload flow

* Make multiple uploads work for Google Photos

* Fix default state for upload activity

* Fix keyboard state for license screen

* Fix descriptions for uploads

* wip

* Fix language spinner
2018-11-19 17:00:32 +05:30
Paul Oranje
7b7d17a33b Fixes #171 Fix Lint errors/warnings: global, coding style: add missing spaces (#1955)
* Inserted missing spaces between `if` and `(` to improve code style, in line with GSG 4.6.2
2018-11-04 14:37:28 +00:00
Edward Savage
e36a71a584 Optimize imports (#1927) 2018-10-13 18:31:25 +11:00
Madhur Gupta
bdd7a86cd5 Revamp the Settings page (#1259)
* Revamp the Settings page

* Update License Test
2018-03-11 00:56:05 +05:30
Paul Hawke
1d8422b900 Fixed broken android (integration) test. 2017-12-08 15:38:27 -06:00
Paul Hawke
ce32505ca3 Created a Robolectric unit test replacement for the NearbyActivity test. 2017-11-29 21:29:09 -06:00
maskara
6d718c0028 Upload tests 2017-11-22 02:38:06 +05:30
Paul Hawke
1f1a2822e8 Moved 2 other tests over to use robolectric. 2017-08-26 21:05:41 -05:00
Paul Hawke
58013ef10c Moved the test to use robolectric and updated it to be flavor aware. 2017-08-26 18:00:02 -05:00
Mikel
e9d77a0716 Use vector icons for nearby-map markers (#786) 2017-07-22 10:01:08 +09:00
Paul Hawke
2e4b25aa99 Changes pulled in from whym/apps-android-commons. 2017-07-17 19:21:40 -05:00
Yusuke Matsubara
d241d36d66 Add PageTitle class to canonicalize page names 2017-07-13 18:29:30 +09:00
Yusuke Matsubara
05e075556f Use localized message in NearbyActivityTest 2017-06-14 22:27:25 +09:00
Tobias Schönberg
4dbf9d0858 Fix some tests 2017-05-28 19:21:45 +02:00
Tobias Schönberg
bc61f8d2ec Code style 2017-05-26 23:00:54 +02:00
Tobias Schönberg
5574fa8b7c Android studio import ordering 2017-05-26 22:45:12 +02:00
Tobias Schönberg
db5dbbfdfd Fix crash of nearby list when the places list is null
Currently the NearbyController crashes when it is called with a
places list that is null. This is caused by the NearbyMapFragment
not handling this state correctly.
This commit adds tests for an empty list and null, which reproduce
the problem. An early return in the NearbyController can make
the tests pass, but might not be the best solution for this issue.
2017-05-24 22:15:38 +02:00
Yusuke Matsubara
28d73d2b96 Espresso: match with resource names in settings screen
Apparently this is more robust (especially for SDK version 25)
2017-05-21 21:38:35 +09:00
Tobias Schönberg
2f713baeb9 Code style: Order of imports 2017-05-17 20:40:24 +02:00
Tobias Schönberg
0f75bb58f9 Add nearby activity Espresso test
Currently the nearby activity is not included in the Espresso
tests.
This commit adds one test that checks if the activity loads
and the headline is displayed.
2017-05-17 19:07:37 +02:00
Adam Jones
75060d7875 Removing unused imports 2017-05-15 16:45:46 +01:00
Adam Jones
e5d7caf5f2 Update SettingsActivityTest to correctly pass test on LicenseSpinner 2017-05-10 23:15:15 +01:00
Yusuke Matsubara
46b54e7312 Remove redundant Espresso/Travis settings 2017-04-20 21:34:04 +09:00
Yusuke Matsubara
7a7e1e7fbb Test license selection in Settings and run emulator on Travis 2017-04-19 20:33:59 +09:00