com.urbanairship.api.push.parse.notification.android.WearableReader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-client Show documentation
Show all versions of java-client Show documentation
The Urban Airship Java client library
/*
* Copyright (c) 2013-2016. Urban Airship and Contributors
*/
package com.urbanairship.api.push.parse.notification.android;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.type.TypeReference;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.urbanairship.api.common.parse.APIParsingException;
import com.urbanairship.api.common.parse.JsonObjectReader;
import com.urbanairship.api.common.parse.StringFieldDeserializer;
import com.urbanairship.api.push.model.notification.Interactive;
import com.urbanairship.api.push.model.notification.android.Wearable;
import java.io.IOException;
import java.util.List;
import java.util.Map;
public class WearableReader implements JsonObjectReader {
private final Wearable.Builder builder;
public WearableReader() {
this.builder = Wearable.newBuilder();
}
public void readBackgroundImage(JsonParser parser) throws IOException {
builder.setBackgroundImage(StringFieldDeserializer.INSTANCE.deserialize(parser, "background_image"));
}
public void readInteractive(JsonParser parser) throws IOException {
builder.setInteractive(parser.readValueAs(Interactive.class));
}
public void readExtraPages(JsonParser parser) throws IOException {
List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy