Skip to content

Commit 1268254

Browse files
authored
Merge pull request #460 from miltonials/pr-361-trace-to-gh
New functionality to upload trace in a zip file with your media files to GitHub
2 parents 152fbdf + 17ed4d1 commit 1268254

File tree

67 files changed

+2190
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+2190
-7
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: "Bug Report"
2+
description: "Report an issue or bug with OSMTracker for Android."
3+
labels: "bug"
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: "**Thank you for reporting a bug! Before reporting, please have a look at the [Q&A](https://github.com/labexp/osmtracker-android/discussions/categories/q-a), make sure the issue has no duplicate and hasn't been already addressed by searching through [the existing and past issues](https://github.com/labexp/osmtracker-android/issues).\nPlease fill out the following details to help us diagnose the issue.**"
8+
9+
- type: textarea
10+
id: description
11+
attributes:
12+
label: "Description"
13+
description: "Provide a clear and concise description of the issue."
14+
placeholder: "Describe the issue here..."
15+
validations:
16+
required: true
17+
18+
- type: textarea
19+
id: steps_to_reproduce
20+
attributes:
21+
label: "Steps to Reproduce"
22+
description: "Please list the steps to reproduce the issue."
23+
value: |
24+
1.
25+
2.
26+
3.
27+
placeholder: "Step-by-step instructions..."
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
id: logs
33+
attributes:
34+
label: "Logs or Console Errors (if applicable)"
35+
description: |
36+
If available, please paste or attach any relevant logs or error messages.
37+
- On Android, you can use [adb logcat](https://developer.android.com/studio/command-line/logcat) to capture logs.
38+
render: "plaintext"
39+
validations:
40+
required: false
41+
42+
- type: textarea
43+
id: screenshots
44+
attributes:
45+
label: "Screenshots or Videos (Optional)"
46+
description: "Attach any relevant screenshots or videos."
47+
validations:
48+
required: false
49+
50+
- type: input
51+
id: android_version
52+
attributes:
53+
label: "Android Version"
54+
placeholder: "e.g., Android 12"
55+
validations:
56+
required: true
57+
58+
- type: input
59+
id: device_model
60+
attributes:
61+
label: "Device Model"
62+
placeholder: "e.g., Samsung Galaxy S21"
63+
validations:
64+
required: true
65+
66+
- type: checkboxes
67+
id: submission_checklist
68+
attributes:
69+
label: "Submission Checklist"
70+
description: "Please confirm the following before submitting:"
71+
options:
72+
- label: "I am reporting an issue, not asking a question."
73+
required: true
74+
- label: "I have updated to the latest OSMTracker version, and the issue still exists."
75+
required: true
76+
- label: "I have checked the Q&A Discussions, open and closed issues, and the wiki, but did not find a solution."
77+
required: false

.github/ISSUE_TEMPLATE/config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: "Questions about OSMTracker"
4+
url: "https://github.com/labexp/osmtracker-android/discussions/categories/q-a"
5+
about: "Ask questions and discuss with the OSMTracker community in GitHub Discussions."
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: "Documentation Report"
2+
description: "Report errors or suggest improvements for project documentation."
3+
labels: "documentation"
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: "**Thank you for helping us improve our documentation! Please complete the following information to help us address the issue efficiently.**"
8+
9+
- type: textarea
10+
id: description
11+
attributes:
12+
label: "Description"
13+
description: "Explain the problem or the section that needs improvement in the documentation."
14+
placeholder: "Describe the documentation issue here..."
15+
validations:
16+
required: true
17+
18+
- type: textarea
19+
id: affected_section
20+
attributes:
21+
label: "Affected Section"
22+
description: "Indicate which part of the documentation contains the error. This can be specified using a URL, section, or specific page."
23+
placeholder: "E.g., https://example.com/docs/section or 'Installation Guide' section or page 3 of PDF manual..."
24+
validations:
25+
required: true
26+
27+
- type: textarea
28+
id: error_found
29+
attributes:
30+
label: "Error Found"
31+
description: "Describe what is wrong. This could be: lack of clarity, spelling/grammar errors, outdated information, or missing information."
32+
placeholder: "Detail the specific error or issue found..."
33+
validations:
34+
required: true
35+
36+
- type: textarea
37+
id: improvement_proposal
38+
attributes:
39+
label: "Improvement Proposal (optional)"
40+
description: "How should the documentation be corrected or improved?"
41+
placeholder: "Suggest how the documentation could be improved..."
42+
validations:
43+
required: false
44+
45+
- type: textarea
46+
id: error_evidence
47+
attributes:
48+
label: "Evidence of Error (optional)"
49+
description: "Provide evidence of the error, such as screenshots, manual captures, videos, or examples."
50+
placeholder: "Upload or describe evidence of the documentation issue..."
51+
validations:
52+
required: false
53+
54+
- type: checkboxes
55+
id: submission_checklist
56+
attributes:
57+
label: "Submission Checklist"
58+
description: "Please confirm the following before submitting:"
59+
options:
60+
- label: "I have verified that this documentation issue hasn't been reported previously."
61+
required: true
62+
- label: "I have provided specific details about the location of the issue in the documentation."
63+
required: true
64+
- label: "The information I've provided is accurate and clear."
65+
required: true
+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: "Feature Request"
2+
description: "Suggest an enhancement or new feature for OSMTracker for Android."
3+
labels: "enhancement"
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: "**Thank you for suggesting a new feature! Before submitting your request, please review the [Discussions](https://github.com/labexp/osmtracker-android/discussions) and make sure this feature hasn't already been requested by searching through [existing issues](https://github.com/labexp/osmtracker-android/issues).\nPlease complete the following details to help us better understand your proposal.**"
8+
9+
- type: textarea
10+
id: description
11+
attributes:
12+
label: "Description"
13+
description: "Briefly explain the requested functionality."
14+
placeholder: "Describe the feature here..."
15+
validations:
16+
required: true
17+
18+
- type: textarea
19+
id: use_cases
20+
attributes:
21+
label: "Use Cases"
22+
description: "Who would use this functionality?"
23+
placeholder: "Describe who would benefit from this feature..."
24+
validations:
25+
required: true
26+
27+
- type: textarea
28+
id: benefits
29+
attributes:
30+
label: "Benefits"
31+
description: "How would this improve OSMTracker?"
32+
placeholder: "Explain how this feature would enhance the application..."
33+
validations:
34+
required: true
35+
36+
- type: textarea
37+
id: alternatives
38+
attributes:
39+
label: "Alternatives"
40+
description: "Are there other options that could be implemented/considered instead?"
41+
placeholder: "Describe alternatives you've considered..."
42+
validations:
43+
required: false
44+
45+
- type: textarea
46+
id: example
47+
attributes:
48+
label: "Example (optional)"
49+
description: "Provide visual or schematic examples of how the feature would look/function."
50+
placeholder: "Attach or describe visual examples..."
51+
validations:
52+
required: false
53+
54+
- type: checkboxes
55+
id: submission_checklist
56+
attributes:
57+
label: "Submission Checklist"
58+
description: "Please confirm the following before submitting:"
59+
options:
60+
- label: "I have verified that this feature hasn't been requested previously."
61+
required: true
62+
- label: "I have provided sufficient information to understand my proposal."
63+
required: true
64+
- label: "I am willing to provide additional information if necessary."
65+
required: true

.github/PULL_REQUEST_TEMPLATE.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[comment]: # (Thank you for your contribution! Please fill out the following details to help us review your pull request.)
2+
3+
### Description
4+
[comment]: # (Provide a clear explanation of the changes in this PR)
5+
[comment]: # (Include information about what problem it solves, how it is implemented, and if it affects UI/API)
6+
7+
8+
9+
### Related issues
10+
[comment]: # (Link to the original bug report or related work in list format, if applicable)
11+
[comment]: # (* Closes: #number)
12+
[comment]: # (* Related to: #number)
13+
14+
15+
##
16+
17+
### Pull Request Checklist
18+
[comment]: # (Please confirm the following before submitting your PR)
19+
[comment]: # (To check a task please put a "x" inside the `[]`)
20+
[comment]: # ([ ] : not done)
21+
[comment]: # ([x] : done)
22+
[comment]: # (Make sure how your PR looks clicking the "Preview" tab at the top of this editor)
23+
24+
- [ ] The PR is proposed to the proper branch.
25+
- [ ] The changes have been tested on the target Android API and minimum Android API.
26+
- [ ] Automated tests have been added (if applicable).
27+
- [ ] The feature is well documented.
28+
- [ ] There is a reference to the original bug report and related work.

CONTRIBUTING.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,4 @@ It's recommended to run the tests locally before making a new pull request to ma
2727

2828
## Translations
2929
OSMTracker is translated using Transifex (see the [wiki](https://github.com/labexp/osmtracker-android/wiki/Translating)).
30-
To update translations:
31-
* Create a python3 virtual environment: `$python3 -m venv .venv` (.venv folder is already added to gitignore file). Remember the virtualenv activates with the command `$source .venv/bin/activate` and deactivates with `deactivate`.
32-
* Install Transifex CLI Client following the instructions in [this page](https://docs.transifex.com/client/installing-the-client#installing-on-macos-and-linux).
33-
* Execute `(.venv) $ tx pull --minimum-perc 1` to get the updated translations with at least 1% of completeness.
30+
Once translations are complete, they will be updated via automated Transifex PR.

app/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ dependencies {
7878
implementation 'org.osmdroid:osmdroid-android:6.1.20'
7979
// OAuth
8080
implementation 'net.openid:appauth:0.11.1'
81+
implementation 'com.android.volley:volley:1.2.1'
8182
// For upload traces to osm server
8283
implementation('de.westnordost:osmapi-traces:3.1') {
8384
// Already included in Android

app/src/main/AndroidManifest.xml

+17-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
android:icon="@drawable/ic_launcher"
2727
android:label="@string/app_name"
2828
android:theme="@style/HighContrast"
29-
android:requestLegacyExternalStorage="true">
29+
android:requestLegacyExternalStorage="true"
30+
android:usesCleartextTraffic="true" >
3031

3132
<uses-library
3233
android:name="org.apache.http.legacy"
@@ -74,6 +75,21 @@
7475
android:scheme="osmtracker"/>
7576
</intent-filter>
7677
</activity>
78+
<activity
79+
android:name=".activity.GitHubUpload"
80+
android:label="Github" />
81+
<activity
82+
android:name=".activity.GitHubConfig"
83+
android:label="Github" />
84+
<activity
85+
android:name=".activity.GitHubNewRepo"
86+
android:label="Github" />
87+
<activity
88+
android:name=".activity.GitHubNewFork"
89+
android:label="Github" />
90+
<activity
91+
android:name=".activity.GitHubPullRequest"
92+
android:label="Github" />
7793
<activity
7894
android:name=".activity.About"
7995
android:label="@string/about" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package net.osmtracker;
2+
3+
public class GitHubUser {
4+
5+
private int id;
6+
private String username;
7+
private String token;
8+
9+
public GitHubUser() {
10+
setId(-1);
11+
setUsername("");
12+
setToken("");
13+
}
14+
15+
public int getId() {
16+
return id;
17+
}
18+
19+
public void setId(int id) {
20+
this.id = id;
21+
}
22+
23+
public String getUsername() {
24+
return username;
25+
}
26+
27+
public void setUsername(String username) {
28+
this.username = username;
29+
}
30+
31+
public String getToken() {
32+
return token;
33+
}
34+
35+
public void setToken(String token) {
36+
this.token = token;
37+
}
38+
}

0 commit comments

Comments
 (0)