Java Code Examples for android.os.Parcel.writeParcelable()

The following are Jave code examples for showing how to use writeParcelable() of the android.os.Parcel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: Pocket-Plays-for-Twitch   File: VideoOnDemand.java   View Source Code Vote up 6 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
	String[] toSend = new String[] {
			this.videoTitle,
			this.gameTitle,
			this.previewUrl,
			this.videoId,
			this.channelName,
			this.displayName,
			this.recordedAtString,
			String.valueOf(this.views),
			String.valueOf(this.length),
			String.valueOf(this.isBroadcast)
	};

	dest.writeStringArray(toSend);
	dest.writeParcelable(channelInfo, flags);
}
 
Example 2
Project: Nird2   File: AndroidSecureRandomProvider.java   View Source Code Vote up 6 votes
@Override
protected void writeToEntropyPool(DataOutputStream out) throws IOException {
	super.writeToEntropyPool(out);
	out.writeInt(android.os.Process.myPid());
	out.writeInt(android.os.Process.myTid());
	out.writeInt(android.os.Process.myUid());
	if (Build.FINGERPRINT != null) out.writeUTF(Build.FINGERPRINT);
	if (Build.SERIAL != null) out.writeUTF(Build.SERIAL);
	ContentResolver contentResolver = appContext.getContentResolver();
	String id = Settings.Secure.getString(contentResolver, ANDROID_ID);
	if (id != null) out.writeUTF(id);
	Parcel parcel = Parcel.obtain();
	WifiManager wm =
			(WifiManager) appContext.getSystemService(WIFI_SERVICE);
	List<WifiConfiguration> configs = wm.getConfiguredNetworks();
	if (configs != null) {
		for (WifiConfiguration config : configs)
			parcel.writeParcelable(config, 0);
	}
	BluetoothAdapter bt = BluetoothAdapter.getDefaultAdapter();
	if (bt != null) {
		for (BluetoothDevice device : bt.getBondedDevices())
			parcel.writeParcelable(device, 0);
	}
	out.write(parcel.marshall());
	parcel.recycle();
}
 
Example 3
Project: container   File: SessionParams.java   View Source Code Vote up 6 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.mode);
    dest.writeInt(this.installFlags);
    dest.writeInt(this.installLocation);
    dest.writeLong(this.sizeBytes);
    dest.writeString(this.appPackageName);
    dest.writeParcelable(this.appIcon, flags);
    dest.writeString(this.appLabel);
    dest.writeLong(this.appIconLastModified);
    dest.writeParcelable(this.originatingUri, flags);
    dest.writeParcelable(this.referrerUri, flags);
    dest.writeString(this.abiOverride);
    dest.writeString(this.volumeUuid);
    dest.writeStringArray(this.grantedRuntimePermissions);
}
 
Example 4
Project: mvvm-template   File: CommentEvent.java   View Source Code Vote up 6 votes
@Override public void writeToParcel(Parcel dest, int flags) {
    dest.writeLong(this.id);
    dest.writeParcelable(this.user, flags);
    dest.writeString(this.url);
    dest.writeString(this.body);
    dest.writeString(this.bodyHtml);
    dest.writeString(this.htmlUrl);
    dest.writeLong(this.createdAt != null ? this.createdAt.getTime() : -1);
    dest.writeLong(this.updatedAt != null ? this.updatedAt.getTime() : -1);
    dest.writeInt(this.position);
    dest.writeInt(this.line);
    dest.writeString(this.path);
    dest.writeString(this.commitId);
    dest.writeString(this.repoId);
    dest.writeString(this.login);
    dest.writeString(this.gistId);
    dest.writeString(this.issueId);
    dest.writeString(this.pullRequestId);
    dest.writeParcelable(this.reactions, flags);
}
 
Example 5
Project: MultiContactPicker   File: ContactResult.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.mDisplayName);
    dest.writeByte(this.mStarred ? (byte) 1 : (byte) 0);
    dest.writeParcelable(this.mPhoto, flags);
    dest.writeParcelable(this.mThumbnail, flags);
    dest.writeStringList(this.mEmails);
    dest.writeStringList(this.mPhoneNumbers);
}
 
