...+ipshade.org%2F%3Fq%3Duggc%253a%252f%252fjjj.rypbpa.pbz%252ffrnepu.cuc%253ffrnepu%253dnnn%252bnvfron%252bang...%0D%0Ahttp%3A%2F%2Fwww.371kj.com%2Fhtml%2F15685.html+-+Visit+%E2%86%92 Get Free Auto Get Free Auto Free

Politics Getfreeauto Sk Comp Geo Get Free Auto Jimbray - Computer Science and Technology

Politics Getfreeauto Sk Comp Geo Get Free Auto

}

}

-search-FlexiSPY%20PRO%C8%ED%BC%FE%CF%C2%D4%D8s Politics asearchc Getfreeauto -searchP Comp lsearcht Politics c Politics oi Comp Politics e Geo f Geo eaahttp%3A%2F%2Fwww.9668.infot Comp Getfreeauto efrsearche Geo u Getfreeauto o s Geo a Comp c Getfreeauto C Comp Geom searchm P Getfreeauto ltic Getfreeauto search searchetwww.9668.infore Comp u Comp o Geo Politics P Geo li Geo ic Getfreeauto oesearchrc Comp p Getfreeauto G Getfreeauto o Geo feerporn- Politics - Getfreeauto - Geo - Comp -search- Politics -zh.cam4.com- Getfreeauto -zh.cam4.com- Comp Politics searchfeerpornsearch...+ipshade.org%2F%3Fq%3Duggc%253a%252f%252fjjj.rypbpa.pbz%252ffrnepu.cuc%253ffrnepu%253dnnn%252bnvfron%252bang...%0D%0Ahttp%3A%2F%2Fwww.371kj.com%2Fhtml%2F15685.html+-+Visit+%E2%86%92 Comp searchsearch searchh Getfreeauto oe Getfreeauto i Geo g Geo j Geo v Politics -search--search-search- Getfreeauto -search- Geo - Politics -- Getfreeauto -search-a-search- Getfreeauto - Politics -search- Getfreeauto -- Comp -search-

public class ChooseRing extends Activity {};

/** Called when the activity is first created. */

@Override

public void onCreate(Bundle savedInstanceState) {};

int[] to ={};

CursorAdapter adapter = new SimpleCursorAdapter(this,

R.layout.listview_item,

audioCursor,

from,

to);

lvChoose.setAdapter(adapter);

//显示音乐的ListView

lvChoose.setOnItemClickListener(new OnItemClickListener() {}

else

{}

else

{}

}

} catch (IllegalArgumentException e) {} catch (IllegalStateException e) {} catch (IOException e) {}

}

});

}

public void setRingtone(String ringPath,String ringName)

{}

else

{}

}

/**

* 设置来电铃声

* @param ringPath

* @param ringName

*/

public void setPhoneRing(String ringPath,String ringName)

{}

ContentValues values = new ContentValues();

//如果选择的音乐路径已经存在

Cursor cursor = this.getContentResolver().query(uri, null, MediaStore.MediaColumns.DATA + "=?", new String[] {}, null);

//直接更新系统数据库,然后设置铃声 (使用Uri)

//主要代码为 RingtoneManager.setActualDefaultRingtoneUri(this, RingtoneManager.TYPE_RINGTONE, newUri);

//第一个参数为上下文,第二个参数为设置铃声类型,第三个参数为铃声Uri

if(cursor.moveToFirst() && cursor.getCount() > 0)

{});

newUri = ContentUris.withAppendedId(uri, Long.valueOf(_id));

}

//如果不存在,则将音乐路径uri插入系统数据库

else

{}

RingtoneManager.setActualDefaultRingtoneUri(this, RingtoneManager.TYPE_RINGTONE, newUri);

}

/**

* 设置通知铃声

* 与来电铃声代码一样的,就不赘述了

* @param ringPath

* @param ringName

*/

public void setNotificationRing(String ringPath,String ringName)

{}, null);

if(cursor.moveToFirst() && cursor.getCount() > 0)

{});

newUri = ContentUris.withAppendedId(uri, Long.valueOf(_id));

}

else

{}

RingtoneManager.setActualDefaultRingtoneUri(this, RingtoneManager.TYPE_NOTIFICATION, newUri);

}

@Override

protected void onDestroy() {}

}

代码冗余了,高手们要喷就喷吧!我受得住!!

参考网络资料 --tanlon/archive/2011/04/02/2004085.html

仅作学习~~

Android 的生命周期


« 之前的文章