Android Open Source - kik-api-android Kik Article Message






From Project

Back to project page kik-api-android.

License

The source code is released under:

Apache License

If you think the Android project kik-api-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.kik.kikapi;
//  w w w .j  ava2s  . c om
import android.content.Context;

/**
 * Created by costa on 2014-08-29.
 */
public class KikArticleMessage extends KikMessage
{
    /**
     * One of title or text is required for creating a KikArticleMessage.
     *
     * @param context    non-null Android context
     * @param title      the title of the KikMessage
     * @param text       the description text for the KikMessage
     * @param contentUrl a valid URL that will be loaded when the user opens the KikMessage
     * @param previewUrl a valid URL to an image or a data URI representation of an image to provide a thumbnail preview that will be displayed in your message
     *
     * @throws java.lang.IllegalArgumentException if both of the provided title and text, or the context are null
     */
    public KikArticleMessage(Context context, String title, String text, String contentUrl, String previewUrl) throws IllegalArgumentException
    {
        super(context);
        if (title == null && text == null) {
            throw new IllegalArgumentException("Title or text must be non-null.");
        }
        _title = title;
        _text = text;
        _previewUrl = previewUrl;
        addFallbackUrl(contentUrl, null);
    }

    @Override
    protected String getMessageType()
    {
        return "article";
    }
}




Java Source Code List

com.kik.kikapi.ApplicationTest.java
com.kik.kikapi.KikArticleMessage.java
com.kik.kikapi.KikClient.java
com.kik.kikapi.KikImageUtil.java
com.kik.kikapi.KikMessage.java
com.kik.kikapi.KikPhotoMessage.java