-
Android
安卓开发,第一本书的源码,非常给力,大家欢迎下载(Andrews development, the first book of the source code, is to force everyone welcome to download)
- 2016-07-12 22:45:25下载
- 积分:1
-
Android 在状态栏添加Notification信息图标及提示
这个例子演示Android 在状态栏添加Notification信息图标及提示,相信大家对这个功能已经不陌生了,手机中安装的APP,一般都会在后台运行,时不时会在手机顶部的状态栏中显示应用的图标,滑出状态栏会看到详细的信息,本例子就是模拟实现了此功能:
Intent i = new Intent(Sample_6_10.this, NotifiedActivity.class);
PendingIntent pi = PendingIntent.getActivity(Sample_6_10.this, 0, i, 0);
Notification myNotification = new Notification();//创建一个Notification对象
myNotification.icon=R.drawable.header;//Notification的图标
myNotification.tickerText=getResources().getString(R.string.notification);
myNotification.defaults=Notification.DEFAULT_SOUND;
myNotification.setLatestEventInfo(Sample_6_10.this, "示例", "点击查看", pi);
NotificationManager notificationManager = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
notificationManager.notify(0, myNotification);//发送Notification
- 2022-06-26 12:21:22下载
- 积分:1
-
某500强android学习资料
某500强android学习资料
- 2015-01-28下载
- 积分:1
-
自己开发的Android 直接发送短信方法附上代码
这是一个自己开发的Android 直接发送短信方法附上代码,Android 发短信功能,包括了对内容合法性的验证,发送完成弹出提示。自己开发的直接发送短信的方法:
private void sendSMS(String telNo,String smsStr,View v){
PendingIntent pi=
PendingIntent.getActivity(this, 0, new Intent(this,Sample_11_1.class), 0);
SmsManager sms=SmsManager.getDefault();
sms.sendTextMessage(telNo, null, smsStr, pi, null);
//短信发送成功给予提示
Toast.makeText(
Sample_11_1.this, //上下文
"恭喜你,短信发送成功!", //提示内容
5000 //信息显示时间
).show();
v.setEnabled(true);//短信发送完成后恢复发送按钮的可用状态
}
对手机号码和短信内容的验证部分:
//获取输入的电话号码
EditText etTel=(EditText)findViewById(R.id.EditText02);
String telStr=etTel.getText().toString();
//获取输入的短信内容
EditText etSms=(EditText)findViewById(R.id.EditText01);
String smsStr=etSms.getText().toString();
//判断号码字符串是否合法
if(PhoneNumberUtils.isGlobalPhoneNumber(telStr)){//合法则发送短信
v.setEnabled(false);//短信发送完成前将发送按钮设置为不可用
sendSMS(telStr,smsStr,v);
}
else{//不合法则提示
Toast.makeText(
Sample_11_1.this, //上下文
"电话号码不符合格式!!!
- 2022-08-23 23:05:12下载
- 积分:1
-
android-quiz-template-master
android app code for quiz app. android app code for quiz app.
- 2018-01-18 01:57:10下载
- 积分:1
-
PlayActivity
android 播放器代码例子,用于实现音乐播放的功能。可用作学习资料。(android player code example.)
- 2010-09-19 17:29:37下载
- 积分:1
-
Android录制视频源码
Android录制视频源码
- 2015-06-17下载
- 积分:1
-
安卓记事本app
课设APP,简单的记事本,可以分享,有实时更新的功能,界面还是挺好看的,平时记事可用,方便简洁。大家可以下载来用。
- 2022-02-04 18:35:47下载
- 积分:1
-
Android视频压缩
Android视频压缩技Android视频压缩技Android视频压缩技Android视频压缩技
- 2023-08-13 18:00:03下载
- 积分:1
-
GifViewDemo
自定义播放gif格式的图片功能,该项目实现了Android自定义播放gif格式的图片,可以通过点击点击屏幕控制动画播放,希望能够帮到学习android开发的朋友。(Custom playback functions in GIF format pictures, the project realized Android custom play GIF format images, can through the click click the screen to control the animation playback, I hope to be able to help friends to learn Android development.)
- 2016-06-17 10:33:14下载
- 积分:1