当前位置: 编程技术>移动开发
本页文章导读:
▪短信看过就删掉不惠存收件箱 短信看过就删掉不存入收件箱
ContentResolver cr = _context.getContentResolver();
Uri inbox = Uri.parse( "content://sms/inbox" );
Cursor cursor = cr.query(
inbox,
new String[] { "_id", "thread_id", "body" }.........
▪ 代码设立seekbar中的thumb 代码设置seekbar中的thumb
ShapeDrawable thumb = new ShapeDrawable( new RectShape() ); thumb.getPaint().setColor( 0x00FF00 ); thumb.setIntrinsicHeight( 80 ); thumb.setIntrinsicWidth( 30 ); mySeekBar.setThumb( thumb );
......
▪ 取舍铃声RingtoneManager 选择铃声RingtoneManager
String uri = null;
Intent intent = new Intent( RingtoneManager.ACTION_RINGTONE_PICKER);
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_TYPE,
RingtoneManager.TYPE_NOTIFICATION);
.........
[1]短信看过就删掉不惠存收件箱
来源: 互联网 发布时间: 2014-02-18
短信看过就删掉不存入收件箱
ContentResolver cr = _context.getContentResolver();
Uri inbox = Uri.parse( "content://sms/inbox" ); Cursor cursor = cr.query( inbox, new String[] { "_id", "thread_id", "body" }, null, null, null);do { String body = cursor.getString( 2 ); long thread_id = cursor.getLong( 1 ); Uri thread = Uri.parse( "content://sms/conversations/" + thread_id ); cr.delete( thread, null, null ); count++; } while ( cursor.moveToNext() );
[2] 代码设立seekbar中的thumb
来源: 互联网 发布时间: 2014-02-18
代码设置seekbar中的thumb
ShapeDrawable thumb = new ShapeDrawable( new RectShape() );
thumb.getPaint().setColor( 0x00FF00 );
thumb.setIntrinsicHeight( 80 );
thumb.setIntrinsicWidth( 30 );
mySeekBar.setThumb( thumb );
[3] 取舍铃声RingtoneManager
来源: 互联网 发布时间: 2014-02-18
选择铃声RingtoneManager
String uri = null; Intent intent = new Intent( RingtoneManager.ACTION_RINGTONE_PICKER); intent.putExtra( RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_NOTIFICATION); intent.putExtra( RingtoneManager.EXTRA_RINGTONE_TITLE, "Select Tone"); if( uri != null) { intent.putExtra( RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, Uri.parse( uri)); } else { intent.putExtra( RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, (Uri)null); } startActivityForResult( intent, Set_Ringtone);
if (resultCode == RESULT_OK) { Uri uri = intent.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI); if (uri != null) { String ringTonePath = uri.toString(); } }
最新技术文章: