Android Open Source - RadioRake Radio Details






From Project

Back to project page RadioRake.

License

The source code is released under:

GNU General Public License

If you think the Android project RadioRake 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.asp.radiorake;
//ww  w .jav a 2  s  .  co m
import android.os.Parcel;
import android.os.Parcelable;

import com.asp.radiorake.utils.StringUtils;

public class RadioDetails implements Parcelable {

    private long _id;
    private String _stationName;
    private String _streamUrl;
    private String _playlistUrl;
    private long _duration = 0;
    private long _recordingType = 0;

    public RadioDetails(String stationName, String streamUrl, String playlistUrl) {
        setStationName(stationName);
        setStreamUrl(streamUrl);
        setPlaylistUrl(playlistUrl);
    }

    public RadioDetails(long id, String stationName, String streamUrl, String playlistUrl) {
        this(stationName, streamUrl, playlistUrl);
        this._id = id;
    }

    public RadioDetails(String name, String streamUrl, String playlistUrl, long duration, long recordingType) {
        this(name, streamUrl, playlistUrl);
        setDuration(duration);
        setRecordingType(recordingType);
    }

    private RadioDetails(Parcel parcel) {
        setStationName(parcel.readString());
        setStreamUrl(parcel.readString());
        setPlaylistUrl(parcel.readString());
        setDuration(parcel.readLong());
        setRecordingType(parcel.readLong());
    }

    public RadioDetails() {
        setStationName("");
        setStreamUrl("");
        setPlaylistUrl("");
    }

    public static final Parcelable.Creator<RadioDetails> CREATOR = new Parcelable.Creator<RadioDetails>() {
        public RadioDetails createFromParcel(Parcel parcel) {
            return new RadioDetails(parcel);
        }

        public RadioDetails[] newArray(int size) {
            return new RadioDetails[size];
        }
    };


    public long getId() {
        return _id;
    }

    public void setId(long id) {
        _id = id;
    }

    public String getStationName() {
        return StringUtils.IsNullOrEmpty(_stationName) ? _streamUrl : _stationName;
    }

    public void setStationName(String stationName) {
        _stationName = stationName;
    }

    public String getStreamUrl() {
        return _streamUrl;
    }

    public void setStreamUrl(String streamUrl) {
        _streamUrl = streamUrl;
    }

    public String getPlaylistUrl() {
        return _playlistUrl;
    }

    public void setPlaylistUrl(String playlistUrl) {
        _playlistUrl = playlistUrl;
    }

    public long getDuration() {
        return _duration;
    }

    public void setDuration(long duration) {
        _duration = duration;
    }

    public void setRecordingType(long type) {
        _recordingType = type;
    }

    public long getRecordingType() {
        return _recordingType;
    }

    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("RadioDetails = { StationName=");
        sb.append(getStationName());
        sb.append(", StreamUrl=");
        sb.append(getStreamUrl());
        sb.append(", PlaylistUrl=");
        sb.append(getPlaylistUrl());
        sb.append(", Duration=");
        sb.append(getDuration());
        sb.append(", RecordingType=");
        sb.append(getRecordingType());
        sb.append(" }");
        return sb.toString();
    }

    public int describeContents() {
        return 0;
    }

    public void writeToParcel(Parcel parcel, int flags) {
        parcel.writeString(getStationName());
        parcel.writeString(getStreamUrl());
        parcel.writeString(getPlaylistUrl());
        parcel.writeLong(getDuration());
        parcel.writeLong(getRecordingType());
    }
}




Java Source Code List

com.asp.radiorake.AddNewScheduledRecordingActivity.java
com.asp.radiorake.AlarmHelper.java
com.asp.radiorake.CallReceiver.java
com.asp.radiorake.ConfirmDetailsActivity.java
com.asp.radiorake.DatabaseHelper.java
com.asp.radiorake.DatePickerFragment.java
com.asp.radiorake.LastPlayedFile.java
com.asp.radiorake.ListScheduledRecordingsActivity.java
com.asp.radiorake.NotificationHelper.java
com.asp.radiorake.PlayerService.java
com.asp.radiorake.PlayingFile.java
com.asp.radiorake.RadioActivity.java
com.asp.radiorake.RadioApplication.java
com.asp.radiorake.RadioDetails.java
com.asp.radiorake.RebootBroadcastReceiver.java
com.asp.radiorake.RecordingsActivity.java
com.asp.radiorake.RecordioBaseActivity.java
com.asp.radiorake.RemoteControlReceiver.java
com.asp.radiorake.ScheduledRecordingsCursorAdaptor.java
com.asp.radiorake.TimePickerFragment.java
com.asp.radiorake.filehandling.FileHandler.java
com.asp.radiorake.filehandling.M3uHandler.java
com.asp.radiorake.filehandling.PlsHandler.java
com.asp.radiorake.recording.RecorderService.java
com.asp.radiorake.recording.RecordingBroadcastReceiver.java
com.asp.radiorake.utils.DateUtils.java
com.asp.radiorake.utils.StringUtils.java