Commit graph

53 commits

Author SHA1 Message Date
Kartikay Kaushik
8f8dcc0d52
Fix #5182 Switch From Mapbox to MapLibre (#5184)
* Fix #5182 Switch From Mapbox to MapLibre

* Fix #5182 Switch From Mapbox to MapLibre - Resolved requestFeature() issue

* Fix #5182 Switch From Mapbox to MapLibre - Resolved dark mode issue on two screens

* Fix #5182 Switch From Mapbox to MapLibre - Resolved dark mode issue on additional screens

* Fix #5182 Switch From Mapbox to MapLibre - Resolved dark mode issue on notification screen

* Fix #5182 Switch From Mapbox to MapLibre - Test errors
2023-03-31 09:31:58 +09:00
Kartikay Kaushik
9b0b936c62
Fix:5175 Upgraded Minimum SDK Version, Compile and Target SDK Version (#5177)
* Kotlin Version Upgraded to 1.6.10

* Kotlin Version Upgraded to 1.6.20

* Kotlin Version Upgraded to 1.7.20

* Fix:5175 Upgraded Minimum SDK Version, Compile and Target SDK Version
2023-03-16 18:02:35 +09:00
Ashish
7476b0a24d
Merge changes from 3.1-release (#4629)
* Cherry-Picked NPE fix from master (#4569)

* Fix notification bug #4547 (#4570)

* Make Single Query for Nearby and WLM pins (#4573)

* Merge nearby and monument queries

* Bug Fix- query resource path change on shouldQueryForMonuments

* Bug Fixes
1. Propagate exceptions for nearby API calls to caller
2. Fix too much work on main thread exception in NearbyParentFragment

* Modify parameters for Nearby query

* Bug fix- current location marker (#4580)

* Move WLM template below geolocation template (#4582)

* Modify string for WLM upload notice

* Fix bug #4583 (#4591)

* Fix bug #4585 by updating kotlin and acra version (#4592)

* Fixes #4554 - only use WLM2021 template for countries that are included in it (#4574)

* Fixes #4554
1. For WLM uploads reverse geo code and see if the country code is supported -only then is the WLM upload flow triggered, otherwise usual nearby uploads happen
2. Bug Fix - Current Location marker and area

* Fixed compile error added after rebasing

* Bug fix for country code in reverse geo code

* Update WLM camaign dates [Do not merge now, merge only after alpha release] (#4584)

* Updates dates for WML campaign

* Bug fix- campaign dates

* Fixed logic for WLM enablement - stick to the month of September

* Add countries supported by WLM2021 template, except Italy

* Versioning for v3.1.0

* Update changelog.md

* Fix empty default lang bug (#4608)

* Fix bug #4583

* Fix empty default lang bug

* Fixes #4595 - Updated nearby query (#4622)

* Fixes #4595 - Updated nearby query

* Removed logic to replace local language in nearby query - that might acccidentally replace other strings

* Fetch property location in usual nearby query

* Remove duplicate line (#4626)

* Change "learn more" link to new wiki

* Add Sweden's P3426 to property filter

* Fixes #4601 - 1. Handle possible exceptions in upload file from stash 2. Modify MWException, as error is nullable, update getTitle and getMessage to rever that (#4627)

* Versioning for v3.1.1

* Update changelog.md

* Updated DB version to rever integrity

Co-authored-by: Madhur Gupta <30932899+madhurgupta10@users.noreply.github.com>
Co-authored-by: Josephine Lim <josephinelim86@gmail.com>
2021-09-16 23:09:29 +10:00
Ashish
ecbff7e3b8
Fixes #3790- Use WorkManagers to upload contributions (#4298)
* Fixes #3790
Use WorkManagers to process upload contributions
** Removed UploadService and Added UploadWorker to process contributions Upload
** Made nescessary changes to remove the usages of the Service from the classes
** UI Fxies- Minor changes in the retry and cancel uplaod icons to give them a clickable area of 48 dp

* Fixes #3790
Use WorkManagers to process upload contributions
** Removed UploadService and Added UploadWorker to process contributions Upload
** Made nescessary changes to remove the usages of the Service from the classes
** UI Fxies- Minor changes in the retry and cancel uplaod icons to give them a clickable area of 48 dp

* Updated JavaDocs in UploadWorker, Fixed Test cases

* Updated JavaDocs in UploadWorker, Fixed Test cases

* Updated gradle

* Revert "Updated gradle"

This reverts commit c8979fe6dc.

* rolledback to compileSDKVersion 28, fixed tests

* Don't call the show notifications on the main thread

* Bug Fix- Duplicate contributions, handle upload stash errors
2021-04-08 15:59:07 +03:00
Ashish
ddd3e1212a
Sync master with release (#3922)
* #3624 DateTimeFormat wrong - match pattern returned from servers (#3625)

* Revert "Fixes: #3179 Make category search non case-sensitive (#3326)" (#3636)

Simply lower casing the name of the category sent to the server
doesn't result in the server doing a case insensitive category
search. In fact, it reduces the category search space as only
categories that has a lower case character is searched even
if the search text contains upper case characters.

The test case did not catch this issue as the first character
of the title is case insensitive[1].

So, revert the changes done in commit afdeaae075.

See further disucssion in the issue thread of #3179 starting
from [2].

[1]: https://www.mediawiki.org/wiki/Manual:Page_title
[2]: https://github.com/commons-app/apps-android-commons/issues/3179#issuecomment-605462140

* Bugfix/security exception (#3627)

* Fixes #3626
* Check is file is actually created before writing to file, file picker android

* Handle Security exception

* Fixes #3436 and #2881: Media Detail design Overhaul (#3505)

* ic_map_dark_24dp: map icon for white background

* ic_info_outline_dark_24dp: info icon for dark background

* MediaDetailFragment: update the spacer as per image aspect ratio

* fragment_media_detail: design overhaul

* fragment_media_detail: remove redundant background color statements

* make requested changes

* add dark mode support

* minor ui tweak

* white map icon in dark mode

* make rquested changes

* make requested changes to layout

* fix misalignment of category list

* subtle amendments

* convert comments to javadocs

* minor amendments

* minor changes

* add styles for media detail

* Media detail fragment refactored

* make suggested changes

* minor name fix

* fix the delete button border

* Fixes #3639 (Fix Save State implementation of CheckBoxTriState ) (#3686)

* Add #3723 and #3721 to 2.13 release, fix conflicts

Conflicts were caused by merging #3723 before #3721 , so I just rolled both into one commit.

* Fix NullPointer when clicking on image in MediaDetailFragment (#3730)… (#3739)

* Update changelog.md

* Versioning for v2.13

* Fixes #3705 (Crash when viewing pic I just uploaded) (#3782)

* Fixes #3705
* Let the MediaDetailPager fragment know when the contributions have been updated

* Handle NPE, null check on adapter in MediaDetailPagerFragment

* Fixed BookmarkLocationsDao DB migration (#3793)

* Fixes #3725 (#3795)

* Downgraded okhttp version to support Api 19 devices

* Handled null CompoundDrawable[2] in etTitle-> UploadMediaDetailsFragment (#3828)

* DownSample Upload image to be shown in UploadMediaDetailFragment to handle OOM, Bitmap Too large exception (#3830)

* Fixes #3829
* DownSample Upload image to be shown in UploadMediaDetailFragment to handle OOM, Bitmap Too large exception

* removed unused imports, handled possible exceptions

* Let Fresco handle the downsampling of image

* invalidate in onTransformEnd

* Expose an interface TransformationListener in ZoomableDraweeView to listen to transformation change end

* removed photoView dependency

* removed unused imports in ZoomableActivity

* Bugfix, expand/collapse

* changed functio name

* Bugfix/p18 uploads (#3869)

* updated gradle plugin version

* BugFix #3856
* Do not use preference for deciding acceptable lat long for nearby uploads, instead save the corresponding location in the Contribution via UploadItem

* Marshall contribution's hasInvalidLocation

* reset un-related changes

* Fixed test cases

* Minor code formatting and docs

* Fixes #3882 (#3883)

* Make hasInvalidLocation non-null integer with default value 0

Co-authored-by: Ashish Kumar <ashish@Ashishs-MacBook-Air.local>

* Fixes #3766, Added OPENSTREET attribution (#3889)

* Fixes #3766
* Added OPENSTREET attribution in nearby

* Added custom text attribution in Nearby

* Deleted unused class CustomBorderTextView

* review suggested changes

* modified telemetry summary string

* Versioning and changelog for v2.13.1 (#3908)

* Update changelog.md

* Versioning for v2.13.1

* Fixes #3914 (#3915)

* Verify user login before setting upload count

* fixed compile-time error

* fix erros

* delete emptied files

* remove empty file CategoriesModel.java

Co-authored-by: Seán Mac Gillicuddy <seantheappdev@gmail.com>
Co-authored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Co-authored-by: Kshitij Bhardwaj <44129798+kbhardwaj123@users.noreply.github.com>
Co-authored-by: Vitaly V. Pinchuk <vetal.978@gmail.com>
Co-authored-by: Josephine Lim <josephinelim86@gmail.com>
Co-authored-by: Ashish Kumar <ashish@Ashishs-MacBook-Air.local>
2020-09-14 21:11:46 +10:00
Seán Mac Gillicuddy
c216fdf0d4
#3756 Convert SearchDepictionsFragment to use Pagination (#3758) 2020-05-28 14:10:04 +03:00
Seán Mac Gillicuddy
b063d6bdfd #3468 Switch from RvRenderer to AdapterDelegates (#3750)
* #3468 Switch from RvRenderer to AdapterDelegates - replace SearchDepictionsRenderer

* #3468 Switch from RvRenderer to AdapterDelegates - replace UploadCategoryDepictionsRenderer

* #3468 Switch from RvRenderer to AdapterDelegates - update BaseAdapter to be easier to use

* #3468 Switch from RvRenderer to AdapterDelegates - replace SearchImagesRenderer

* #3468 Switch from RvRenderer to AdapterDelegates - replace SearchCategoriesRenderer

* #3468 Switch from RvRenderer to AdapterDelegates - replace NotificationRenderer

* #3468 Switch from RvRenderer to AdapterDelegates - replace UploadDepictsRenderer

* #3468 Switch from RvRenderer to AdapterDelegates - replace PlaceRenderer

* #3468 fix constant import

* #3468 Switch from RvRenderer to AdapterDelegates - resolve id conflict
2020-05-27 19:44:21 +10:00
Cloe Riva
01839dec6e
Adding multidex to support more method references (#3755)
* adding multidex to support more method references

* add multidex version to gradle properties
2020-05-19 14:32:33 +01:00
Seán Mac Gillicuddy
0d6a79e91a
#3630 [Library Discussion] Core-ktx (#3660) 2020-04-16 10:35:02 -07:00
Madhur Gupta
15bccdf650
Fixes #3465 Use AndroidX Pref (#3521)
* [WIP] Fixes #3465 Use AndroidX Pref

* Deleted Unused Files

* Added singleLineTitle

* Updated Gradle Properties

* Migrated to Androidx

* Inline Variable change

* optimise imports

* Fixed Crash on empty input
2020-03-17 13:10:26 +00:00
Seán Mac Gillicuddy
81c7281d3a
#3471 Remove android.enableUnitTestBinaryResources - remove line (#3478) 2020-03-16 19:38:58 +10:00
Adam Jones
8e35787248 Gradle 5 update (#3023)
* Update to Gradle 5

* Update gradle-play-publisher
2019-06-17 16:52:26 +05:30
neslihanturan
f2a499e8b6
Revert "Update to Gradle 5 (#2860)" (#3019)
This reverts commit 30df3025b6.
2019-06-14 00:18:43 +03:00
Aadil Ahmed
30df3025b6 Update to Gradle 5 (#2860) 2019-06-13 16:43:51 +01:00
Adam Jones
67e43ef446 Upgrade to Robolectric 4 (#2982) 2019-06-04 22:02:07 +05:30
Vivek Maskara
57e685cf6c Fix #2593: Migrate to androidX (#2594)
* Update dependencies and migrate to androidX
* Make gradle properties tidy
2019-03-16 11:22:37 +00:00
Dmitry Brant
c21cc83eb5 Update to API 28, and fix CI issues. (#2595)
* Update gradle version.

Also update jacoco plugin to work with latest gradle.

* Update target sdk to 28.

* Update other dependencies to latest versions.

* Remove totally unused(?) local jar file.

* Remove dependency on nineoldandroids.

The functions it provides are no longer necessary.
This also removes a homemade "evaluate" function, which is readily
available in the Support library.

* Remove dependency on Traceur.

This library has not been updated in two years (may no longer be maintained?), and no longer works with
the latest RxJava.

* Enable test coverage only when performing CI.

Running test coverage on every single build while developing in the IDE is quite a waste of time.

* Suppress gradle Notes and Warnings from reflection-using packages.

The build output was getting extremely long, and was actually causing
the build to fail because of the sheer size of the log.

* Suppress gradle Note messages during tests and CI.

Stop CI messages from exploding to 10k+ lines.

* Temporarily remove instrumented test(s).

The project's instrumented tests consist of a single test which sets a
SharedPreference, then verified that the SharedPreference was set.

I humbly submit that this is not worth the trouble of having the CI
server download the system image, spin up an emulator, load the APK, and
run it just for this purpose.

Once the instrumented tests are ready for prime time, we can reinstate
instrumented tests in CI.
2019-03-15 08:30:08 +05:30
Vanshika Arora
9867143099 Project build successful (#2412)
* Fixed issue #2285

* modified gradle.properties

* updation in build.gradle

* updated travis.yml
2019-02-06 00:37:32 +05:30
Adam Jones
67c5d20468 Tidy up gradle.properties (#2175) 2019-01-27 22:29:56 +05:30
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
Dmitry Brant
fc30f1b5ec Sweeping update of gradle and dependency versions. (#1858)
* Sweeping update of gradle and library versions.

This updates all of the dependencies of the project to their latest
versions. Everyone should please upgrade to the latest version of Android
Studio, update your build tools, and keep your version of Gradle and the
Kotlin plugin up to date.

* Update build tools in travis.

* Remove cruft and fix tests.

* Remove even more stuff.

* Reinstate instrumented tests.

* Update emulator image in travis.

* Localisation updates from https://translatewiki.net.

* Work towards eliminating string literals from code. (#1861)

String literals are being used in many places in the code, instead of
proper string resources which are automatically localized. This PR
replaces many of the string literals with pre-packaged resources, or will
add the appropriate string if necessary.

* Add button on image details to copy wikicode to clipboard (#1849)

* Add button on image details to copy wikicode to clipboard

* Make copy wikicode button width the same as the nominate deletion button width by filling in background

* Build fix

* Enable ProGuard for Debug and Release builds.

This enables ProGuard minification, which significantly shrinks the APK
(for both debug and release configurations) and vastly decreases the
method count.

* Add ProGuard rules for test builds.
2018-09-11 11:51:28 +03:00
Vivek Maskara
2a0b9d8a0b Enable crosswiki notifications and minor UI fixes in displaying notif… (#1540)
* Enable crosswiki notifications and minor UI fixes in displaying notifications

* Added java docs
2018-05-24 15:54:31 +03:00
Jatin Rao
b7b87e0615 Fixes issues #1228 added recenter button to nearby map 2018-03-21 23:12:59 +05:30
Jatin Rao
534215fdbc Fix for issue #1224 showing complete notification on click 2018-03-01 15:57:13 +05:30
maskara
41d6abdf40 Remove unused code 2018-01-22 04:09:43 +05:30
maskara
28a6a3b71d Integrate notifications API 2018-01-22 03:46:54 +05:30
maskara
eaaef3211e Fix dex merge issue 2017-12-10 15:07:27 +05:30
maskara
6a7b7cbbe8 Introduce dagger 2017-11-12 01:04:10 +05:30
maskara
5559e1bb41 Put PR link 2017-11-04 15:51:20 +05:30
maskara
ef56b69828 Replay deprecated symbol usage and mark AAPT todo 2017-11-04 15:18:45 +05:30
maskara
3bc21ee514 Disable AAPT 2 2017-11-04 12:40:53 +05:30
maskara
3adb5d83ae Update Gradle plugin to 3.0 2017-11-02 22:53:27 +05:30
Paul Hawke
f9ff29000b Rolled back change to targetSdkVersion, back to 25 as Travis seems to need right now. 2017-10-10 22:14:39 -05:00
Paul Hawke
529f5415c3 Improved the layout of the login screen. 2017-09-30 14:39:26 -05:00
Yusuke Matsubara
1800c54455 Use build tools version 26.0.1 2017-08-24 22:08:22 +09:00
Mikel
b3d019d8de Upgrade gradle version to latest stable 2017-08-18 13:58:14 +01:00
Mikel
09d94f3e06 Replace Guava-implemented getUploadCount with RxJava2 version 2017-07-26 16:56:44 +01:00
Josephine Lim
53d6792f5b Merge pull request #763 from psh/master
Refactoring the API calls
2017-07-16 02:27:50 +10:00
misaochan
ffa47a7646 Increment target SDK to 25 2017-07-13 02:38:55 +10:00
Paul Hawke
d53858f7d2 Gentle version bump and added the dexcount gradle plugin 2017-07-04 14:14:17 -05:00
misaochan
7f5bea4d68 Revert target SDK to 23 2017-06-04 17:44:43 +10:00
Yusuke Matsubara
a6ea218149 Merge pull request #644 from ftsalamp/master
Updated target sdk version to 25
2017-05-27 19:45:34 +09:00
maskara
43d841bdf3 Adding support for Guava library 2017-05-21 12:25:28 +02:00
Fotis Tsalampounis
7d5f5853e5 Updated target sdk version to 25
The camera crash bug does not seem to exist anymore. Another fix probably solved this issue too.
2017-05-20 14:05:02 +03:00
maskara
f004a0dd43 Undo gradle change 2017-05-12 13:52:54 +02:00
maskara
6118b57295 Added support for MapView in Nearby 2017-05-12 13:50:25 +02:00
misaochan
36a1ec325e Whitespace 2017-03-23 16:20:04 +10:00
misaochan
04e359142f Add comments 2017-03-23 16:17:19 +10:00
misaochan
5edbea1fae Change target SDK to 23 2017-03-23 16:03:16 +10:00
maskara
060750b050 Added support for butterknife library for view bindings 2017-03-21 00:04:32 +05:30