SMS Timer APK 描述:

  在设定时间后向设定手机号码发送设定的内容的短信。

权限获取:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.chenh2.hellohao" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ChooseActivity"
android:label="@string/title_activity_choose" >
</activity>
</application>
<uses-permission android:name="android.permission.SEND_SMS"/>
</manifest>

Activity 跳转及数据传输:

Intent chooseIntent = new Intent(MainActivity.this,ChooseActivity.class);//Activity跳转
Bundle bundle = new Bundle();
bundle.putString("Phone", num);
bundle.putString("SmsM"
, mes);
chooseIntent.putExtras(bundle); //数据传输

phone.setText("");
sms.setText("");
time.setText("");
if(PhoneNumberUtils.isGlobalPhoneNumber(num)){
Uri uri = Uri.parse("smsto:" + num);
Intent it = new Intent(Intent.ACTION_SENDTO, uri);
it.putExtra("sms_body", mes);
try {
int n =Integer.parseInt(minu);
if(n>0){
while(n>0){
Thread.sleep(1000);
System.out.println(n);
n--;
}
}
} catch (InterruptedException e) { e.printStackTrace();
}
if(remind.isChecked()){
startActivity(chooseIntent); //Activity跳转
}
else{
SmsManager smsManager = SmsManager.getDefault();
List<String> divideContents = smsManager.divideMessage(mes);
for (String text : divideContents) {
smsManager.sendTextMessage(num, null, text, null, null);//短信发送
}
return;
}
public class ChooseActivity extends ActionBarActivity {

    @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_choose);
Button yes = (Button)findViewById(R.id.Yes);
yes.setOnClickListener(new Button.OnClickListener(){
public void onClick(View v) { SmsManager smsManager = SmsManager.getDefault();
List<String> divideContents = smsManager.divideMessage(getIntent().getExtras().getString("SmsM"));//数据获取
for (String text : divideContents) {
smsManager.sendTextMessage(getIntent().getExtras().getString("Phone"), null, text, null, null);
}
finish();
}
});
Button no = (Button)findViewById(R.id.No);
no.setOnClickListener(new Button.OnClickListener(){
public void onClick(View v) {
finish();
}
});
}

 APK下载链接:

http://files.cnblogs.com/files/udld/app-release.apk

APK Develop——SMS Timer的更多相关文章

  1. JavaWeb-SpringBoot(抖音)_一、抖音项目制作

    JavaWeb-SpringBoot(抖音)_一.抖音项目制作 传送门 JavaWeb-SpringBoot(抖音)_二.服务器间通讯 传送门 JavaWeb-SpringBoot(抖音)_三.抖音项 ...

  2. Android中实现Activity的启动拦截之----实现360卫士的安装应用界面

    第一.摘要 今天不是周末,但是我已经放假了,所以就开始我们的技术探索之旅,今天我们来讲一下Android中最期待的技术,就是拦截Activity的启动,其实我在去年的时候,就像实现这个技术了,但是因为 ...

  3. How to build .apk file from command line(转)

    How to build .apk file from command line Created on Wednesday, 29 June 2011 14:32 If you don’t want ...

  4. Android studio 自定义打包apk名

    Android Studio打包应用默认生成的apk名称是:app-release.apk .如果我们要让生成的apk名跟我们版本包名有联系的话,那我们就要自定义生成的apk名了 需要在build.g ...

  5. Cordova+Asp.net Mvc+GIS跨平台移动应用开发实战1-系统初步搭建(附演示,apk,全部源码)

    1.前言 身处在移动互联网的今天,移动应用开发炙手可热,身为程序猿的我们怎么能错过开发一款我们自己的APP.本人算是一个基于.net的GIS开发入门者(马上就大四啦), 暑假在学校参加GIS比赛有大把 ...

  6. Android网页中tel,sms,mailTo,Intent,Market协议用法总结

     tel:协议---拨打电话 <a href="tel:">调出拨号界面</a> <a href="tel:10086">调 ...

  7. Android Studio编译输出apk文件修改文件名

    新建一个Android工程,默认编译会生成一个叫app-debug.apk或者叫app-release.apk文件,说实话,单纯看文件名,我都不到任何有用的信息,我希望输出的文件名是这样的: 模块名- ...

  8. Android开发学习总结(六)—— APK反编译

    学习和开发Android应用有一段时间了,今天写一篇博客总结一下Android的apk文件反编译.我们知道,Android应用开发完成之后,我们最终都会将应用打包成一个apk文件,然后让用户通过手机或 ...

  9. android network develop(1)----doing network background

    Develop network with HttpURLConnection & HttpClient. HttpURLConnection  is lightweight with Http ...

随机推荐

  1. mysql查询语句的执行顺序(重点)

    一 SELECT语句关键字的定义顺序 SELECT DISTINCT <select_list> FROM <left_table> <join_type> JOI ...

  2. appium===使用weditor代替ui automator viewer

    weditor 一个元素定位工具,并可实现通过wifi连接移动端进行定位. https://github.com/openatx/uiautomator2 python安装方式: pip instal ...

  3. tiny-rtems-src

    https://github.com/RTEMS/rtems-libbsd https://github.com/freebsd/freebsd/tree/642b174daddbd0efd9bb5f ...

  4. 解决sql server中批处理过程中“'CREATE/ALTER PROCEDURE 必须是查询批次中的第一个语句”

    在批处理中加字段或表或视图或存储过程是否存在的判断 -----------------------------------------line----------------------------- ...

  5. shell 智能获取历史记录功能

    vim ~/.inputrc 文件内容: "\e[A": history-search-backward"\e[B": history-search-forwa ...

  6. EOS.IO技术学习

    如今很火的项目EOS的学习,以下主要的内容是基于白皮书 参考: http://chainx.org/paper/index/index/id/20.html EOS.IO软件引入了一种新的块链架构,旨 ...

  7. sqlserver2008 死锁解决方法及性能优化方法

    sqlserver2008 死锁解决方法及性能优化方法 原文: http://blog.csdn.net/kuui_chiu/article/details/48621939 十步优化SQL Serv ...

  8. aspxpopupcontrol弹出在aspxpivotgrid的下方

    ASPxPopupControl是DevPress控件集中非常优秀的控件之一,适用于弹出式窗口.对话窗口.信息提示窗口等的制作,甚至可用作拖放类的图片容器. 我设计时,想点击ASPxButtonEdi ...

  9. Struts2学习笔记02 之 使用

    一.页面向Action传参 1.基本属性注入,页面命名name,action提供成员变量name并提供set方法. 2.域模型注入:页面用user.name对象点属性形式.action成员user对象 ...

  10. hive学习(三) hive的分区

    1.Hive 分区partition 必须在表定义时指定对应的partition字段 a.单分区建表语句: create table day_table (id int, content string ...