Skip to content

Commit e2bd4ae

Browse files
chore: Release 0.8.0 (#2371)
chore: Release 0.8.0
2 parents 905b8d9 + cbe5ce8 commit e2bd4ae

Some content is hidden

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

60 files changed

+502
-265
lines changed

‎.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,8 @@ script:
2424
- ./gradlew build
2525
after_success:
2626
- bash scripts/update-apk.sh
27+
28+
branches:
29+
only:
30+
- master
31+
- development

‎CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## How to Contribute
2-
2+
First please go through the [Open Source Developer Guide and Best Practices at FOSSASIA](https://blog.fossasia.org/open-source-developer-guide-and-best-practices-at-fossasia/)
33
### Raising an issue:
44
This is an Open Source project and we would be happy to see contributors who report bugs and file feature requests submitting pull requests as well.
55
This project adheres to the Contributor Covenant code of conduct.

‎README.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,27 @@
55
[![Mailing List](https://img.shields.io/badge/Mailing%20List-FOSSASIA-blue.svg)](https://groups.google.com/forum/#!forum/open-event)
66
[![Twitter Follow](https://img.shields.io/twitter/follow/eventyay.svg?style=social&label=Follow&maxAge=2592000?style=flat-square)](https://twitter.com/eventyay)
77

8-
An events app to discover events happening around the world using the Open Event Platform on Eventyay.com.
8+
An events app to discover events happening around the world using the Open Event Platform on [Eventyay](https://eventyay.com).
9+
10+
Eventyay Attendee App provides following features for users:
11+
- All events by the organizers can be viewed
12+
- Functionality to filter out events by date, time, location and event name
13+
- Users can buy tickets and register as attendees for any event
14+
- Pay for their orders via PayPal and Stripe
15+
- All important event details such as location, date, and timing of the event can be viewed
16+
- Users can view all the tickets bought for an event with their status
17+
- Easy check-in using QR code for Tickets and see check-in timings
18+
- Users can view similar events
19+
- Users have the privilege to mark an event as favorite
920

1021
Application is available here:
1122

1223
<a href='https://play.google.com/store/apps/details?id=com.eventyay.attendee'><img alt='Get it on Google Play' src='docs/images/ic_play_store.png' height="80"/></a>
1324
<a href='https://f-droid.org/en/packages/com.eventyay.attendee/'><img alt='Get it on F-Droid' src='docs/images/ic_fdroid.png' height="80"/></a>
1425

15-
## Roadmap
16-
17-
Planned features & enhancements are:
18-
19-
20-
2126
## Communication
2227

23-
Please join our mailing list to discuss questions regarding the project: https://groups.google.com/forum/#!forum/open-event
28+
Please join our mailing list to discuss questions regarding the project [here](https://groups.google.com/forum/#!forum/open-event)
2429

2530
Our chat channel is on gitter [here](https://gitter.im/fossasia/open-event-attendee-android)
2631

@@ -32,19 +37,20 @@ Our chat channel is on gitter [here](https://gitter.im/fossasia/open-event-atten
3237
<td><img src = "fastlane/metadata/android/en-US/images/phoneScreenshots/screenshot_3.jpg"></td>
3338
</tr>
3439
<tr>
40+
<td><img src = "fastlane/metadata/android/en-US/images/phoneScreenshots/screenshot_4.jpg"></td>
3541
<td><img src = "fastlane/metadata/android/en-US/images/phoneScreenshots/screenshot_5.jpg"></td>
3642
<td><img src = "fastlane/metadata/android/en-US/images/phoneScreenshots/screenshot_6.jpg"></td>
37-
<td><img src = "fastlane/metadata/android/en-US/images/phoneScreenshots/screenshot_7.jpg"></td>
3843
</tr>
3944
<tr>
45+
<td><img src = "fastlane/metadata/android/en-US/images/phoneScreenshots/screenshot_7.jpg"></td>
4046
<td><img src = "fastlane/metadata/android/en-US/images/phoneScreenshots/screenshot_8.jpg"></td>
4147
<td><img src = "fastlane/metadata/android/en-US/images/phoneScreenshots/screenshot_9.jpg"></td>
4248
</tr>
4349
</table>
4450

4551
## Development
4652

47-
A native Android app using Kotlin for writing code.
53+
A native Android app using Kotlin for writing code and [Open event server](https://github.com/fossasia/open-event-server) for API.
4854

4955
### Libraries used and their documentation
5056

@@ -58,6 +64,10 @@ A native Android app using Kotlin for writing code.
5864
- JSON API Converter [Docs](https://github.com/jasminb/jsonapi-converter)
5965
- OkHttp [Docs](http://square.github.io/okhttp/)
6066
- Room Persistence Library [Docs](https://developer.android.com/topic/libraries/architecture/room)
67+
- PayPal [Docs](https://github.com/paypal/PayPal-Android-SDK)
68+
- Navigation Architecture Component [Docs](https://developer.android.com/guide/navigation/navigation-getting-started)
69+
- Mapbox [Docs](https://docs.mapbox.com/)
70+
- Stetho [Docs](https://github.com/facebook/stetho)
6171

6272
### Project Conventions
6373

@@ -108,13 +118,7 @@ Please help us follow the best practices to make it easy for the reviewer as wel
108118
* If you would like to work on an issue, drop in a comment at the issue. If it is already assigned to someone, but there is no sign of any work being done, please free to drop in a comment so that the issue can be assigned to you if the previous assignee has dropped it entirely.
109119

110120
## For Testers: Testing the App
111-
If you are a tester and want to test the app, you have two ways to do that:
112-
1. **Installing APK on your device:** You can get debug APK as well as Release APK in apk branch of the repository. After each PR merge, both the APKs are automatically updated. So, just download the APK you want and install it on your device. The APKs will always be the latest one.
113-
114-
## Open Event Attendee Android Suggestions
115-
116-
- Suggestion form link: [Form](https://docs.google.com/forms/d/e/1FAIpQLSd7Y1T1xoXeYaAG_b6Tu1YYK-jZssoC5ltmQbkUX0kmDZaKYw/viewform)
117-
- Suggestion responses link: [Sheet](https://docs.google.com/spreadsheets/d/1SzR75MBEVrTY1sDM3KAMm9wltiulDAp0QT5hv9eJkKM/edit#gid=1676755229)
121+
**Installing APK on your device:** You can get debug APK as well as Release APK in apk branch of the repository. After each PR merge, both the APKs are automatically updated. So, just download the APK you want and install it on your device. The APKs will always be the latest one.
118122

119123
## License
120124

‎app/build.gradle

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id "com.diffplug.gradle.spotless" version "3.24.2"
2+
id "com.diffplug.gradle.spotless" version "3.24.3"
33
}
44

55
apply plugin: 'com.android.application'
@@ -11,6 +11,7 @@ apply plugin: "com.github.b3er.local.properties"
1111

1212
def STRIPE_API_TOKEN = System.getenv('STRIPE_API_TOKEN') ?: "YOUR_API_KEY"
1313
def MAPBOX_KEY = System.getenv('MAPBOX_KEY') ?: "pk.eyJ1IjoiYW5nbWFzMSIsImEiOiJjanNqZDd0N2YxN2Q5NDNuNTBiaGt6eHZqIn0.BCrxjW6rP_OuOuGtbhVEQg"
14+
def PAYPAL_CLIENT_ID= System.getenv('PAYPAL_CLIENT_ID') ?: "YOUR_API_KEY"
1415
def LOCAL_KEY_PRESENT = project.hasProperty('SIGNING_KEY_FILE') && rootProject.file(SIGNING_KEY_FILE).exists()
1516

1617
android {
@@ -22,8 +23,8 @@ android {
2223
applicationId "com.eventyay.attendee"
2324
minSdkVersion 21
2425
targetSdkVersion 28
25-
versionCode 14
26-
versionName "0.7.0"
26+
versionCode 15
27+
versionName "0.8.0"
2728
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2829
vectorDrawables.useSupportLibrary = true
2930
multiDexEnabled true
@@ -58,6 +59,7 @@ android {
5859
buildConfigField "String", "DEFAULT_BASE_URL", '"https://api.eventyay.com/v1/"'
5960
buildConfigField "String", "MAPBOX_KEY", '"'+MAPBOX_KEY+'"'
6061
buildConfigField "String", "STRIPE_API_KEY", '"'+STRIPE_API_TOKEN+'"'
62+
buildConfigField "String", "PAYPAL_CLIENT_ID", '"'+PAYPAL_CLIENT_ID+'"'
6163
resValue "string", "FRONTEND_HOST", "eventyay.com"
6264
if (LOCAL_KEY_PRESENT || TRAVIS_BUILD)
6365
signingConfig signingConfigs.release
@@ -66,6 +68,7 @@ android {
6668
buildConfigField "String", "DEFAULT_BASE_URL", '"https://open-event-api-dev.herokuapp.com/v1/"'
6769
buildConfigField "String", "MAPBOX_KEY", '"'+MAPBOX_KEY+'"'
6870
buildConfigField "String", "STRIPE_API_KEY", '"'+STRIPE_API_TOKEN+'"'
71+
buildConfigField "String", "PAYPAL_CLIENT_ID", '"'+PAYPAL_CLIENT_ID+'"'
6972
resValue "string", "FRONTEND_HOST", "open-event-fe.netlify.com"
7073
}
7174
}
@@ -121,22 +124,22 @@ repositories {
121124
}
122125

123126
dependencies {
124-
def lifecycle_version = "2.2.0-alpha03"
127+
def lifecycle_version = "2.2.0-alpha05"
125128
def koin_version = "2.0.1"
126129
def roomVersion = "2.1.0"
127-
def ktx_version = "1.0.0"
128-
def ktx2_version = "2.0.0"
129-
def nav_version = "2.1.0-beta02"
130+
def ktx_version = "1.1.0"
131+
def ktx2_version = "2.1.0"
132+
def nav_version = "2.1.0"
130133
def anko_version = "0.10.8"
131134
def paging_version = "2.1.0"
132135

133136
implementation fileTree(dir: 'libs', include: ['*.jar'])
134137
implementation 'androidx.multidex:multidex:2.0.1'
135-
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
138+
implementation 'androidx.appcompat:appcompat:1.1.0'
136139
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
137140
implementation 'androidx.cardview:cardview:1.0.0'
138-
implementation 'androidx.recyclerview:recyclerview:1.1.0-beta03'
139-
implementation 'com.google.android.material:material:1.1.0-alpha09'
141+
implementation 'androidx.recyclerview:recyclerview:1.1.0-beta04'
142+
implementation 'com.google.android.material:material:1.1.0-alpha10'
140143
implementation "androidx.browser:browser:1.0.0"
141144
implementation 'androidx.exifinterface:exifinterface:1.0.0'
142145
implementation "androidx.lifecycle:lifecycle-extensions:${lifecycle_version}"
@@ -146,7 +149,7 @@ dependencies {
146149
implementation "androidx.room:room-rxjava2:${roomVersion}"
147150
kapt "androidx.room:room-compiler:${roomVersion}"
148151
testImplementation "androidx.room:room-testing:${roomVersion}"
149-
implementation 'androidx.preference:preference:1.1.0-rc01'
152+
implementation 'androidx.preference:preference:1.1.0'
150153
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
151154

152155
// KTX
@@ -172,24 +175,24 @@ dependencies {
172175

173176
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.9.6"
174177
implementation 'com.github.jasminb:jsonapi-converter:0.9'
175-
implementation 'com.squareup.okhttp3:logging-interceptor:4.1.0'
176-
implementation 'com.squareup.retrofit2:retrofit:2.6.1'
177-
implementation 'com.squareup.retrofit2:converter-jackson:2.6.1'
178+
implementation 'com.squareup.okhttp3:logging-interceptor:4.2.1'
179+
implementation 'com.squareup.retrofit2:retrofit:2.6.2'
180+
implementation 'com.squareup.retrofit2:converter-jackson:2.6.2'
178181

179182
// Cards Shimmer Animation
180183
implementation 'com.facebook.shimmer:shimmer:0.5.0'
181184

182185
// RxJava
183186
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
184187
implementation 'io.reactivex.rxjava2:rxkotlin:2.4.0'
185-
implementation 'io.reactivex.rxjava2:rxjava:2.2.11'
186-
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.1'
188+
implementation 'io.reactivex.rxjava2:rxjava:2.2.12'
189+
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.2'
187190

188191
// Picasso
189192
implementation 'com.squareup.picasso:picasso:2.71828'
190193

191194
// Stripe
192-
implementation 'com.stripe:stripe-android:10.3.0'
195+
implementation 'com.stripe:stripe-android:11.1.4'
193196

194197
// QR Code
195198
implementation 'com.journeyapps:zxing-android-embedded:3.6.0'
@@ -203,7 +206,7 @@ dependencies {
203206
implementation "org.jetbrains.anko:anko-design:$anko_version"
204207

205208
//Mapbox java sdk
206-
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:4.8.0'
209+
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:4.9.0'
207210

208211
// SimpleCropView
209212
implementation 'com.isseiaoki:simplecropview:1.1.8'
@@ -215,7 +218,7 @@ dependencies {
215218
testImplementation 'com.github.iamareebjamal:stetho-noop:1.2.1'
216219

217220
//LeakCanary
218-
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-beta-2'
221+
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-beta-3'
219222

220223
// Paging
221224
implementation "androidx.paging:paging-runtime:$paging_version"
@@ -231,11 +234,13 @@ dependencies {
231234
implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'
232235

233236

237+
//PayPal
238+
implementation 'com.paypal.sdk:paypal-android-sdk:2.16.0'
234239

235240
testImplementation 'junit:junit:4.12'
236241
testImplementation 'org.threeten:threetenbp:1.4.0'
237242
testImplementation "org.koin:koin-test:$koin_version"
238-
testImplementation 'androidx.arch.core:core-testing:2.0.1'
243+
testImplementation 'androidx.arch.core:core-testing:2.1.0'
239244
androidTestImplementation 'androidx.test:runner:1.2.0'
240245
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
241246
}

‎app/schemas/org.fossasia.openevent.general.OpenEventDatabase/9.json

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"formatVersion": 1,
33
"database": {
44
"version": 9,
5-
"identityHash": "dfbd417bf9235824cb59ac1a0a03fa1f",
5+
"identityHash": "ceaeb211922de9668d95362a86917dac",
66
"entities": [
77
{
88
"tableName": "Event",
@@ -701,7 +701,7 @@
701701
},
702702
{
703703
"tableName": "Attendee",
704-
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `firstname` TEXT, `lastname` TEXT, `email` TEXT, `address` TEXT, `city` TEXT, `state` TEXT, `country` TEXT, `jobTitle` TEXT, `phone` TEXT, `taxBusinessInfo` TEXT, `billingAddress` TEXT, `homeAddress` TEXT, `shippingAddress` TEXT, `company` TEXT, `workAddress` TEXT, `workPhone` TEXT, `website` TEXT, `blog` TEXT, `github` TEXT, `facebook` TEXT, `twitter` TEXT, `gender` TEXT, `isCheckedIn` INTEGER, `checkinTimes` TEXT, `isCheckedOut` INTEGER NOT NULL, `pdfUrl` TEXT, `ticketId` TEXT, `event` INTEGER, `ticket` INTEGER, PRIMARY KEY(`id`), FOREIGN KEY(`event`) REFERENCES `Event`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`ticket`) REFERENCES `Ticket`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
704+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `firstname` TEXT, `lastname` TEXT, `email` TEXT, `address` TEXT, `city` TEXT, `state` TEXT, `country` TEXT, `jobTitle` TEXT, `phone` TEXT, `taxBusinessInfo` TEXT, `billingAddress` TEXT, `homeAddress` TEXT, `shippingAddress` TEXT, `company` TEXT, `workAddress` TEXT, `workPhone` TEXT, `website` TEXT, `blog` TEXT, `github` TEXT, `facebook` TEXT, `twitter` TEXT, `gender` TEXT, `isCheckedIn` INTEGER, `checkinTimes` TEXT, `isCheckedOut` INTEGER NOT NULL, `pdfUrl` TEXT, `ticketId` TEXT, `checkedIn` TEXT, `checkedOut` TEXT, `event` INTEGER, `ticket` INTEGER, PRIMARY KEY(`id`), FOREIGN KEY(`event`) REFERENCES `Event`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`ticket`) REFERENCES `Ticket`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
705705
"fields": [
706706
{
707707
"fieldPath": "id",
@@ -871,6 +871,18 @@
871871
"affinity": "TEXT",
872872
"notNull": false
873873
},
874+
{
875+
"fieldPath": "checkedIn",
876+
"columnName": "checkedIn",
877+
"affinity": "TEXT",
878+
"notNull": false
879+
},
880+
{
881+
"fieldPath": "checkedOut",
882+
"columnName": "checkedOut",
883+
"affinity": "TEXT",
884+
"notNull": false
885+
},
874886
{
875887
"fieldPath": "event",
876888
"columnName": "event",
@@ -994,7 +1006,7 @@
9941006
},
9951007
{
9961008
"tableName": "Order",
997-
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `paymentMode` TEXT, `country` TEXT, `status` TEXT, `amount` REAL NOT NULL, `identifier` TEXT, `orderNotes` TEXT, `completedAt` TEXT, `city` TEXT, `address` TEXT, `createdAt` TEXT, `zipcode` TEXT, `paidVia` TEXT, `discountCodeId` TEXT, `ticketsPdfUrl` TEXT, `transactionId` TEXT, `isBillingEnabled` INTEGER NOT NULL, `taxBusinessInfo` TEXT, `company` TEXT, `event` INTEGER, `attendees` TEXT NOT NULL, PRIMARY KEY(`id`))",
1009+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `paymentMode` TEXT, `country` TEXT, `status` TEXT, `amount` REAL NOT NULL, `identifier` TEXT, `orderNotes` TEXT, `completedAt` TEXT, `state` TEXT, `city` TEXT, `address` TEXT, `createdAt` TEXT, `zipcode` TEXT, `paidVia` TEXT, `discountCodeId` TEXT, `ticketsPdfUrl` TEXT, `transactionId` TEXT, `isBillingEnabled` INTEGER NOT NULL, `taxBusinessInfo` TEXT, `company` TEXT, `isExpired` INTEGER, `event` INTEGER, `attendees` TEXT NOT NULL, PRIMARY KEY(`id`))",
9981010
"fields": [
9991011
{
10001012
"fieldPath": "id",
@@ -1044,6 +1056,12 @@
10441056
"affinity": "TEXT",
10451057
"notNull": false
10461058
},
1059+
{
1060+
"fieldPath": "state",
1061+
"columnName": "state",
1062+
"affinity": "TEXT",
1063+
"notNull": false
1064+
},
10471065
{
10481066
"fieldPath": "city",
10491067
"columnName": "city",
@@ -1110,6 +1128,12 @@
11101128
"affinity": "TEXT",
11111129
"notNull": false
11121130
},
1131+
{
1132+
"fieldPath": "isExpired",
1133+
"columnName": "isExpired",
1134+
"affinity": "INTEGER",
1135+
"notNull": false
1136+
},
11131137
{
11141138
"fieldPath": "event",
11151139
"columnName": "event",
@@ -2211,7 +2235,7 @@
22112235
"views": [],
22122236
"setupQueries": [
22132237
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
2214-
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'dfbd417bf9235824cb59ac1a0a03fa1f')"
2238+
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'ceaeb211922de9668d95362a86917dac')"
22152239
]
22162240
}
22172241
}

‎app/src/main/AndroidManifest.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@
3737
<data
3838
android:scheme="https"
3939
android:host="@string/FRONTEND_HOST"/>
40+
<data
41+
android:pathPrefix="/e"/>
42+
<data
43+
android:pathPrefix="/reset-password"/>
44+
<data
45+
android:pathPrefix="/email"/>
46+
4047
</intent-filter>
4148
</activity>
4249
<provider

‎app/src/main/java/org/fossasia/openevent/general/OpenEventDatabase.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import androidx.room.RoomDatabase
55
import androidx.room.TypeConverters
66
import org.fossasia.openevent.general.attendees.Attendee
77
import org.fossasia.openevent.general.attendees.AttendeeDao
8-
import org.fossasia.openevent.general.attendees.AttendeeIdConverter
9-
import org.fossasia.openevent.general.attendees.ListAttendeeIdConverter
8+
import org.fossasia.openevent.general.attendees.AttendeeConverter
9+
import org.fossasia.openevent.general.attendees.ListAttendeeConverter
1010
import org.fossasia.openevent.general.attendees.forms.CustomForm
1111
import org.fossasia.openevent.general.auth.User
1212
import org.fossasia.openevent.general.auth.UserDao
@@ -59,7 +59,7 @@ import org.fossasia.openevent.general.ticket.TicketIdConverter
5959
Settings::class, Proposal::class, Tax::class], version = 9)
6060
@TypeConverters(EventIdConverter::class, EventTopicConverter::class, EventTypeConverter::class,
6161
EventSubTopicConverter::class, TicketIdConverter::class, MicroLocationConverter::class, UserIdConverter::class,
62-
AttendeeIdConverter::class, ListAttendeeIdConverter::class, SessionTypeConverter::class, TrackConverter::class,
62+
AttendeeConverter::class, ListAttendeeConverter::class, SessionTypeConverter::class, TrackConverter::class,
6363
SpeakersCallConverter::class, ListSpeakerIdConverter::class)
6464
abstract class OpenEventDatabase : RoomDatabase() {
6565

‎app/src/main/java/org/fossasia/openevent/general/attendees/Attendee.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ data class Attendee(
5353
val isCheckedOut: Boolean = false,
5454
val pdfUrl: String? = null,
5555
val ticketId: String? = null,
56+
val checkedIn: String? = null,
57+
val checkedOut: String? = null,
5658
@ColumnInfo(index = true)
5759
@Relationship("event")
5860
var event: EventId? = null,
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package org.fossasia.openevent.general.attendees
2+
3+
import androidx.room.TypeConverter
4+
import com.fasterxml.jackson.databind.ObjectMapper
5+
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
6+
7+
class AttendeeConverter {
8+
9+
@TypeConverter
10+
fun toAttendee(json: String): Attendee? {
11+
return jacksonObjectMapper().readerFor(Attendee::class.java).readValue<Attendee>(json)
12+
}
13+
14+
@TypeConverter
15+
fun toJson(attendee: Attendee?) = ObjectMapper().writeValueAsString(attendee)
16+
}

0 commit comments

Comments
 (0)
close