Skip to content

Commit 1c019ac

Browse files
chore: Release v1.5.0 (#1841)
chore: Release v1.5.0
2 parents 9c25c7e + 2a31296 commit 1c019ac

File tree

67 files changed

+813
-524
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

+813
-524
lines changed

.github/issue_label_bot.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
label-alias:
2+
bug: 'bug'
3+
feature_request: 'feature'
4+
question: 'question'

.github/release-drafter.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name-template: v$NEXT_PATCH_VERSION 🌈
2-
tag-template: v$NEXT_PATCH_VERSION
1+
name-template: Release v$NEXT_MINOR_VERSION 🌈
2+
tag-template: v$NEXT_MINOR_VERSION
33
categories:
44
- title: 🚀 Features and Enhancements
55
label: feature

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
language: android
2+
dist: trusty
23
sudo: false
34
jdk:
45
- oraclejdk8

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![Codacy Grade](https://img.shields.io/codacy/grade/d6ae120356c94c0d94d6449ec540f520.svg)](https://www.codacy.com/app/mb/open-event-organizer-android)
88
[![Codecov Coverage](https://img.shields.io/codecov/c/github/fossasia/open-event-organizer-android/development.svg)](https://codecov.io/gh/fossasia/open-event-organizer-android)
99
[![Appetize Preview](https://img.shields.io/badge/Preview-appetize.io-673AB7.svg)](https://appetize.io/app/w8v8z7pc9aewargb2uuyf108f0)
10-
[![Gitter](https://img.shields.io/badge/chat-on%20gitter-ff006f.svg)](https://gitter.im/fossasia/open-event-orga-app)
10+
[![Gitter](https://img.shields.io/badge/chat-on%20gitter-ff006f.svg)](https://gitter.im/fossasia/open-event-organizer-android)
1111
[![Twitter Follow](https://img.shields.io/twitter/follow/eventyay.svg?style=social&label=Follow&maxAge=2592000?style=flat-square)](https://twitter.com/eventyay)
1212

1313
Event management app for organizers using Open Event Platform
@@ -25,7 +25,7 @@ Currently, the application is released in alpha phase and available here:
2525
[Google Play](https://play.google.com/store/apps/details?id=com.eventyay.organizer) and [F-Droid](https://f-droid.org/en/packages/com.eventyay.organizer/).
2626

2727
<a href='https://play.google.com/store/apps/details?id=com.eventyay.organizer'><img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png' height="80"/></a>
28-
<a href='https://f-droid.org/en/packages/com.eventyay.organizer/'><img alt='Get it on F-Droid' src='https://f-droid.org/assets/fdroid-logo.svg' height="80"/></a>
28+
<a href='https://f-droid.org/en/packages/com.eventyay.organizer/'><img alt='Get it on F-Droid' src='https://fdroid.gitlab.io/artwork/badge/get-it-on.png' height="80"/></a>
2929

3030
## Roadmap
3131

@@ -44,19 +44,19 @@ Our chat channel is on gitter here: https://gitter.im/fossasia/open-event-orga-a
4444

4545
<table>
4646
<tr>
47-
<td><img src="docs/images/login.png"></td>
48-
<td><img src="docs/images/dashboard_one.png"></td>
49-
<td><img src="docs/images/dashboard_two.png"></td>
47+
<td><img src="fastlane/metadata/android/en-US/images/phoneScreenshots/login.png"></td>
48+
<td><img src="fastlane/metadata/android/en-US/images/phoneScreenshots/dashboard_one.png"></td>
49+
<td><img src="fastlane/metadata/android/en-US/images/phoneScreenshots/dashboard_two.png"></td>
5050
</tr>
5151
<tr>
5252
<td><img src="docs/images/attendees.png"></td>
53-
<td><img src="docs/images/checkin.png"></td>
54-
<td><img src="docs/images/order_checkin.png"></td>
53+
<td><img src="fastlane/metadata/android/en-US/images/phoneScreenshots/checkin.png"></td>
54+
<td><img src="fastlane/metadata/android/en-US/images/phoneScreenshots/order_checkin.png"></td>
5555
</tr>
5656
<tr>
57-
<td><img src="docs/images/create_ticket.png"></td>
58-
<td><img src="docs/images/navigation.png"></td>
59-
<td><img src="docs/images/organizer.png"></td>
57+
<td><img src="fastlane/metadata/android/en-US/images/phoneScreenshots/create_ticket.png"></td>
58+
<td><img src="fastlane/metadata/android/en-US/images/phoneScreenshots/navigation.png"></td>
59+
<td><img src="fastlane/metadata/android/en-US/images/phoneScreenshots/organizer.png"></td>
6060
</tr>
6161
</table>
6262

app/build.gradle

+13-6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ apply plugin: "com.github.b3er.local.properties"
88

99
def app_name = System.getenv('app_name') ?: "Eventyay Organizer"
1010
def GOOGLE_PLACES_API_KEY = System.getenv('GOOGLE_PLACES_API_KEY') ?: "YOUR_API_KEY"
11+
def MAPBOX_ACCESS_TOKEN = System.getenv('MAPBOX_ACCESS_TOKEN') ?: "YOUR_ACCESS_TOKEN"
1112

1213
def LOCAL_KEY_PRESENT = project.hasProperty('SIGNING_KEY_FILE') && rootProject.file(SIGNING_KEY_FILE).exists()
1314

@@ -27,13 +28,14 @@ android {
2728
applicationId "com.eventyay.organizer"
2829
minSdkVersion versions.minSdk
2930
targetSdkVersion versions.targetSdk
30-
versionCode 14
31-
versionName "1.4.0"
31+
versionCode 15
32+
versionName "1.5.0"
3233
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3334
vectorDrawables.useSupportLibrary = true
3435
manifestPlaceholders = [
3536
appName: app_name,
36-
GOOGLE_PLACES_API_KEY: GOOGLE_PLACES_API_KEY
37+
GOOGLE_PLACES_API_KEY: GOOGLE_PLACES_API_KEY,
38+
MAPBOX_ACCESS_TOKEN: MAPBOX_ACCESS_TOKEN
3739
]
3840
}
3941

@@ -63,6 +65,7 @@ android {
6365

6466
buildConfigField "String", "DEFAULT_BASE_URL", '"https://api.eventyay.com/v1/"'
6567
resValue "string", "default_base_url", '"https://api.eventyay.com/v1/"'
68+
resValue "string", "FRONTEND_HOST", "eventyay.com"
6669

6770
if (LOCAL_KEY_PRESENT || TRAVIS_BUILD)
6871
signingConfig signingConfigs.release
@@ -71,6 +74,7 @@ android {
7174
testCoverageEnabled = true
7275
buildConfigField "String", "DEFAULT_BASE_URL", '"https://open-event-api-dev.herokuapp.com/v1/"'
7376
resValue "string", "default_base_url", '"https://open-event-api-dev.herokuapp.com/v1/"'
77+
resValue "string", "FRONTEND_HOST", "open-event-fe.netlify.com"
7478
}
7579
}
7680

@@ -144,7 +148,7 @@ dependencies {
144148
implementation "androidx.appcompat:appcompat:1.1.0-rc01"
145149
implementation "androidx.cardview:cardview:1.0.0"
146150
implementation "androidx.recyclerview:recyclerview:1.1.0-beta01"
147-
implementation "com.google.android.material:material:1.1.0-alpha07"
151+
implementation "com.google.android.material:material:1.1.0-alpha08"
148152
implementation "androidx.browser:browser:1.0.0"
149153
implementation "androidx.palette:palette:1.0.0"
150154
implementation "com.takisoft.fix:preference-v7:${versions.support_lib}.0"
@@ -190,7 +194,7 @@ dependencies {
190194
implementation "com.squareup.retrofit2:retrofit:${versions.retrofit}"
191195
implementation "com.squareup.retrofit2:converter-jackson:${versions.retrofit}"
192196
implementation "com.squareup.retrofit2:adapter-rxjava2:${versions.retrofit}"
193-
implementation 'com.squareup.okhttp3:logging-interceptor:4.0.0'
197+
implementation 'com.squareup.okhttp3:logging-interceptor:4.0.1'
194198
implementation 'com.github.jasminb:jsonapi-converter:0.9'
195199

196200
// RxJava
@@ -255,6 +259,9 @@ dependencies {
255259
// QR Code Scanner
256260
fdroidImplementation 'com.github.blikoon:QRCodeScanner:0.1.2'
257261

262+
// Mapbox
263+
fdroidImplementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-places-v8:0.9.0'
264+
258265
//Testing
259266
androidTestImplementation('androidx.test.espresso:espresso-core:3.2.0', {
260267
exclude group: 'com.android.support', module: 'support-annotations'
@@ -265,7 +272,7 @@ dependencies {
265272
exclude group: 'com.android.support', module: 'support-core-utils'
266273
})
267274
testImplementation 'junit:junit:4.12'
268-
testImplementation 'org.mockito:mockito-inline:2.28.2'
275+
testImplementation 'org.mockito:mockito-inline:3.0.0'
269276
testImplementation 'org.json:json:20180130'
270277
testImplementation "org.robolectric:robolectric:${versions.roboelectric}"
271278
testImplementation "org.robolectric:shadows-multidex:${versions.roboelectric}"

app/src/fdroid/java/com/eventyay/organizer/core/event/create/EventDetailsStepOne.java

+53-49
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
11
package com.eventyay.organizer.core.event.create;
22

3-
import androidx.lifecycle.ViewModelProvider;
4-
import androidx.lifecycle.ViewModelProviders;
5-
import android.content.Intent;
63
import android.content.pm.ApplicationInfo;
74
import android.content.pm.PackageManager;
8-
import androidx.databinding.DataBindingUtil;
5+
import android.graphics.Color;
96
import android.os.Bundle;
10-
import androidx.annotation.NonNull;
11-
import androidx.annotation.Nullable;
127
import android.view.LayoutInflater;
138
import android.view.View;
149
import android.view.ViewGroup;
1510
import android.widget.AdapterView;
1611
import android.widget.ArrayAdapter;
1712

13+
import androidx.annotation.NonNull;
14+
import androidx.annotation.Nullable;
15+
import androidx.databinding.DataBindingUtil;
16+
import androidx.lifecycle.ViewModelProvider;
17+
import androidx.lifecycle.ViewModelProviders;
18+
1819
import com.eventyay.organizer.R;
1920
import com.eventyay.organizer.common.mvp.view.BaseBottomSheetFragment;
2021
import com.eventyay.organizer.data.event.Event;
2122
import com.eventyay.organizer.databinding.EventDetailsStepOneBinding;
23+
import com.eventyay.organizer.ui.ViewUtils;
24+
import com.mapbox.api.geocoding.v5.models.CarmenFeature;
25+
import com.mapbox.mapboxsdk.plugins.places.autocomplete.model.PlaceOptions;
26+
import com.mapbox.mapboxsdk.plugins.places.autocomplete.ui.PlaceAutocompleteFragment;
27+
import com.mapbox.mapboxsdk.plugins.places.autocomplete.ui.PlaceSelectionListener;
2228

2329
import java.util.Arrays;
2430
import java.util.List;
@@ -27,17 +33,13 @@
2733

2834
import timber.log.Timber;
2935

30-
import static android.app.Activity.RESULT_OK;
31-
3236
public class EventDetailsStepOne extends BaseBottomSheetFragment implements EventDetailsStepOneView {
3337

3438
@Inject
3539
ViewModelProvider.Factory viewModelFactory;
3640

3741
private CreateEventViewModel createEventViewModel;
3842
private EventDetailsStepOneBinding binding;
39-
private static final int PLACE_PICKER_REQUEST = 1;
40-
private final LocationPicker locationPicker = new LocationPicker();
4143

4244
public static EventDetailsStepOne newInstance() {
4345
return new EventDetailsStepOne();
@@ -58,7 +60,7 @@ public void onStart() {
5860
int timezoneIndex = createEventViewModel.setTimeZoneList(getTimeZoneList());
5961
setupSpinner();
6062
setDefaultTimeZone(timezoneIndex);
61-
setupPlacePicker();
63+
setupPlacesAutocomplete();
6264
}
6365

6466
private void setupSpinner() {
@@ -82,50 +84,52 @@ public void onNothingSelected(AdapterView<?> parent) {
8284
});
8385
}
8486

85-
private void setupPlacePicker() {
86-
//check if there's a google places API key
87+
private void setupPlacesAutocomplete() {
88+
89+
ApplicationInfo applicationInfo = null;
8790
try {
88-
ApplicationInfo ai = getContext().getPackageManager().getApplicationInfo(getContext().getPackageName(), PackageManager.GET_META_DATA);
89-
Bundle bundle = ai.metaData;
90-
String placesApiKey = bundle.getString("com.google.android.geo.API_KEY");
91-
if ("YOUR_API_KEY".equals(placesApiKey)) {
92-
Timber.d("Add Google Places API key in AndroidManifest.xml file to use Place Picker.");
93-
binding.buttonPlacePicker.setVisibility(View.GONE);
94-
showLocationLayouts();
95-
}
91+
applicationInfo = getContext().getPackageManager().getApplicationInfo(getContext().getPackageName(), PackageManager.GET_META_DATA);
9692
} catch (PackageManager.NameNotFoundException e) {
97-
Timber.e(e, "Package name not found");
93+
Timber.e(e);
9894
}
95+
Bundle bundle = applicationInfo.metaData;
9996

100-
binding.buttonPlacePicker.setOnClickListener(view -> {
101-
boolean success = locationPicker.launchPicker(getActivity());
102-
if (locationPicker.shouldShowLocationLayout() || !success)
103-
showLocationLayouts();
104-
});
105-
}
97+
String mapboxAccessToken = bundle.getString(getString(R.string.mapbox_access_token));
10698

107-
@Override
108-
public void onActivityResult(int requestCode, int resultCode, Intent data) {
109-
super.onActivityResult(requestCode, resultCode, data);
110-
if (requestCode == PLACE_PICKER_REQUEST && resultCode == RESULT_OK) {
111-
//once place is picked from map, make location fields visible for confirmation by user
112-
showLocationLayouts();
113-
//set event attributes
114-
Location location = locationPicker.getPlace(getActivity(), data);
115-
Event event = binding.getEvent();
116-
event.latitude = location.getLatitude();
117-
event.longitude = location.getLongitude();
118-
119-
//auto-complete location fields for confirmation by user
120-
binding.locationName.setText(location.getAddress());
121-
binding.searchableLocationName.setText(
122-
createEventViewModel.getSearchableLocationName(location.getAddress().toString()));
123-
}
124-
}
99+
binding.selectLocationButton.setOnClickListener(view -> {
125100

126-
private void showLocationLayouts() {
127-
binding.layoutSearchableLocation.setVisibility(View.VISIBLE);
128-
binding.layoutLocationName.setVisibility(View.VISIBLE);
101+
if (mapboxAccessToken.equals("YOUR_ACCESS_TOKEN")) {
102+
ViewUtils.showSnackbar(binding.getRoot(), R.string.access_token_required);
103+
return;
104+
}
105+
106+
PlaceAutocompleteFragment autocompleteFragment = PlaceAutocompleteFragment.newInstance(
107+
mapboxAccessToken, PlaceOptions.builder().backgroundColor(Color.WHITE).build());
108+
109+
getFragmentManager().beginTransaction()
110+
.replace(R.id.fragment, autocompleteFragment)
111+
.addToBackStack(null)
112+
.commit();
113+
114+
autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {
115+
@Override
116+
public void onPlaceSelected(CarmenFeature carmenFeature) {
117+
Event event = binding.getEvent();
118+
event.setLatitude(carmenFeature.center().latitude());
119+
event.setLongitude(carmenFeature.center().longitude());
120+
event.setLocationName(carmenFeature.placeName());
121+
event.setSearchableLocationName(carmenFeature.text());
122+
binding.layoutLocationName.setVisibility(View.VISIBLE);
123+
binding.locationName.setText(event.getLocationName());
124+
getFragmentManager().popBackStack();
125+
}
126+
127+
@Override
128+
public void onCancel() {
129+
getFragmentManager().popBackStack();
130+
}
131+
});
132+
});
129133
}
130134

131135
@Override

app/src/fdroid/java/com/eventyay/organizer/core/event/create/LocationPicker.java

-24
This file was deleted.

0 commit comments

Comments
 (0)