diff --git a/app/build.gradle b/app/build.gradle
index 8cbb6eb2fa..2e3ee0842f 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -7,7 +7,7 @@ apply from: 'quality.gradle'
def isRunningOnTravisAndIsNotPRBuild = System.getenv("CI") == "true" && file('../play.p12').exists()
-if(isRunningOnTravisAndIsNotPRBuild) {
+if (isRunningOnTravisAndIsNotPRBuild) {
apply plugin: 'com.github.triplet.play'
}
@@ -83,18 +83,26 @@ dependencies {
testImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$LEAK_CANARY_VERSION"
// Support libraries
- implementation "androidx.legacy:legacy-support-v4:1.0.0"
- implementation "androidx.appcompat:appcompat:1.0.2"
- implementation "com.google.android.material:material:1.1.0-alpha04"
- implementation "androidx.browser:browser:1.0.0"
- implementation "androidx.cardview:cardview:1.0.0"
+ implementation 'androidx.legacy:legacy-support-v4:1.0.0'
+ implementation 'androidx.appcompat:appcompat:1.0.2'
+ implementation 'com.google.android.material:material:1.1.0-alpha04'
+ implementation 'androidx.browser:browser:1.0.0'
+ implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
- implementation "androidx.exifinterface:exifinterface:1.0.0"
+ implementation 'androidx.exifinterface:exifinterface:1.0.0'
//swipe_layout
implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
+ implementation 'com.nineoldandroids:library:2.4.0'
+
+ //image crop
+ implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.+'
+
//metadata extractor
implementation 'com.drewnoakes:metadata-extractor:2.11.0'
+ //implementation fileTree(include:['commons-imaging-1.0-R1401825.jar'], dir: "/media/vanshika/25151b5f-bb91-4813-863c-b418727a0635/vanshika/apps-android-commons/app/libs")
+ implementation files('libs/commons-imaging-1.0-R1401825.jar')
+ annotationProcessor 'com.android.tools.build.jetifier:jetifier-core:1.0.0-beta02'
}
android {
@@ -142,7 +150,7 @@ android {
test.resources.srcDirs += 'src/main/resoures'
}
- signingConfigs {
+ signingConfigs {
release
}
@@ -151,7 +159,7 @@ android {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
testProguardFile 'test-proguard-rules.txt'
- if(isRunningOnTravisAndIsNotPRBuild) {
+ if (isRunningOnTravisAndIsNotPRBuild) {
signingConfig signingConfigs.release
}
}
@@ -163,7 +171,7 @@ android {
versionNameSuffix "-debug-" + getBranchName()
}
}
-
+
if (isRunningOnTravisAndIsNotPRBuild) {
// configure keystore based on env vars in Travis for automated alpha builds
signingConfigs.release.storeFile = file("../nr-commons.keystore")
@@ -180,7 +188,7 @@ android {
productFlavors {
prod {
- applicationId 'fr.free.nrw.commons'
+ applicationId 'fr.free.nrw.commons'
buildConfigField "String", "WIKIMEDIA_API_POTD", "\"https://commons.wikimedia.org/w/api.php?action=featuredfeed&feed=potd&feedformat=rss&language=en\""
buildConfigField "String", "WIKIMEDIA_API_HOST", "\"https://commons.wikimedia.org/w/api.php\""
@@ -257,7 +265,7 @@ android {
buildToolsVersion buildToolsVersion
}
-if(isRunningOnTravisAndIsNotPRBuild) {
+if (isRunningOnTravisAndIsNotPRBuild) {
play {
track = "alpha"
userFraction = 1
diff --git a/app/proguard-rules.txt b/app/proguard-rules.txt
index ca8086c2bc..ed0fc8fe19 100644
--- a/app/proguard-rules.txt
+++ b/app/proguard-rules.txt
@@ -75,3 +75,4 @@
-keep class org.acra.** { *; }
-keepattributes SourceFile,LineNumberTable
-keepattributes *Annotation*
+-keep class android.support.v7.widget.** { *; }
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index dffea644c2..2c1bf3fb39 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -18,17 +18,13 @@
-
-
-
-
+
-
+ android:finishOnTaskLaunch="true"
+ />
@@ -49,11 +45,11 @@
-
-
+ android:label="@string/app_name">
@@ -73,9 +69,9 @@
+ android:label="@string/app_name" />
@@ -83,32 +79,27 @@
android:name=".AboutActivity"
android:label="@string/title_activity_about"
android:parentActivityName=".contributions.MainActivity" />
-
-
-
-
-
-
-
+
+
-
-
-
+ android:parentActivityName=".contributions.MainActivity" />
-
+
+
@@ -169,7 +161,6 @@
android:name="android.content.SyncAdapter"
android:resource="@xml/modifications_sync_adapter" />
-
-
-
-
-
-
+
-
+
\ No newline at end of file
diff --git a/app/src/main/java/fr/free/nrw/commons/filepicker/UploadableFile.java b/app/src/main/java/fr/free/nrw/commons/filepicker/UploadableFile.java
index 21a1607c30..eff43d8f0d 100644
--- a/app/src/main/java/fr/free/nrw/commons/filepicker/UploadableFile.java
+++ b/app/src/main/java/fr/free/nrw/commons/filepicker/UploadableFile.java
@@ -13,6 +13,8 @@
import java.io.File;
import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.util.Date;
import javax.annotation.Nullable;
@@ -33,7 +35,7 @@ public UploadableFile[] newArray(int size) {
};
private final Uri contentUri;
- private final File file;
+ private File file;
public UploadableFile(Uri contentUri, File file) {
this.contentUri = contentUri;
@@ -66,6 +68,15 @@ public Uri getMediaUri() {
return Uri.parse(getFilePath());
}
+ public void updateFilePath(Uri uri){
+ String path = uri.toString();
+ try {
+ file=new File(new URI(path));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
public String getMimeType(Context context) {
return FileUtils.getMimeType(context, getMediaUri());
}
diff --git a/app/src/main/java/fr/free/nrw/commons/upload/EXIFReader.java b/app/src/main/java/fr/free/nrw/commons/upload/EXIFReader.java
index 70e5689563..50b31b6fb3 100644
--- a/app/src/main/java/fr/free/nrw/commons/upload/EXIFReader.java
+++ b/app/src/main/java/fr/free/nrw/commons/upload/EXIFReader.java
@@ -32,7 +32,7 @@ public EXIFReader() {
* And the checks for the presence of EXIF Directories in metadata object
* */
- public Single processMetadata(String path) {
+ public static Single processMetadata(String path) {
Metadata readMetadata = null;
try {
readMetadata = ImageMetadataReader.readMetadata(new File(path));
diff --git a/app/src/main/java/fr/free/nrw/commons/upload/ImageAdapter.java b/app/src/main/java/fr/free/nrw/commons/upload/ImageAdapter.java
new file mode 100644
index 0000000000..9d4b3ca141
--- /dev/null
+++ b/app/src/main/java/fr/free/nrw/commons/upload/ImageAdapter.java
@@ -0,0 +1,62 @@
+package fr.free.nrw.commons.upload;
+
+import android.app.Activity;
+import android.content.Context;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.GridView;
+import android.widget.ImageView;
+
+import com.theartofdev.edmodo.cropper.CropImage;
+
+import java.util.ArrayList;
+
+import fr.free.nrw.commons.filepicker.UploadableFile;
+
+public class ImageAdapter extends BaseAdapter {
+ private Context mContext;
+ private ArrayList files;
+
+ // Constructor
+ public ImageAdapter(Context c, ArrayList files) {
+ this.files = files;
+ mContext = c;
+ }
+
+ public int getCount() {
+ return files.size();
+ }
+
+ public Object getItem(int position) {
+ return null;
+ }
+
+ public long getItemId(int position) {
+ return 0;
+ }
+
+ // create a new ImageView for each item referenced by the Adapter
+ public View getView(int position, View convertView, ViewGroup parent) {
+ ImageView imageView;
+
+ if (convertView == null) {
+ imageView = new ImageView(mContext);
+ imageView.setLayoutParams(new GridView.LayoutParams(250, 250));
+ imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
+ imageView.setPadding(8, 8, 8, 8);
+ } else {
+ imageView = (ImageView) convertView;
+ }
+ imageView.setImageURI(files.get(position).getMediaUri());
+
+ return imageView;
+ }
+
+ public void handleClickListener(int position){
+ CropImage.activity(files.get(position).getMediaUri())
+ .start((Activity) mContext);
+ }
+
+ // Keep all Images in array
+}
diff --git a/app/src/main/java/fr/free/nrw/commons/upload/UploadActivity.java b/app/src/main/java/fr/free/nrw/commons/upload/UploadActivity.java
index 7ef5717ab1..5586811d74 100644
--- a/app/src/main/java/fr/free/nrw/commons/upload/UploadActivity.java
+++ b/app/src/main/java/fr/free/nrw/commons/upload/UploadActivity.java
@@ -36,7 +36,12 @@
import com.jakewharton.rxbinding2.view.RxView;
import com.jakewharton.rxbinding2.widget.RxTextView;
import com.pedrogomez.renderers.RVRendererAdapter;
+import com.theartofdev.edmodo.cropper.CropImage;
+import org.apache.commons.imaging.ImageReadException;
+import org.apache.commons.imaging.ImageWriteException;
+
+import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -73,6 +78,7 @@
import static fr.free.nrw.commons.contributions.Contribution.SOURCE_EXTERNAL;
import static fr.free.nrw.commons.contributions.ContributionController.ACTION_INTERNAL_UPLOADS;
import static fr.free.nrw.commons.upload.UploadService.EXTRA_FILES;
+import static fr.free.nrw.commons.upload.UploadService.EXTRA_SOURCE;
import static fr.free.nrw.commons.wikidata.WikidataConstants.PLACE_OBJECT;
public class UploadActivity extends BaseActivity implements UploadView, SimilarImageInterface {
@@ -130,10 +136,14 @@ public class UploadActivity extends BaseActivity implements UploadView, SimilarI
@BindView(R.id.submit) Button submit;
@BindView(R.id.license_previous) Button licensePrevious;
@BindView(R.id.rv_descriptions) RecyclerView rvDescriptions;
+ @BindView(R.id.editImage) ImageView editImages;
private DescriptionsAdapter descriptionsAdapter;
private RVRendererAdapter categoriesAdapter;
private ProgressDialog progressDialog;
+ private static int currentItem=0;
+ private String source;
+ private ArrayList files;
@SuppressLint("CheckResult")
@@ -144,6 +154,9 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_upload);
ButterKnife.bind(this);
+ files = getIntent().getParcelableArrayListExtra(EXTRA_FILES);
+ source=getIntent().getStringExtra(EXTRA_SOURCE);
+
configureLayout();
configureTopCard();
configureBottomCard();
@@ -153,6 +166,7 @@ protected void onCreate(Bundle savedInstanceState) {
configureCategories();
configureLicenses();
configurePolicy();
+ configureEditImage(files);
presenter.init();
@@ -354,6 +368,7 @@ public void setBottomCardState(boolean state) {
@Override
public void setBackground(Uri mediaUri) {
+ //if (!updatedImage)
background.setImageURI(mediaUri);
}
@@ -416,6 +431,17 @@ public void hideProgressDialog() {
}
@Override
+ public void openCropImage(Uri uri) {
+ Timber.d(uri.toString());
+ CropImage.activity(uri)
+ .start(this);
+ }
+
+ @Override
+ public void setCurrentItem(int position) {
+ currentItem=position;
+ }
+
public void launchMapActivity(LatLng decCoords) {
Utils.handleGeoCoordinates(this, decCoords);
}
@@ -436,6 +462,36 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == CommonsApplication.OPEN_APPLICATION_DETAIL_SETTINGS) {
//TODO: Confirm if handling manual permission enabled is required
}
+ Uri resultUri;
+ if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {
+ CropImage.ActivityResult result = CropImage.getActivityResult(data);
+ if (resultCode == RESULT_OK) {
+ resultUri = result.getUri();
+ try {
+ resultUri=presenter.restoreEXIFData(files.get(currentItem).getMediaUri(),resultUri);
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (ImageReadException e) {
+ e.printStackTrace();
+ } catch (ImageWriteException e) {
+ e.printStackTrace();
+ }
+
+ files.get(currentItem).updateFilePath(resultUri);
+ Intent shareIntent = new Intent(this, UploadActivity.class);
+ shareIntent.setAction(ACTION_INTERNAL_UPLOADS);
+ shareIntent.putExtra(EXTRA_SOURCE, source);
+ shareIntent.putParcelableArrayListExtra(EXTRA_FILES, new ArrayList<>(files));
+ Place place = directKvStore.getJson(PLACE_OBJECT, Place.class);
+ if (place != null) {
+ shareIntent.putExtra(PLACE_OBJECT, place);
+ }
+ startActivity(shareIntent);
+ finish();
+ } else if (resultCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) {
+ Toast.makeText(this, "Sorry there was an error in editing the image", Toast.LENGTH_SHORT).show();
+ }
+ }
}
/**
@@ -499,6 +555,11 @@ private void configureLayout() {
background.setOnScaleChangeListener((scaleFactor, x, y) -> presenter.closeAllCards());
}
+ private void configureEditImage(ArrayList uri) {
+ editImages.setOnClickListener(v -> {presenter.editImages(uri);
+ });
+ }
+
private void configureTopCard() {
topCardExpandButton.setOnClickListener(v -> presenter.toggleTopCardState());
topCardThumbnails.setLayoutManager(new LinearLayoutManager(this,
diff --git a/app/src/main/java/fr/free/nrw/commons/upload/UploadModel.java b/app/src/main/java/fr/free/nrw/commons/upload/UploadModel.java
index afd59f4caf..56d35e39ec 100644
--- a/app/src/main/java/fr/free/nrw/commons/upload/UploadModel.java
+++ b/app/src/main/java/fr/free/nrw/commons/upload/UploadModel.java
@@ -241,6 +241,9 @@ void jumpTo(UploadItem item) {
UploadItem getCurrentItem() {
return isShowingItem() ? items.get(currentStepIndex) : DUMMY;
}
+ void modifyCurrentItem(int position,UploadItem uploadItem){
+ items.set(position,uploadItem);
+ }
boolean isShowingItem() {
return currentStepIndex < items.size();
@@ -328,8 +331,9 @@ public List getItems() {
@SuppressWarnings("WeakerAccess")
static class UploadItem {
+
private final Uri originalContentUri;
- private final Uri mediaUri;
+ private Uri mediaUri;
private final String mimeType;
private final String source;
private final GPSExtractor gpsCoords;
@@ -412,6 +416,9 @@ public Title getTitle() {
public Uri getMediaUri() {
return mediaUri;
}
+ public void setImageUri(Uri uri){
+ mediaUri=uri;
+ }
public int getImageQuality() {
return this.imageQuality.getValue();
diff --git a/app/src/main/java/fr/free/nrw/commons/upload/UploadPresenter.java b/app/src/main/java/fr/free/nrw/commons/upload/UploadPresenter.java
index 9ddf3ecf1a..a58b962753 100644
--- a/app/src/main/java/fr/free/nrw/commons/upload/UploadPresenter.java
+++ b/app/src/main/java/fr/free/nrw/commons/upload/UploadPresenter.java
@@ -2,6 +2,32 @@
import android.annotation.SuppressLint;
import android.content.Context;
+import android.net.Uri;
+import android.os.Environment;
+
+import com.facebook.common.internal.ByteStreams;
+
+import org.apache.commons.imaging.ImageReadException;
+import org.apache.commons.imaging.ImageWriteException;
+import org.apache.commons.imaging.Imaging;
+import org.apache.commons.imaging.common.IImageMetadata;
+import org.apache.commons.imaging.formats.jpeg.JpegImageMetadata;
+import org.apache.commons.imaging.formats.jpeg.exif.ExifRewriter;
+import org.apache.commons.imaging.formats.tiff.TiffImageMetadata;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+
import fr.free.nrw.commons.R;
import fr.free.nrw.commons.category.CategoriesModel;
import fr.free.nrw.commons.contributions.Contribution;
@@ -16,11 +42,6 @@
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.schedulers.Schedulers;
-import java.util.ArrayList;
-import java.util.List;
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.inject.Singleton;
import timber.log.Timber;
import static fr.free.nrw.commons.upload.UploadModel.UploadItem;
@@ -136,6 +157,65 @@ private void handleImage(Title title, List descriptions, Integer im
}
}
+ void editImages(ArrayList uri){
+ if (uri!=null){
+ if (uri.size()==1)
+ view.openCropImage(Uri.fromFile(uri.get(0).getFile()));
+ else if (uri.size()>1){int c=0;
+ for (UploadableFile u:uri){
+ if (u.getMediaUri().equals(uploadModel.getCurrentItem().getMediaUri())){
+ view.openCropImage(Uri.fromFile(uri.get(c).getFile()));
+ view.setCurrentItem(c);
+ }
+
+ c++;
+ }
+ }
+ }
+ }
+
+ void updateImageUri(int position, Uri uri){
+ UploadItem uploadItem=uploadModel.getCurrentItem();
+ uploadItem.setImageUri(uri);
+ uploadModel.modifyCurrentItem(position,uploadItem);
+ view.setBackground(uploadModel.getCurrentItem().getMediaUri());
+ }
+
+ Uri restoreEXIFData(Uri originalImageUri, Uri postCropUri) throws IOException, ImageReadException, ImageWriteException {
+ InputStream iStream = context.getContentResolver().openInputStream(postCropUri);
+ byte[] inputData = ByteStreams.toByteArray(iStream);
+ TiffImageMetadata metadata = readExifMetadata(originalImageUri);
+ if (metadata == null)
+ return postCropUri;
+ else
+ return writeExifMetadata(readExifMetadata(originalImageUri), inputData);
+ }
+
+ private TiffImageMetadata readExifMetadata(Uri uri) throws ImageReadException, IOException {
+ IImageMetadata imageMetadata = Imaging.getMetadata(new File(uri.getPath()));
+ if (imageMetadata == null) {
+ return null;
+ }
+ JpegImageMetadata jpegMetadata = (JpegImageMetadata)imageMetadata;
+ TiffImageMetadata exif = jpegMetadata.getExif();
+ if (exif == null) {
+ return null;
+ }
+ return exif;
+ }
+ private Uri writeExifMetadata(TiffImageMetadata metadata, byte[] jpegData)
+ throws ImageReadException, ImageWriteException, IOException {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ new ExifRewriter().updateExifMetadataLossless(jpegData, out, metadata.getOutputSet());
+ File myFileName = new File(Environment.getExternalStorageDirectory().getAbsolutePath()+"/My Directory");
+ String filePath = myFileName.toString();
+ try(OutputStream outputStream = new FileOutputStream(new File(filePath))) {
+ out.writeTo(outputStream);
+ }
+ Uri uri = Uri.fromFile(new File(filePath));
+ return uri;
+ }
+
/**
* Called by the next button in {@link UploadActivity}
*/
diff --git a/app/src/main/java/fr/free/nrw/commons/upload/UploadView.java b/app/src/main/java/fr/free/nrw/commons/upload/UploadView.java
index 9fb50c7ca3..5192a94cf3 100644
--- a/app/src/main/java/fr/free/nrw/commons/upload/UploadView.java
+++ b/app/src/main/java/fr/free/nrw/commons/upload/UploadView.java
@@ -5,8 +5,10 @@
import fr.free.nrw.commons.location.LatLng;
import java.lang.annotation.Retention;
+import java.util.ArrayList;
import java.util.List;
+import fr.free.nrw.commons.filepicker.UploadableFile;
import static java.lang.annotation.RetentionPolicy.SOURCE;
public interface UploadView {
@@ -82,4 +84,10 @@ public interface UploadView {
void showProgressDialog();
void hideProgressDialog();
+
+ void openCropImage(Uri uri);
+
+ void setCurrentItem(int position);
+
+
}
diff --git a/app/src/main/res/layout/activity_upload_bottom_card.xml b/app/src/main/res/layout/activity_upload_bottom_card.xml
index ba21ad6efe..2daa46f779 100644
--- a/app/src/main/res/layout/activity_upload_bottom_card.xml
+++ b/app/src/main/res/layout/activity_upload_bottom_card.xml
@@ -107,6 +107,20 @@
app:layout_constraintTop_toBottomOf="@id/bottom_card_title"
tools:text="1st image" />
+
+
Do you still want to upload this picture?
Please only upload pictures that you have taken by yourself. Don\'t upload pictures that you have downloaded from the Internet.
-
Give permission
Use external storage
Save pictures taken with the in-app camera on your device
@@ -274,11 +273,11 @@
Copy the wikitext to the clipboard
The wikitext was copied to the clipboard
- Location has not changed.
- Location not available.
- Permission required to display a list of nearby places
- GET DIRECTIONS
- READ ARTICLE
+ Location has not changed.
+ Location not available.
+ Permission required to display a list of nearby places
+ GET DIRECTIONS
+ READ ARTICLE
Welcome to Wikimedia Commons, %1$s! We\'re glad you\'re here.
%1$s left a message on your talk page
@@ -310,9 +309,9 @@
Tapping this button brings up a list of these places
You can upload a picture for any place from your gallery or camera
- No images found!
- Error occurred while loading images.
- Uploaded by: %1$s
+ No images found!
+ Error occurred while loading images.
+ Uploaded by: %1$s
You are blocked from editing Commons
Pic of the Day
@@ -330,34 +329,34 @@
FEATURED
UPLOADED VIA MOBILE
- Image successfully added to %1$s on Wikidata!
- Failed to update corresponding Wikidata entity!
- Set as wallpaper
- Wallpaper set successfully!
- Quiz
- Is this picture OK to upload?
- Question
- Result
- If you carry on uploading images that require deletion, your account will likely be banned. Are you sure you want to end the quiz?
- More than %1$s of the images you uploaded have been deleted. If you carry on uploading images that require deletion, your account will likely be banned.\n\nWould you like to view the tutorial again and then take a quiz to help you learn what type of images you should or shouldn\'t upload?
- Selfies do not have much encyclopedic value. Please do not upload a picture of yourself unless you already have a Wikipedia article about you.
- Pictures of monuments and outside scenery are OK to upload in most countries. Please note that temporary art installations outside are often copyrighted and not OK to upload.
- Screenshots of websites are considered derivatives works and subject to any copyright on the website itself. These can be used after permission from the author. Without such permission, any art you create based on their work is legally considered an unlicensed copy owned by the original author.
- One of the goals of Commons is to gather quality images. Therefore, blurry images shouldn\'t be uploaded. Always try to take nice pictures with good lighting.
- Pictures showing technology or culture are very welcome on Commons.
- WARNING: More than %1$s of the images you uploaded have been deleted. If you carry on uploading images that require deletion, your account will likely be banned.
- You got %1$s of the answers correct. Congratulations!
- Select one of the two options to answer the question
- Login session expired, please log in again.
- Share your quiz with your friends!
- Continue
- Correct Answer
- Wrong Answer
- Is this screenshot OK to upload?
- Share App
- Coordinates were not specified during image selection
- Error fetching nearby places.
- + Add description
+ Image successfully added to %1$s on Wikidata!
+ Failed to update corresponding Wikidata entity!
+ Set as wallpaper
+ Wallpaper set successfully!
+ Quiz
+ Is this picture OK to upload?
+ Question
+ Result
+ If you carry on uploading images that require deletion, your account will likely be banned. Are you sure you want to end the quiz?
+ More than %1$s of the images you uploaded have been deleted. If you carry on uploading images that require deletion, your account will likely be banned.\n\nWould you like to view the tutorial again and then take a quiz to help you learn what type of images you should or shouldn\'t upload?
+ Selfies do not have much encyclopedic value. Please do not upload a picture of yourself unless you already have a Wikipedia article about you.
+ Pictures of monuments and outside scenery are OK to upload in most countries. Please note that temporary art installations outside are often copyrighted and not OK to upload.
+ Screenshots of websites are considered derivatives works and subject to any copyright on the website itself. These can be used after permission from the author. Without such permission, any art you create based on their work is legally considered an unlicensed copy owned by the original author.
+ One of the goals of Commons is to gather quality images. Therefore, blurry images shouldn\'t be uploaded. Always try to take nice pictures with good lighting.
+ Pictures showing technology or culture are very welcome on Commons.
+ WARNING: More than %1$s of the images you uploaded have been deleted. If you carry on uploading images that require deletion, your account will likely be banned.
+ You got %1$s of the answers correct. Congratulations!
+ Select one of the two options to answer the question
+ Login session expired, please log in again.
+ Share your quiz with your friends!
+ Continue
+ Correct Answer
+ Wrong Answer
+ Is this screenshot OK to upload?
+ Share App
+ Coordinates were not specified during image selection
+ Error fetching nearby places.
+ + Add description
No recent searches
Are you sure you want to clear your search history?
@@ -366,62 +365,62 @@
Nominate For Deletion
DELETE
- Achievements
- STATISTICS
- Thanks Received
- Featured Images
- Images via \"Nearby Places\"
- LEVEL
- Images Uploaded
- Images Not Reverted
- Images Used
- Share your achievements with your friends!
- Your level increases as you meet these requirements. Items in the "statistics" section do not count towards your level.
- minimum required:
- The number of images you have uploaded to Commons, via any upload software
- The percentage of images you have uploaded to Commons that were not deleted
- The number of images you have uploaded to Commons that were used in Wikimedia articles
+ Achievements
+ STATISTICS
+ Thanks Received
+ Featured Images
+ Images via \"Nearby Places\"
+ LEVEL
+ Images Uploaded
+ Images Not Reverted
+ Images Used
+ Share your achievements with your friends!
+ Your level increases as you meet these requirements. Items in the "statistics" section do not count towards your level.
+ minimum required:
+ The number of images you have uploaded to Commons, via any upload software
+ The percentage of images you have uploaded to Commons that were not deleted
+ The number of images you have uploaded to Commons that were used in Wikimedia articles
- Error occurred!
- Commons Notification
+ Error occurred!
+ Commons Notification
- Use custom author name
- Use a custom author name instead of your username while uploading photos
- Custom author name
- The custom author name to use instead of your username in uploads
- Contributions
- Nearby
- Notifications
- Notifications (archived)
- Display nearby notification
- Tap here to see the nearest place that needs pictures
- No nearby places found close to you
- List
+ Use custom author name
+ Use a custom author name instead of your username while uploading photos
+ Custom author name
+ The custom author name to use instead of your username in uploads
+ Contributions
+ Nearby
+ Notifications
+ Notifications (archived)
+ Display nearby notification
+ Tap here to see the nearest place that needs pictures
+ No nearby places found close to you
+ List
- Storage Permission
- We need your permission to access the external storage of your device in order to upload images.
- You won\'t see the nearest place that needs pictures anymore. However, you can re-enable this notification in Settings if you wish.
+ Storage Permission
+ We need your permission to access the external storage of your device in order to upload images.
+ You won\'t see the nearest place that needs pictures anymore. However, you can re-enable this notification in Settings if you wish.
- Step %1$d of %2$d
- Image %1$d in set
- Next
- Previous
- Submit
- A file with the file name %1$s exists. Are you sure you want to proceed?
- No compatible map application could be found on your device. Please install a map application to use this feature.
-
+ Step %1$d of %2$d
+ Image %1$d in set
+ Next
+ Previous
+ Submit
+ A file with the file name %1$s exists. Are you sure you want to proceed?
+ No compatible map application could be found on your device. Please install a map application to use this feature.
+
- %1$d Upload
- %1$d Uploads
- Bookmarks
- Bookmarks
- Pictures
- Locations
- Add/Remove to bookmarks
- Bookmarks
- You haven\'t added any bookmarks
- Bookmarks
- Log collection started. Please RESTART the app, perform action that you wish to log, and then tap \'Send log file\' again
+ Bookmarks
+ Bookmarks
+ Pictures
+ Locations
+ Add/Remove to bookmarks
+ Bookmarks
+ You haven\'t added any bookmarks
+ Bookmarks
+ Log collection started. Please RESTART the app, perform action that you wish to log, and then tap \'Send log file\' again
I uploaded it by mistake
I did not know it would be publicly visible
@@ -433,19 +432,19 @@
Welcome to Commons!\n
Upload your first media by tapping on the add button.
- Worldwide
- America
- Europe
- Middle East
- Africa
- Asia
- Pacific
+ Worldwide
+ America
+ Europe
+ Middle East
+ Africa
+ Asia
+ Pacific
- No Categories Selected
- Images without categories are rarely usable. Are you sure you want to submit without selecting categories?
+ No Categories Selected
+ Images without categories are rarely usable. Are you sure you want to submit without selecting categories?
- Yes, Submit
- No, Go Back
+ Yes, Submit
+ No, Go Back
(For all images in set)
Search this area
@@ -461,8 +460,8 @@ Upload your first media by tapping on the add button.
See the ongoing campaigns
You won\'t see the campaigns anymore. However, you can re-enable this notification in Settings if you wish.
- This function requires network connection, please check your connection settings.
- Upload failed due to issues with edit token. Please try logging out and in again.
+ This function requires network connection, please check your connection settings.
+ Upload failed due to issues with edit token. Please try logging out and in again.
Error occurred while processing the image. Please try again!
Getting token for editing
Adding template for category check
@@ -511,14 +510,14 @@ Upload your first media by tapping on the add button.
Clicking this button will give you another recently uploaded image from Wikimedia Commons
You can review images and improve the quality of Wikimedia Commoms.\n The four parameters of review are: \n - Is this image in-scope? \n - Does this image follow the rules of copyright? \n - Is this image correctly categorized? \n - If all goes well you can also thank the contributor.
-
- - Receiving shared content. Processing the image might take some time depending on the size of the image and your device
- - Receiving shared content. Processing the images might take some time depending on the size of the images and your device
-
+
+ - Receiving shared content. Processing the image might take some time depending on the size of the image and your device
+ - Receiving shared content. Processing the images might take some time depending on the size of the images and your device
+
- No images used
- No images reverted
- No images uploaded
+ No images used
+ No images reverted
+ No images uploaded
You have no unread notifications
You have no archived notifications
@@ -526,9 +525,9 @@ Upload your first media by tapping on the add button.
View archived
View unread
- Error occurred while picking images
- Choose Images to upload
-
+ Error occurred while picking images
+ Choose Images to upload
+ EditUploadActivity
Please wait…
Featured pictures are images from highly skilled photographers and illustrators that the Wikimedia Commons community has chosen as some of the highest quality on the site.
Images Uploaded via Nearby places are the images which are uploaded by discovering places on the map.
diff --git a/build.gradle b/build.gradle
index ad7e27f69c..1399048873 100644
--- a/build.gradle
+++ b/build.gradle
@@ -13,6 +13,7 @@ buildscript {
classpath "com.github.triplet.gradle:play-publisher:2.0.0-rc1"
classpath 'org.codehaus.groovy:groovy-all:2.4.15'
+ classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta02'
}
}
diff --git a/gradle.properties b/gradle.properties
index 4bf0b1e188..735d2bd05e 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -24,4 +24,4 @@ DAGGER_VERSION=2.21
systemProp.http.proxyPort=0
systemProp.http.proxyHost=
android.useAndroidX=true
-android.enableJetifier=true
\ No newline at end of file
+android.enableJetifier=true