Title: Object which implements Serializable and Parcelable in @Extra · Issue #561 · androidannotations/androidannotations · GitHub
Open Graph Title: Object which implements Serializable and Parcelable in @Extra · Issue #561 · androidannotations/androidannotations
X Title: Object which implements Serializable and Parcelable in @Extra · Issue #561 · androidannotations/androidannotations
Description: Hi, I have an error Ambiguous method call in a generated Activity with a field annotated @Extra which implements both Serializable and Parcelable. Indeed, the IntentBuilder_ call the method Intent.putExtra which accepts both (String, Ser...
Open Graph Description: Hi, I have an error Ambiguous method call in a generated Activity with a field annotated @Extra which implements both Serializable and Parcelable. Indeed, the IntentBuilder_ call the method Intent....
X Description: Hi, I have an error Ambiguous method call in a generated Activity with a field annotated @Extra which implements both Serializable and Parcelable. Indeed, the IntentBuilder_ call the method Intent....
Opengraph URL: https://github.com/androidannotations/androidannotations/issues/561
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Object which implements Serializable and Parcelable in @Extra","articleBody":"Hi,\n\nI have an error `Ambiguous method call` in a generated `Activity` with a field annotated `@Extra` which implements both `Serializable` and `Parcelable`.\nIndeed, the `IntentBuilder_` call the method `Intent.putExtra` which accepts both `(String, Serializable)` and `(String, Parcelable)`.\nCasting the object to `Parcelable` is sufficient.\n\nMy classes :\n\n``` java\npublic class MyBean implements Serializable, Parcelable {\n}\n```\n\n``` java\n@EActivity\npublic class MyActivity extends Activity {\n @Extra\n protected MyBean myBean;\n}\n```\n\nThe generated code is : \n\n``` java\npublic final class MyActivity_ extends MyActivity {\n ...\n public static class IntentBuilder_ {\n ...\n public MyActivity_.IntentBuilder_ myBean(MyBean myBean) {\n intent_.putExtra(\"myBean\", myBean);\n return this;\n }\n }\n}\n```\n\nAnd it should be : \n\n``` java\npublic final class MyActivity_ extends MyActivity {\n ...\n public static class IntentBuilder_ {\n ...\n public MyActivity_.IntentBuilder_ myBean(MyBean myBean) {\n intent_.putExtras(\"myBean\", (Parcelable) myBean);\n return this;\n }\n }\n}\n```\n\nI will implement this and submit a PR soon.\n","author":{"url":"https://github.com/yDelouis","@type":"Person","name":"yDelouis"},"datePublished":"2013-04-17T08:55:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/561/androidannotations/issues/561"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:66887d39-70d6-4227-a54d-bfa94489df87 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C5C0:26FCE1:DEF142:12A81BA:6A612169 |
| html-safe-nonce | 73a32d85bbc1d72f1b86b6ce1fbc10d3f9b3efc44222aed1a714b1b6273ebbe0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUMwOjI2RkNFMTpERUYxNDI6MTJBODFCQTo2QTYxMjE2OSIsInZpc2l0b3JfaWQiOiI5MjIyMDg1ODg5MjA3OTAyNTY5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9fb8bca8c04725a6de589d05cda2f8b1913e44c54d9deecfd445c5f929fad5c9 |
| hovercard-subject-tag | issue:13286726 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/androidannotations/androidannotations/561/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5344380ff26285b4ce86835ac7c2269da565be9414e476c917bcb1d56dd267e6/androidannotations/androidannotations/issues/561 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5344380ff26285b4ce86835ac7c2269da565be9414e476c917bcb1d56dd267e6/androidannotations/androidannotations/issues/561 |
| og:image:alt | Hi, I have an error Ambiguous method call in a generated Activity with a field annotated @Extra which implements both Serializable and Parcelable. Indeed, the IntentBuilder_ call the method Intent.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | yDelouis |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d9987c85f924dc5597480f737e023a6e985b0316e672f00513eb4ba440d87ba |
| turbo-cache-control | no-preview |
| go-import | github.com/androidannotations/androidannotations git https://github.com/androidannotations/androidannotations.git |
| octolytics-dimension-user_id | 1315313 |
| octolytics-dimension-user_login | androidannotations |
| octolytics-dimension-repository_id | 3116751 |
| octolytics-dimension-repository_nwo | androidannotations/androidannotations |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3116751 |
| octolytics-dimension-repository_network_root_nwo | androidannotations/androidannotations |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d38dc1dac7b5a5d0788e068e080820de6de90a28 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width