天道酬勤,学无止境

parceler

Pass bundle intent in android using MVP

I want to pass the Model data into another activity using Parceler through Bundle intent. My problem is how could I pass the data from Presenter into the View layer to display in another activity using MVP architecture in android?

2021-06-02 18:25:24    分类:问答    android   android-intent   bundle   mvp   parceler

DP5 7.0 - Does adding extras to a pending intent fail?

Adding the linked issue on tracker: https://code.google.com/p/android/issues/detail?id=216581&thanks=216581&ts=1468962325 So I installed the DP5 Android 7.0 release onto my Nexus 5X today. I've been working on an app that schedules local notifications at specific times using Android's AlarmManager class. Up until this release, the code has been working great on devices running KitKat, Lollipop, and Marshmallow. Below is how I'm scheduling the alarms: Intent intent = new Intent(context, AlarmManagerUtil.class); intent.setAction(AlarmManagerUtil.SET_NOTIFICATION_INTENT); intent.putExtra

2021-06-02 08:04:53    分类:问答    android   alarmmanager   android-notifications   parceler   android-7.0-nougat

Use of Parceler with Kotlin data class with constructor for serialization

Is there a way to use Parceler with Kotlin data classes and constructor for serialization without using @ParcelProperty annotation for each field? If I try and use library like this: @Parcel data class Valve @ParcelConstructor constructor(val size: Int) I get Error:Parceler: No corresponding property found for constructor parameter arg0. But if I add @ParcelProperty("size") it works just fine. Why is that? Update: There are other another way to use this library. I could just remove @ParcelConstructor annotation, but then I will get error Error:Parceler: No @ParcelConstructor annotated

2021-06-01 08:15:58    分类:问答    parcelable   kotlin   parceler

Realm.io(Android)中包裹(@Parcel)的使用(Usage of parceler (@Parcel) with Realm.io (Android))

问题 我有以下代码会产生错误: Error:Parceler: Unable to find read/write generator for type io.realm.Realm for io.realm.RealmObject.realm 在不extends RealmObject ,一切正常,但是我想使用Realm轻松地将其放入数据库。 有没有一种方法可以排除RealmObject字段,而只对@Parcel使用基本的pojo字段? @Parcel public class Feed extends RealmObject{ int id; public String text; public String time_created; String time_modified; int comments_count; int likes_count; String feed_type; int obj_id; String image; String user_name; String user_earthmile_points; boolean liked; boolean commented; boolean is_private; String url; int feed_creator_id; } 回答1 编辑#2 :实际上,我找到了一种使其工作:)的方法。

2021-06-01 02:34:35    分类:技术分享    android   parcelable   serializable   realm   parceler

Usage of parceler (@Parcel) with Realm.io (Android)

I have the following code which produces the error: Error:Parceler: Unable to find read/write generator for type io.realm.Realm for io.realm.RealmObject.realm It was working all fine without extends RealmObject , however I want to use Realm to put to database easily. Is there a way to exlcude the RealmObject fields and just use the basic pojo fields for @Parcel? @Parcel public class Feed extends RealmObject{ int id; public String text; public String time_created; String time_modified; int comments_count; int likes_count; String feed_type; int obj_id; String image; String user_name; String user

2021-04-27 07:54:08    分类:问答    android   parcelable   serializable   realm   parceler

RealmList with @Parcelize annotation

I'm trying to use the new @Parcelize annotation added with Kotlin 1.1.4 with a Realm objet containing a RealmList attribute. @Parcelize @RealmClass open class Garage( var name: String? = null, var cars: RealmList<Car> = RealmList() ) : Parcelable, RealmModel As RealmList is not supported by the annotation and assuming that @Parcelize is there specially to avoid creating methods what would be the solution to support RealmList ? Thanks in advance

2021-04-05 03:38:22    分类:问答    android   kotlin   realm   parcelable   parceler