-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathdocs.html
209 lines (184 loc) · 20.5 KB
/
docs.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Commons Mobile App</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
</head>
<body>
<nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a href="./index.html" class="navbar-brand mb-0 h1">Commons Mobile App</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item"><a class="nav-link scroll" href="./index.html#description">About</a></li>
<li class="nav-item"><a class="nav-link scroll" href="./index.html#community">Community</a></li>
<li class="nav-item"><a class="nav-link scroll" href="./index.html#features">Features</a></li>
<li class="nav-item"><a class="nav-link scroll" href="./index.html#usage">Usage</a></li>
<li class="nav-item"><a class="nav-link scroll" href="./index.html#photo-guide">Photo Guidelines</a></li>
<li class="nav-item"><a class="nav-link scroll" href="#docs">Documentation</a></li>
<li class="nav-item "><btn class="nav-link scroll toggle-theme"></btn>
</ul>
</div> <!-- .collapse -->
</div> <!-- .container -->
</nav>
<div class="container text-left my-3" id="docs">
<p>To upload a picture, please follow <a href="index.html#usage">these instructions</a>.</p>
<h2 id="language-fallback"><a href="#language-fallback">Why am I seeing foreign languages?</a></h2>
<p>When a label, caption or description is not available in your language, the app falls back to another language. We consider it is better than showing nothing. For instance, a person whose phone is in Hindi might be happy to see English descriptions of items for which a Hindi description is not available.</p>
<p>Of course, you are more than welcome to contribute labels and descriptions in your language. To do so, please tap the Wikidata barcode icon in Nearby, or "View file page", or "View item page". This will open the website where translations can be contributed. Thanks a lot!</p>
<h2 id="geotagging"><a href="#geotagging">Location</a></h2>
<p>Pictures with geolocation data are much more valuable, so please enable geotagging in your camera app. Here is how to do on Pixel phones: tap on the settings button at the bottom-left of the camera main screen, tap "More settings", enable "Save location". In other camera apps it may be labelled <b>Location (tags)</b> or <b>GPS (tags)</b>.</p>
<p>If your phone's GPS is slow to start, before taking pictures considering launching the free <a href="https://play.google.com/store/apps/details?id=com.silentlexx.gpslock">GPS Locker</a> app. It will prevent the GPS from going to sleep. Please be aware that it consumes battery power, though.</p>
<p>If the Commons app tells you that pictures do not have location, even though you took them after enabling location in your camera app, then follow these steps:</p>
<ol>
<li>In the Commons Android app's settings, enable "Use document based photo picker".</li>
<li>Install an EXIF viewer app and check whether the pictures actually have location or not. Some galleries also can show a map if location is present, for instance on the Google Photos app this is achieved by swiping up. If there is no location, try a different camera app.</li>
<li>If that does not fix the issue, try uninstalling and reinstalling the Commons Android app.</li>
<li>If that still does not fix the issue, try resetting cache and storage of both your camera app and your gallery app. Do not forget to turn on "save location" on the camera app.</li>
</ol>
<p>Even if you add location to a picture in Google Photos, that location is not readable by other apps such as Commons (see the "Share a photo with a location" section of <a href="https://support.google.com/photos/answer/6153599">this Google Photos Help Center article</a>).</p>
<h2 id="need-to-be-anonymous"><a href="#need-to-be-anonymous">Need to be anonymous?</a></h2>
<p>Pictures you upload may lead to your identity. Let's say you live under a dictatorship and take a picture revealing leaders corruption: you want to upload the picture to Commons but you probably do not want to be identified as the photographer or as the uploader. Below are a few steps you can take to reduce the risks of being identified, but remember that zero risk does not exist.</p>
<ol>
<li>Use a VPN.</li>
<li>Remove the EXIF from your picture. Only a few persons on Earth use the same camera model, same firmware version, same settings as you, and all of this information is available in the EXIF, making it easy to link from this picture to your other pictures. The application <a href="https://gitlab.com/juanitobananas/scrambled-exif">Scrambled Exif</a> (<a href="https://f-droid.org/packages/com.jarsilio.android.scrambledeggsif/">F-Droid</a> , <a href="https://play.google.com/store/apps/details?id=com.jarsilio.android.scrambledeggsif">Google Play</a> ) makes the process easy.</li>
<li>Create a throwaway Wikimedia account without an email address, and only use it for that picture or set of pictures. Then afterwards avoid modifying these pictures with your usual account.</li>
<li>Even lens/camera imperfections might theoretically allow a very motivated organization to match your pictures.</li>
</ol>
<h2 id="editing"><a href="#editing">Editing your picture before upload</a></h2>
<p>Most editors degrade picture quality, making pictures less accurate <b>and</b> bigger in file size. If you need to edit a picture before upload, please try to only use <a href="https://github.com/lossless-jpg/data#readme">lossless JPEG editors</a>.</p>
<p><a href="https://play.google.com/store/apps/details?id=jp.kame.jpegcropper">JPEG Cropper</a> allows lossless rotation, lossless cropping, and even lets you blur parts of a picture without recompressing the surrounding areas.</p>
<p>Between taking a picture and uploading it, please do not apply color filters, flip horizontally/vertically, add stickers/text, nor apply any restoration/AI/upscaling. Such operations lose original data. If you really want to apply such transformations, please upload the original first, then upload the transformed picture as a new version using <a href="https://commons.wikimedia.org">the desktop website</a>.</p>
<h2 id="fixing-errors-in-nearby"><a href="#fixing-errors-in-nearby">Fixing errors in Nearby</a></h2>
<p>Nearby is a fantastic way to find interesting places. But imagine that you go to the place pinned on the map, and it is not at all what was expected? In such cases, fixing the problem is very important, and you can do it easily! It will benefit not only Commons but also all other Wikimedia projects and in particular Wikipedia. Here is how to proceed:</p>
<h3 id="obsolete-items"><a href="#obsolete-items">Obsolete items</a></h3>
<p><b>Scenario</b>: Yes there used to be a castle here, but now there is absolutely nothing left, maybe it is just green fields or a factory or recent houses. There is not even a plaque indicating that there used to be a castle.</p>
<p><b>How to fix it</b>: With the place selected, tap the bottom bar that shows the place name. In the toolbar that appears, tap the Wikidata icon (which looks like a barcode). As the mobile Wikidata website does not allow statements edition, either open that page on a desktop web browser (via the "<i>Share</i>" button) or go to the three-dots menu and open the page in your web browser app, enable Desktop mode, and remove the "<i>m.</i>" part from the URL. On the Wikidata item page, click on "Add statement", type "<i>ended</i>" and select the "<i>dissolved, demolished or abolished date</i>" property that appears. In the field that appears besides, enter the date at which the item disappeared, or if you don't know when that happened just set it to "<i>unknown value</i>" by clicking the small icon that looks like 3 stacked rectangles at the left of the field. Finally, press "<i>publish</i>".</p>
<img class="shadow my-2 img-fluid" src="https://upload.wikimedia.org/wikipedia/commons/c/c1/Wikidata_screenshot_-_Add_statement.png" alt="">
<img class="shadow my-2 img-fluid" src="https://upload.wikimedia.org/wikipedia/commons/5/5c/Wikidata_screenshot_-_select_%22ended%22_property.png" alt="">
<img class="shadow my-2 img-fluid" src="https://upload.wikimedia.org/wikipedia/commons/5/5f/Wikidata_screenshot_-_date.png" alt="">
<img class="shadow my-2 img-fluid" src="https://upload.wikimedia.org/wikipedia/commons/0/0c/Wikidata_screenshot_-_custom-no-unknown_value_menu.png" alt="">
<img class="shadow my-2 img-fluid" src="https://upload.wikimedia.org/wikipedia/commons/1/1c/Wikidata_screenshot_-_unknown_value.png" alt="">
<h3 id="wrong-coordinates"><a href="#wrong-coordinates">Wrong coordinates</a></h3>
<p><b>Scenario</b>: The pin shows the "Bodleian Library" here, but actually you know this library it is at a different place, maybe 10 meters across the street or even a few kilometers away. Make sure your GPS is correct, and double-check locations.</p>
<p><b>How to fix it</b>: With the place selected, tap the bottom bar that shows the place name. In the toolbar that appears, tap the Wikidata icon (which looks like a barcode). As the mobile Wikidata website does not allow statements edition, either open that page on a desktop web browser (via the "<i>Share</i>" button) or go to the three-dots menu and open the page in your web browser app, enable Desktop mode, and remove the "<i>m.</i>" part from the URL. On the Wikidata item's page, find the "<i>coordinate location</i>" statement, click its "<i>edit</i>" button, and click on what looks like a grey point surrounded by two white triangles, at the left. It will popup the rank selector, select "<i>Deprecated rank</i>". Then click "<i>add value</i>" and enter the right location (most latitude/longitude formats are accepted), and click the "<i>publish</i>" button. Finally, go to the talk page and explain why you think this is the real location. Erroneous data often comes from external databases, deprecating rather than replacing gives these databases valuable feedback and prevents the erroneous data from being imported again into Wikidata.</p>
<h2 id="nearby-query"><a href="#nearby-query">Customizing the Nearby query</a></h2>
<p>You can customize the Nearby query to show things that interest you, show labels in your preferred languages, etc. The Nearby query is written in SPARQL, which is very powerful but also hard to debug. We suggest you start from the default query and modify things little by little. The good news is that you can always go back to the default: just reset and apply. You can copy/paste various queries as text files or email drafts and paste the one you want to use when the need arises.</p>
<p>The names of the outputs can not be changed.</p>
<p>Variable names are replaced by the app before executing the query.</p>
<h2 id="app-versions"><a href="#app-versions">App versions</a></h2>
<p>To know what version of the app you are using, open the "About" dialog and check the string immediately below the "Commons" title.</p>
<p>This string also tells you what channel you are using:</p>
<ol>
<li>Stable if the version string contains one dot. Example: 3.0</li>
<li>Beta if the version string contains two dots. Example: 3.0.1</li>
<li>Alpha if the version string contains three dots. Example: 3.0.1.1019</li>
</ol>
<p>If you want to switch back to a previous version, please <a href="https://github.com/commons-app/apps-android-commons/releases">download the source of the corresponding version</a> and <a href="https://github.com/commons-app/commons-app-documentation/blob/master/android/Quick-start-guide-for-Developers.md#building-the-source-code">build the 'prod' flavor of the APK</a> and install it (you may need to uninstall first).</p>
<h2 id="getting-app-logs-from-android-studio"><a href="#getting-app-logs-from-android-studio">Getting app logs from Android Studio</a></h2>
<p>How to get app logs if you encounter an issue:</p>
<ol>
<li>On your computer, <a href="https://developer.android.com/studio/">download</a> and <a href="https://developer.android.com/studio/install">install</a> Android Studio.</li>
<li>On your phone, <a href="https://developer.android.com/studio/debug/dev-options#enable">enable developer options and USB debugging</a>.</li>
<li>Connect your phone to your computer with a USB cable.</li>
<li><a href="https://developer.android.com/studio/debug/am-logcat#running">View the logs</a>.</li>
</ol>
<h2 id="get-content"><a href="#get-content">What is Document based picker?</a></h2>
<p>The Commons app lets you pick what picture(s) you want to upload, using either the camera button or what we call a "picker". The "custom picker" has an icon that includes a small Commons logo, because it has Commons-specific features such as checking whether a picture exists on the Commons server or not. The "normal picker" now has two variants: the "Document based picker" and the "Media picker" (you may choose your favourite variant from Settings). To sum up, the app now has 3 pickers:</p>
<p>
<ul>
<li>The custom picker that you may use in the Contributions tab:</li>
<center>
<figure>
<img src="images/custom_picker.jpeg" height="400">
<figcaption>Custom Picker</figcaption>
</figure>
</center>
<li>The Document based picker that you may use in the Contributions and Nearby tabs:</li>
<center>
<figure>
<img src="images/classic_picker.png" height="400">
<figcaption>Document based picker</figcaption>
</figure>
</center>
<li>The media picker that you may try in the Contributions and Nearby tab, it varies from device to device:
<center>
<figure>
<img src="images/get_content_picker_without_takeover.png" height="400">
<figcaption>The traditional media picker (does not strip location)</figcaption>
</figure>
<figure>
<img src="images/get_content_picker_with_takeover.png" height="460">
<figcaption>The new media picker (strips location)</figcaption>
</figure>
</center>
</li>
</ul>
</p>
<h4>How is the new media picker (a.k.a new Android picker) different from the Document based picker?</h4>
<p>Android recently introduced a new photo picker for devices having Android 11 or higher. Unfortunately, this photo picker removes location tags from the EXIF metadata of images.</p>
<p>In order to preserve location information, we decided to go with the Document based picker by default and skipped the new Android picker.</p>
<p>To summarize the advantages and disadvantages:</p>
<p><b>Media Picker:</b>
<ul>
<li><b>Merits:</b> The traditional media picker lists all image providers as marked in red in the figure above, user-friendly interface. You may open the traditional media picker within the new media picker via "Browse" by following the steps mentioned in the next section.</li>
<li><b>Demerit:</b> The new media picker removes location tags from EXIF metadata.</li>
</ul>
</p>
<p><b>Document based Picker:</b>
<ul>
<li><b>Merit:</b> Preserves location tags on all devices.</li>
<li><b>Demerit:</b> Only allows selection from within the app and Google Drive, no third-party image providers displayed.</li>
</ul>
</p>
<p>You may like to use the Document based picker when:</p>
<ul>
<li>You want to share the location information present in the EXIF metadata of the images</li>
<li>You choose images from within the file picker and do not use any other Gallery app providers</li>
</ul>
<p>You may like to use the media picker when:</p>
<ul>
<li>You love sharing images from third-party Gallery apps and other such providers and prefer the existing UI</li>
<li>You are using a device in which the media picker does not strip location. Please refer to the images above to identify if your media picker strips location.</li>
<li>You do not wish to share the location information in the EXIF metadata and want to use the new Android picker.</li>
</ul>
<h4>Can we enjoy the third-party Gallery apps even while using the new Android photo picker?</h4>
<p>Absolutely yes! You can either use 'Browse' within the new Android picker or disable the "takeover" on your device by running a simple command. This will enable the app to display all image providers, allowing you to use them within the app.</p>
<h5>Method 1: Using 'Browse' within the new Android picker</h5>
<p1>To open the system file picker with all the third-party Gallery apps listed, follow the steps given below:</p1>
<ol>
<li>Ensure that the new Android picker is enabled in the Settings.</li>
<li>Open the normal picker. This will open the new Android picker for you.</li>
<li>Tap the options icon (the three-dots at the top right corner).</li>
<li>Click Browse.</li>
<img src="images/new_android_picker_browse.gif" height="400">
<li>Tap the hamburger icon (the three horizontal bars on the top left corner).</li>
</ol>
<p>You can now enjoy all the third-party apps without losing image location!</p>
<h5>Method 2: Using adb commands</h5>
<p>To run the adb commands, follow these steps:</p>
<ol>
<li>Enable developer options and USB debugging on your phone.</li>
<li>Connect your phone to your computer using a USB cable.</li>
<li>Open the terminal on your computer.</li>
<li>To ensure that your phone is connected to the adb server, run the following command:</li>
<pre><code>adb devices -l</code></pre>
<li>Once you have confirmed the connection, execute the following command to disable the takeover:</li>
<pre><code>adb shell cmd device_config put storage_native_boot take_over_get_content false</code></pre>
</ol>
<p>Now you can easily access all the image providers without losing picture locations while using the new Android picker!</p>
<p align="right"><i><a href="https://github.com/commons-app/commons-app.github.io/blob/master/docs.html">Edit this page</a></i></p>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>
<script src="js/index.js"></script>
</body>
</html>