Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parcelable implementation for ParseFile #557

Closed

Conversation

johncordeiro
Copy link

This is the implementation of Parcelable interface on ParseFile for remote and local files. It's very useful to pass complex objects through activities, specially when you are using Parse with delegated properties in Kotlin.

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions.

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@johncordeiro
Copy link
Author

Is there anyone maintaining this project?

@rogerhu
Copy link
Contributor

rogerhu commented Mar 7, 2017

+1

@rogerhu
Copy link
Contributor

rogerhu commented Mar 8, 2017

Can you simply extend the class instead of needing to put in on ParseFile?

@rogerhu
Copy link
Contributor

rogerhu commented Mar 8, 2017

Does anyone else have any opinions about the need to do this?

@natario1
Copy link
Contributor

I don’t think that parceling a whole file with its byte array would be considered good practice. I also remember Parcel (or Bundle) throwing when its contents are too large.

In my opinion this should work only when the file is backed by an url, and if not (e.g. ParseFile not saved yet) throw an exception. That would be harmless and a good step in the direction of implementing Parcelable in the SDK.

@rogerhu
Copy link
Contributor

rogerhu commented Mar 11, 2017

Yeah there is a Parcelable max size of 1 Mb (https://developer.android.com/reference/android/os/TransactionTooLargeException.html)

Going to close unless there is a revision to it.

@johncordeiro
Copy link
Author

Yes, it seems to be reasonable, the code was updated.

@rogerhu
Copy link
Contributor

rogerhu commented Mar 13, 2017

See #122

@johncordeiro
Copy link
Author

@rogerhu #122 is another step after ParseFile implementation, because ParseFile is not a ParseObject. We could handle them separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants