Skip to content

Commit ab96a80

Browse files
author
CodingForAndroid
committed
play music
1 parent e7b3192 commit ab96a80

45 files changed

Lines changed: 1852 additions & 164 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
<activity
4747
android:configChanges="orientation|keyboardHidden|screenSize"
4848
android:name=".ui.fragment.VideoPlayerActivity"/>
49+
50+
<service android:name=".player.MusicPlayService"/>
4951
</application>
5052

5153
</manifest>

app/src/main/java/com/bczm/widgetcollections/bean/AudioInfo.java

Lines changed: 0 additions & 104 deletions
This file was deleted.
Lines changed: 277 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,277 @@
1+
/*
2+
* Copyright (c) 2015 [1076559197@qq.com | tchen0707@gmail.com]
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License”);
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.bczm.widgetcollections.bean;
18+
19+
import android.os.Parcel;
20+
import android.os.Parcelable;
21+
22+
/**
23+
* Author: Tau.Chen
24+
* Email: 1076559197@qq.com | tauchen1990@gmail.com
25+
* Date: 2015/4/16.
26+
* Description:
27+
*/
28+
public class MusicsListEntity implements Parcelable {
29+
30+
private String album;
31+
private String picture;
32+
private String ssid;
33+
private String artist;
34+
private String url;
35+
private String company;
36+
private String title;
37+
private float rating_avg;
38+
private String length;
39+
private String subType;
40+
private String public_time;
41+
private int songlists_count;
42+
private String sid;
43+
private String aid;
44+
private String sha256;
45+
private String kbps;
46+
private String albumtitle;
47+
private int like;
48+
49+
public String getAlbum() {
50+
return album;
51+
}
52+
53+
public void setAlbum(String album) {
54+
this.album = album;
55+
}
56+
57+
public String getPicture() {
58+
return picture;
59+
}
60+
61+
public void setPicture(String picture) {
62+
this.picture = picture;
63+
}
64+
65+
public String getSsid() {
66+
return ssid;
67+
}
68+
69+
public void setSsid(String ssid) {
70+
this.ssid = ssid;
71+
}
72+
73+
public String getArtist() {
74+
return artist;
75+
}
76+
77+
public void setArtist(String artist) {
78+
this.artist = artist;
79+
}
80+
81+
public String getUrl() {
82+
return url;
83+
}
84+
85+
public void setUrl(String url) {
86+
this.url = url;
87+
}
88+
89+
public String getCompany() {
90+
return company;
91+
}
92+
93+
public void setCompany(String company) {
94+
this.company = company;
95+
}
96+
97+
public String getTitle() {
98+
return title;
99+
}
100+
101+
public void setTitle(String title) {
102+
this.title = title;
103+
}
104+
105+
public float getRating_avg() {
106+
return rating_avg;
107+
}
108+
109+
public void setRating_avg(float rating_avg) {
110+
this.rating_avg = rating_avg;
111+
}
112+
113+
public String getLength() {
114+
return length;
115+
}
116+
117+
public void setLength(String length) {
118+
this.length = length;
119+
}
120+
121+
public String getSubType() {
122+
return subType;
123+
}
124+
125+
public void setSubType(String subType) {
126+
this.subType = subType;
127+
}
128+
129+
public String getPublic_time() {
130+
return public_time;
131+
}
132+
133+
public void setPublic_time(String public_time) {
134+
this.public_time = public_time;
135+
}
136+
137+
public int getSonglists_count() {
138+
return songlists_count;
139+
}
140+
141+
public void setSonglists_count(int songlists_count) {
142+
this.songlists_count = songlists_count;
143+
}
144+
145+
public String getSid() {
146+
return sid;
147+
}
148+
149+
public void setSid(String sid) {
150+
this.sid = sid;
151+
}
152+
153+
public String getAid() {
154+
return aid;
155+
}
156+
157+
public void setAid(String aid) {
158+
this.aid = aid;
159+
}
160+
161+
public String getSha256() {
162+
return sha256;
163+
}
164+
165+
public void setSha256(String sha256) {
166+
this.sha256 = sha256;
167+
}
168+
169+
public String getKbps() {
170+
return kbps;
171+
}
172+
173+
public void setKbps(String kbps) {
174+
this.kbps = kbps;
175+
}
176+
177+
public String getAlbumtitle() {
178+
return albumtitle;
179+
}
180+
181+
public void setAlbumtitle(String albumtitle) {
182+
this.albumtitle = albumtitle;
183+
}
184+
185+
public int getLike() {
186+
return like;
187+
}
188+
189+
public void setLike(int like) {
190+
this.like = like;
191+
}
192+
193+
@Override
194+
public int describeContents() {
195+
return 0;
196+
}
197+
198+
@Override
199+
public void writeToParcel(Parcel dest, int flags) {
200+
dest.writeString(this.album);
201+
dest.writeString(this.picture);
202+
dest.writeString(this.ssid);
203+
dest.writeString(this.artist);
204+
dest.writeString(this.url);
205+
dest.writeString(this.company);
206+
dest.writeString(this.title);
207+
dest.writeFloat(this.rating_avg);
208+
dest.writeString(this.length);
209+
dest.writeString(this.subType);
210+
dest.writeString(this.public_time);
211+
dest.writeInt(this.songlists_count);
212+
dest.writeString(this.sid);
213+
dest.writeString(this.aid);
214+
dest.writeString(this.sha256);
215+
dest.writeString(this.kbps);
216+
dest.writeString(this.albumtitle);
217+
dest.writeInt(this.like);
218+
}
219+
220+
public MusicsListEntity() {
221+
}
222+
223+
private MusicsListEntity(Parcel in) {
224+
this.album = in.readString();
225+
this.picture = in.readString();
226+
this.ssid = in.readString();
227+
this.artist = in.readString();
228+
this.url = in.readString();
229+
this.company = in.readString();
230+
this.title = in.readString();
231+
this.rating_avg = in.readFloat();
232+
this.length = in.readString();
233+
this.subType = in.readString();
234+
this.public_time = in.readString();
235+
this.songlists_count = in.readInt();
236+
this.sid = in.readString();
237+
this.aid = in.readString();
238+
this.sha256 = in.readString();
239+
this.kbps = in.readString();
240+
this.albumtitle = in.readString();
241+
this.like = in.readInt();
242+
}
243+
244+
public static final Creator<MusicsListEntity> CREATOR = new Creator<MusicsListEntity>() {
245+
public MusicsListEntity createFromParcel(Parcel source) {
246+
return new MusicsListEntity(source);
247+
}
248+
249+
public MusicsListEntity[] newArray(int size) {
250+
return new MusicsListEntity[size];
251+
}
252+
};
253+
254+
@Override
255+
public String toString() {
256+
return "MusicsListEntity{" +
257+
"album='" + album + '\'' +
258+
", picture='" + picture + '\'' +
259+
", ssid='" + ssid + '\'' +
260+
", artist='" + artist + '\'' +
261+
", url='" + url + '\'' +
262+
", company='" + company + '\'' +
263+
", title='" + title + '\'' +
264+
", rating_avg=" + rating_avg +
265+
", length='" + length + '\'' +
266+
", subType='" + subType + '\'' +
267+
", public_time='" + public_time + '\'' +
268+
", songlists_count=" + songlists_count +
269+
", sid='" + sid + '\'' +
270+
", aid='" + aid + '\'' +
271+
", sha256='" + sha256 + '\'' +
272+
", kbps='" + kbps + '\'' +
273+
", albumtitle='" + albumtitle + '\'' +
274+
", like=" + like +
275+
'}';
276+
}
277+
}

0 commit comments

Comments
 (0)