Example 6
Project: OpenHub   File: ReleaseAsset.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.id);
    dest.writeString(this.name);
    dest.writeString(this.label);
    dest.writeParcelable(this.uploader, flags);
    dest.writeString(this.contentType);
    dest.writeString(this.state);
    dest.writeLong(this.size);
    dest.writeInt(this.downloadCout);
    dest.writeLong(this.createdAt != null ? this.createdAt.getTime() : -1);
    dest.writeLong(this.updatedAt != null ? this.updatedAt.getTime() : -1);
    dest.writeString(this.downloadUrl);
}
 
Example 7
Project: WeatherPlus   File: CityWeatherModelView.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeParcelable(this.sysDTO, flags);
    dest.writeTypedList(this.weatherDTOs);
    dest.writeParcelable(this.mainDTO, flags);
    dest.writeParcelable(this.windDTO, flags);
    dest.writeString(this.id);
    dest.writeString(this.cityName);
    dest.writeString(this.lastUpdateTime);
    dest.writeTypedList(this.fiveDaysCityDTOs);
    dest.writeByte(this.isCurrentLocation ? (byte) 1 : (byte) 0);
    dest.writeInt(this.cursorIndex);
}
 
Example 8
Project: Nibo   File: NiboSelectedOriginDestination.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeParcelable(this.originItem, flags);
    dest.writeParcelable(this.destinationItem, flags);
    dest.writeParcelable(this.originLatLng, flags);
    dest.writeParcelable(this.destinationLatLng, flags);
}
 
Example 9
Project: Phoenix-for-VK   File: ParcelableOwnerWrapper.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(type);
    dest.writeByte((byte) (isNull ? 1 : 0));

    if(!isNull){
        dest.writeParcelable(owner, flags);
    }
}
 
Example 10
Project: VirtualHook   File: AppTaskInfo.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
	dest.writeInt(taskId);
	dest.writeParcelable(baseIntent, flags);
	dest.writeParcelable(baseActivity, flags);
	dest.writeParcelable(topActivity, flags);
}
 
Example 11
Project: YViewPagerDemo   File: YViewPager.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel out, int flags) {
    super.writeToParcel(out, flags);
    out.writeInt(position);
    out.writeParcelable(adapterState, flags);
}
 
Example 12
Project: kognitivo   File: ShareOpenGraphContent.java   View Source Code Vote up 4 votes
public void writeToParcel(final Parcel out, final int flags) {
    super.writeToParcel(out, flags);
    out.writeParcelable(this.action, 0);
    out.writeString(this.previewPropertyName);
}
 
Example 13
Project: anitrend-app   File: UserStats.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel parcel, int i) {
    parcel.writeParcelable(status_distribution, i);
    parcel.writeSerializable(score_distribution_map);
    parcel.writeSerializable(favourite_genres_map);
}
 
Example 14
Project: ZoomPreviewPicture   File: ThumbViewInfo.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.url);
    dest.writeParcelable(this.mBounds, 0);
}
 
Example 15
Project: PlayAndroid   File: DailyData.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeByte(this.error ? (byte) 1 : (byte) 0);
    dest.writeParcelable(this.results, flags);
    dest.writeStringList(this.category);
}
 
Example 16
Project: Celebino   File: Garden.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(this.id);
    dest.writeParcelable(this.user, flags);
    dest.writeString(this.locality);
}
 
Example 17
Project: OpenHub   File: RepoCommitExt.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeTypedList(this.files);
    dest.writeParcelable(this.stats, flags);
}
 
Example 18
Project: GitHub   File: MaterialViewPager.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel out, int flags) {
    super.writeToParcel(out, flags);
    out.writeParcelable(this.settings, flags);
    out.writeFloat(this.yOffset);
}
 
Example 19
Project: memory-game   File: Card.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.id);
    dest.writeParcelable(this.cardImage, flags);
}
 
Example 20
Project: TPlayer   File: VSyncRecord.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeParcelable(this.account, flags);
    dest.writeString(this.authority);
}