Java????????????
???????????? ???????[ 2014/4/21 13:31:54 ] ????????Java ???? ???????
package com.frewen.ttplayer;
importjava.util.ArrayList;
importjava.util.LinkedList;
importjava.util.List;
importandroid.app.Activity;
importandroid.app.Application;
importandroid.content.Context;
importandroid.graphics.Bitmap;
importandroid.graphics.BitmapFactory;
importandroid.media.MediaPlayer;
importandroid.util.Log;
import com.frewen.ttplayer.entry.Music;
import com.frewen.ttplayer.entry.impl.Musicdata;
import com.frewen.ttplayer.util.MusicPreference;
public classMyApplication extends Application {
public static MediaPlayer mediaPlayer;
public static MusicPreferencemusicPreference;
public static ArrayList<Music> musics= new ArrayList<Music>();
public static boolean isStart = false;
public List<Activity> activityList =new LinkedList<Activity>();
public static Bitmap bitmap_l;
public static Bitmap bitmap_s;
public static MyApplication instance;
public ArrayList<Music> getMusics() {
return musics;
}
public static Context context;
@Override
public void onCreate() {
super.onCreate();
context = getApplicationContext();
new Thread(new Runnable() {
@Override
public void run() {
setMusics(Musicdata.getMultiDatas(context));
bitmap_l = BitmapFactory.decodeResource(context.getResources()??
R.drawable.default_bg_l);
bitmap_s =BitmapFactory.decodeResource(context.getResources()??
R.drawable.default_bg_s);
}
}).start();
mediaPlayer = new MediaPlayer();
musicPreference = new MusicPreference(context);
}
public void setMusics(ArrayList<Music>ms) {
musics.clear();
musics = ms;
Log.i("test"?? "?б????" + this.musics.size());
}
public MyApplication() {
}
// ???????л????MyApplication???
public static MyApplication getInstance() {
if (null == instance) {
instance = new MyApplication();
}
return instance;
}
// ???Activity????????
public void addActivity(Activity activity) {
activityList.add(activity);
}
// ????????Activity??finish
public void exit() {
for (Activity activity : activityList) {
activity.finish();
}
System.exit(0);
}
/**
* ??musics????????????miusic???
*
*@param musics
*/
public void append(ArrayList<Music>musics) {
if (musics != null) {
this.musics.addAll(musics);
}
}
public void append(Music music) {
if (music != null) {
this.musics.add(music);
}
}
}
|
????android????????????????????????Application??????????????????????Application?????????? (singleton)?????????.application????????????????????????г???????????????????????????????????????????????????????????????Activity??Service?л???????????????????????Application???????Щ????????????????????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Java???????????Щ???????????????Java????????????????Java?б???Map????????Java Web???????????????Java??????????????д?????Java????????7???????????????????????(java .net ?????)???Java??????????Python??????Java webdriver??λ????????′????е?????Java??д??????????????????Java???????????????JavaScript????????????Java?????????????????? Java???????10??????????????Java?м????????????????java???????ü???????????м???????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????