Commit graph

165 commits

Author SHA1 Message Date
Vivek Maskara
86e849683a
Refactor code to remove usage of Jsoup and Rssparser (#1888)
* Refactor code to remove usage of Jsoup and Rssparser

* Use current date for picture of the day
2018-09-11 21:14:41 +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
a63b9f88bb
Merge 2.8 release with master (#1887)
* Add Traceur for getting meaningful RxJava stack traces (#1832)

* Hotfix for overwrite issue in 2.8.0  (#1838)

* This solution is an hotfix for overrite issue came back on 2.8.0 version. What I did is checking the extension, and if it is null, adding .jpg suffix. Because commons files always have suffixes, and we should compare file names after adding suffixes. Othervise overrides are possible.

* Check if file title includes an extension already, by checking if is there any dot in it.

* Fix logic error

* Add uncovered tests

* Remove unecessary line breaks

* Make Javadocs more explicit

* Versioning and changelog for v2.8.2 (#1842)

* Versioning for v2.8.2

* Changelog for v2.8.2

* Add logs in wiki data edit and session refresh flow (#1874)

* Fix logout (#1875)

* [WIP] Refactor feedback and quiz to reduce possibility of NPE (#1881)

* Refactor feedback and quiz to reduce possibility of NPE

* Handle throwables in quiz checker

* Minor refactoring

* Set Traceur to only work in DEBUG mode (#1884)

* Bug fix for uploaded images count in achievements activity (#1885)

* Versioning and changelog for v2.8.3 (#1886)

* Update changelog.md

* Versioning for v2.8.3
2018-09-07 05:50:41 +05:30
Ashish Kumar
70099a9014 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
2018-09-07 02:57:07 +10:00
Dmitry Brant
2884bd934a Remove dependency on Glide, Picasso, SVG, and multidex. (#1859)
* Eliminate the use of Picasso.

This gets rid of the single use of the Picasso library (which was causing
the whole library to be imported and shipped) and replaces it with Glide.
TODO: replace this and the other instance(s) of Glide usage with Fresco,
or vice versa.

* Remove dependency on Glide.

This removes the dependency on Glide, as well as the SVG rendering
library, whose only purpose was to display a single SVG image in the
Notification activity. Unfortunately Android doesn't support SVG natively,
but Echo notifications have icons that are SVG formatted. Rather than
import a bunch of heavy libraries to support this single case of SVG
rendering, we can simply create a few local drawables that correspond to
the different types of notifications, and use them instead.

* Remove multidex!

Multidex is a killer of performance and should be avoided at all costs.

* Remove further unused bits.

* Remove final vestige of multidex.
2018-08-30 14:40:17 +03:00
Vivek Maskara
e13e2c2f40 Fix issue where beta prod flavour could not be installed at the same time (#1841) 2018-08-20 13:59:14 +03:00
misaochan
61888f7456 Merge remote-tracking branch 'refs/remotes/origin/2.8-release' 2018-08-14 17:59:48 +10:00
Josephine Lim
b17957dbb1
Versioning and changelog for v2.8.1 (#1827)
* Versioning for v2.8.1

* Update changelog.md

* Fix changelog.md typo
2018-08-14 17:58:32 +10:00
misaochan
98ed7beb33 Merge remote-tracking branch 'refs/remotes/origin/2.8-release' 2018-08-08 17:38:01 +10:00
Josephine Lim
634814e9d0
Versioning and changelog for v2.8.0 (#1812)
* Increment version number to 87

Because 86 used for alpha release

* Update changelog.md
2018-08-08 17:36:56 +10:00
misaochan
f46da6639c Merge branch 'master' of https://github.com/commons-app/apps-android-commons 2018-08-04 19:29:55 +10:00
Mansi449
e4c518ccce removed repeated implementation statements 2018-08-03 11:48:01 +09:00
misaochan
d05cf395d8 Merge remote-tracking branch 'origin/2.8-release' into 2.8-release
# Conflicts:
#	app/build.gradle
#	app/src/main/java/fr/free/nrw/commons/di/CommonsApplicationModule.java
2018-07-28 23:39:15 +10:00
Vivek Maskara
386bd0a106
Merge gamification branch with master (#1752)
* Quiz  (#1629)

*  Layout inflated

*  Layout for mcq added

*  Inflated Basic Layout

*  Implemented basic flow

*  Added the basic implementation pf score

*  Added the result layout

*  Added the result layout

*  Added functionality to set result

*  Changed the launcher intent to Quiz Activity for testing purpose

*  Explanations of answers added

*  Improved the layout of quiz result a bit

*  Fixed some minor issues

*  Fixed build issues

* Api Added and basic structure for calling implemented

* Added intents

*  Added the title

*  Fixed image error and improved quality of pr

*  Made separate class for checking quiz

*  Added counter

* Implemented back and next for quiz result

*  Added back functionality to quiz

*  Added progressBar

*  Fixed bugs

*  Improved code quality

*  Imporved code Quality

*  Updated strings

*  Added share screenshot function

*  Added checks and improved UI

*  Removed unused string

*  Removed unused string

* Adding checks and improving code quality

* Changed string

* Improved code quality

* Update strings.xml

* Update MediaWikiApi.java

* Fix build
2018-07-28 01:09:23 +05:30
Tanvi Dadu
e9c0aa22ea Feedback module (#1742)
*  Implemented Statistics

*  Basic Structure Implemented

*  Layout made screen independent and menu inflated

*  Share Screenshot using cache

*  Improved the Image Bound and added strings

*  Improved the quality of Pr

*  Wired to navigation drawer

*  Changed the bounds of the image

*  Added Info icon

* Removed the unecessary functionality

*  Updated JavaDocs and fetch the username

*  Fetch JsonObject from the api using JavaRx and OkHttp

* Added JavaDocs and improved quality

* fixed strings file

*  Improved the quality of pr

*  Render thanks , images used in articles on screen

*  fetch and rendered the upload count

*  FeaturedImages statistics rendered and Javadocs added

*  added ProgressBar

*  Added Class for calculating level

*  added level info and returned level info

*  level up info rendered on achievement activity

*  Inflated Level Number

*  Added the structure for badge

*  Added LevelUpInfo Programmetically on Drawable

*  aligned the text

*  changed the text

*  Implemented the structure for changing colour of drawable

*  Added functionality to change colours of badge during runtime

*  Added custom alert for share option

*  Improved the UI of screen

*  Added the alertDialog for info button

*  Improved the quality of PR

*  Added Builder model

*  Added Enum Model and increased levels to 15

* removed redundant class

*  Changed strings and added subtext

* Feedback Module: Add reverts rate parameter (#1649)

* Fetched Revert Count

* Refactored Achievements class and display the fetched results

* Refactored the levelController to include revert as parameter

*  Fixed error

*  Fixed bug

*  Added information for parameters and improved code quality

*  Javadocs added

*  Added null check and javadocs

*  Removed extra spaces
2018-07-26 13:12:51 +05:30
Vivek Maskara
25b463901f Fix conflict between different product flavors (#1726)
* Fix conflict between different product flavors so that beta and prod apps could coexist

* Fix category content provider
2018-07-20 02:03:28 +10:00
ShridharGoel
a083373285
Merge branch 'master' into master 2018-07-17 20:16:42 +05:30
misaochan
107729cdf0 Merge remote-tracking branch 'refs/remotes/origin/2.8-release'
# Conflicts:
#	app/build.gradle
2018-07-05 01:00:51 +10:00
Shridhar Goel
90705996a8 Fixes crash when uploading image via share without logging in 2018-06-28 19:57:11 +05:30
Nicolas Raoul
8859ff91e8 Merge Mapbox update from master 2018-06-28 03:04:07 +10:00
Nicolas Raoul
c1c178c576 Fix nearby crash by updating to Mapbox version that includes telem 2.2.10 (#1666) 2018-06-28 02:18:16 +10:00
Madhur Gupta
2cfbb67f1c Added Basic Pic Of the Day App Widget (#1523)
* Added Basic Pic Of the Day App Widget

* Added Java Lib for XML to JSON

* Added missing json library from xml to json

* Undone formatting

* Consolidate the networking libraries - drop volley in favor of OkHttp

* Extracted a few networking related items into a new Dagger module and finished the process of mocking the main component for tests.

* Refactoring to extract GpsCategoryModel and ensure single-responsibility-principle is maintained in CategoryApi.

* Updated PicOfDayAppWidget class to parse HTML

* fixed featured image back bug

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

* Javadocs added

* Add option to set image as wallpaper (#1535)

* Add option to set image as wallpaper

* Added java docs

* Toast message on setting the wallpaper successfully

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

* Add dependencies to com.android.support.test.rules and runner

Needed for ActivityTestRule used in SettingsActivityTest

* Added Basic Pic Of the Day App Widget

* Added Java Lib for XML to JSON

* Added missing json library from xml to json

* Undone formatting

* Updated PicOfDayAppWidget class to parse HTML
2018-06-14 19:10:52 +10:00
Josephine Lim
da28d4f945 Versioning and changelog for v2.7.2 (#1610)
* Versioning for v2.7.2

* Update changelog.md
2018-06-12 19:57:34 +10:00
misaochan
699d150fed Merge remote-tracking branch 'refs/remotes/origin/2.7.x-release' 2018-06-12 19:43:21 +10:00
Josephine Lim
89defc5a33
Versioning and changelog for v2.7.2 (#1610)
* Versioning for v2.7.2

* Update changelog.md
2018-06-11 17:29:29 +10:00
maskara
e46228205e Merge branch 'master' of https://github.com/commons-app/apps-android-commons into wikidataEdits 2018-06-03 12:52:16 +05:30
Yusuke Matsubara
c123767ae0 Add dependencies to com.android.support.test.rules and runner
Needed for ActivityTestRule used in SettingsActivityTest
2018-06-01 15:37:59 +09:00
Vivek Maskara
0e86741cc4
Merge branch 'master' into wikidataEdits 2018-05-31 10:02:38 +05:30
Vivek Maskara
4815e93fc9 Make P18 edits to corresponding wikidata entity on uploading from Nearby (#1495)
* Localisation updates from https://translatewiki.net.

* Integrate API for displaying featured images (#1456)

* Integrate API for displaying featured images

* Add pagination and refactor code so that it can be reused for category images

* Add license info to the images

* Fix author view

* Remove unused values

* Fix minor issues with featured images

* Fix null license url issue

* Remove some log lines

* Fix back navigation issue

* fix tests

* fix test inits

* Gracefully handling various error situations

* Added java docs

* Update pull_request_template.md (#1476)

* Update pull_request_template.md

* Remove Javadocs mention

* Added required/optional notes

* resolves #1464 : MediaDataExtractor is making inefficient (redundant) server calls (#1496)

* Open map of place where picture was taken (#1360)

* Intent to map added

*  Merge conflicts resolved

*  Added the functionality to hide FAB incase of null coordinate

*  Merge Conflict resolved

*  Improve pr quality

* Improve Quality

*  Added nested FAB animations

* Nested FAB implemented

*  Improve Quality

*  Added up arrow

*  Javadocs Added

* Add nearby tutorial (#1467)

* Add dependency for MaterialShowcase

* Add actionview class to get a reference to material showcase

* Create a NearbyMaterialShowcaseSequence class

* Apply sequence steps

* Add first three steps of nearby showcase

* Add sequence id constants to make sure they will be displayed only once

* Add last step of sequence to explain plus fab

* Create an object to prevent customize all sequences every time

* Fix typo

* Code cleanup

* Add strings to strings.xml

* Code cleanup

* Revert irrelevant change

* Revert irrelevant change

* Remove showcaseview for recenter button

* Use single showcaseView instead of sequence

* Add single showcase view insted of sequence to be able to edit text style

* Make sure it will be displayed only once

* Cleanup

* Update strings

* Change dismiss text style

* CONTRIBUTING: fix formatting of the gist of the guidelines (#1453)

* CONTRIBUTING: fix formatting of the gist of the guidelines

First level headings for a gist seems to be overkill.

So, replace first level headings with an ordered-list which
sounds more meaningful.

* CONTRIBUTING: specify clearly that 'blame' is a feature of "Git"

The contributing file specifies about the ability to know who wrote
something without the need of @author javadoc tags but incorrectly
attributes the feature to GitHub.

Correctly attribute the feature to where it belongs, Git, and specify
the name of the feature to help users easily take advantage of it.

* Feature/switch to butterknife (#1494)

* Implemented butterknife in MediaDetailFragment [issue #1491]

* Implemented butterknife in MediaDetailPagerFragment [[issue #1491]]

* post merge upstream master wip [[issue #1491]]

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

* Bug fix #1504 (#1506)

* Bug fix #1504

* Filtered messages with ConnectException [issue #1504]

* A generalised message for exceptions in Nearby Activity [issue #1504]

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

* Fix security exception crash while accessing network location provider (#1498)

* Fix security exception crash while accessing network location provider

* Added java docs

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

* Log P18 edits to wikidata corresponding wikidata entity on uploading a nearby image

* Added java docs

* Fix test build

* Refresh nearby

* Refresh nearby list on successful edit

* Java docs

* Make authenticated wikidata edits

* Updated toast message to show entity name that was edited
2018-05-31 11:00:17 +10:00
neslihanturan
f0b8039778
Merge pull request #1449 from psh/consolidate-networking-libraries-step-1
Code cleanup + automated testing around GPS Categories
2018-05-27 08:41:03 +03:00
Anubhav Gupta
ae1cc86b03 Fixfor#1493 (#1548)
Update gradle dependencies
2018-05-26 03:40:12 +10:00
Paul Hawke
32cb8df9ae Consolidate the networking libraries - drop volley in favor of OkHttp 2018-05-25 01:42:12 -05: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
neslihanturan
8eed630ee5 Add nearby tutorial (#1467)
* Add dependency for MaterialShowcase

* Add actionview class to get a reference to material showcase

* Create a NearbyMaterialShowcaseSequence class

* Apply sequence steps

* Add first three steps of nearby showcase

* Add sequence id constants to make sure they will be displayed only once

* Add last step of sequence to explain plus fab

* Create an object to prevent customize all sequences every time

* Fix typo

* Code cleanup

* Add strings to strings.xml

* Code cleanup

* Revert irrelevant change

* Revert irrelevant change

* Remove showcaseview for recenter button

* Use single showcaseView instead of sequence

* Add single showcase view insted of sequence to be able to edit text style

* Make sure it will be displayed only once

* Cleanup

* Update strings

* Change dismiss text style
2018-05-18 16:52:11 +05:30
Vivek Maskara
30d7b5d35c Integrate API for displaying featured images (#1456)
* Integrate API for displaying featured images

* Add pagination and refactor code so that it can be reused for category images

* Add license info to the images

* Fix author view

* Remove unused values

* Fix minor issues with featured images

* Fix null license url issue

* Remove some log lines

* Fix back navigation issue

* fix tests

* fix test inits

* Gracefully handling various error situations

* Added java docs
2018-05-18 16:52:11 +05:30
neslihanturan
2a98bd21ce Add nearby tutorial (#1467)
* Add dependency for MaterialShowcase

* Add actionview class to get a reference to material showcase

* Create a NearbyMaterialShowcaseSequence class

* Apply sequence steps

* Add first three steps of nearby showcase

* Add sequence id constants to make sure they will be displayed only once

* Add last step of sequence to explain plus fab

* Create an object to prevent customize all sequences every time

* Fix typo

* Code cleanup

* Add strings to strings.xml

* Code cleanup

* Revert irrelevant change

* Revert irrelevant change

* Remove showcaseview for recenter button

* Use single showcaseView instead of sequence

* Add single showcase view insted of sequence to be able to edit text style

* Make sure it will be displayed only once

* Cleanup

* Update strings

* Change dismiss text style
2018-05-07 22:05:20 +10:00
Vivek Maskara
9845a6265d Integrate API for displaying featured images (#1456)
* Integrate API for displaying featured images

* Add pagination and refactor code so that it can be reused for category images

* Add license info to the images

* Fix author view

* Remove unused values

* Fix minor issues with featured images

* Fix null license url issue

* Remove some log lines

* Fix back navigation issue

* fix tests

* fix test inits

* Gracefully handling various error situations

* Added java docs
2018-05-07 11:09:23 +03:00
neslihanturan
3c2cc26d3b
Fix conflicts from #1366 fixing lint issues (#1470)
* lint issue #171 - added Locale.getDefault()

* lint issue #171 - added Locale.getDefault()

* lint issue #171 - added %d

* lint issue #171 - Changed version

* lint issue #171 - added singleLine="true"

* lint issue #171 - changed commit to apply

* lint issue #171 - added Locale.getDefault()

* lint issue #171 - added Locale.getDefault()

* Codacy issues #778 - nested if loop

* Codacy issues #778 - nested if loop

* Revert "lint issue #171 - added %d" since we dont edit translated string files

This reverts commit e4917cddcf.
2018-04-30 14:05:47 +03:00
Tanvi Dadu
9c91d7a799 Zoom (#1300)
*  Basic Zoom feature added along with button to control it

*  Pinch Zoom added

*  Merge Conflicts Resolved

*  Icons Changed

*  Compressed the high resolution images

* Fixed null pointer exception

* Fixed null pointer exception

*  Fixed exception

*  Fixed error

*  Fixed Resource availability issue
2018-04-26 03:18:58 +05:30
misaochan
d6a4188cb1 Merge remote-tracking branch 'refs/remotes/origin/2.7.x-release'
# Conflicts:
#	app/src/main/java/fr/free/nrw/commons/nearby/NearbyActivity.java
2018-04-23 20:14:21 +10:00
Josephine Lim
533297dce7
Versioning and changelog for v2.7.1 (#1457)
* Versioning

* Update changelog.md
2018-04-20 15:28:42 +10:00
Paul Hawke
22772c851e Moved tests over to Kotlin. (#1428) 2018-04-08 17:59:20 +10:00
Tanvi Dadu
0205274dd5 Fix Acra (#1414)
*  update Acra

*  Update to latest version
2018-04-03 02:15:28 +10:00
Josephine Lim
c6f728a6ed
Versioning and changelog for v2.7.0 (#1392)
* Update changelog.md

* Versioning for v2.7.0
2018-03-31 03:57:15 +10:00
Vivek Maskara
6eaac1de40
Merge branch 'master' into notificationFixes 2018-03-24 12:44:09 +05:30
maskara
238d96afe7 Remove duplicates from gradle file 2018-03-22 01:18:22 +05:30
maskara
e5c8e40b76 Suggested changes for notification fixes 2018-03-21 10:26:32 +05:30
maskara
21a6b1f00c Fixes in notifications for pending issues 2018-03-21 10:26:32 +05:30
knightshade
ad97ad24d4 Fixes app crash when tutorial mode in landscape mode.
Fixes #1287
2018-03-12 02:54:59 +05:30
Madhur Gupta
de673eb4ca Add Forgot Password Option in LoginActivity (#1242)
* Add Forgot Password Option in LoginActivity

* Add Forgot Password Option in LoginActivity

* Add Forgot Password Option in LoginActivity

* Update URL for the "beta" flavor

* Update forgotPassword function
2018-03-10 23:00:05 +05:30