-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 12dca1e
Showing
24 changed files
with
236 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="src" path="gen"/> | ||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>message1.1.0</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>com.android.ide.eclipse.adt.ApkBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.android.ide.eclipse.adt.AndroidNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.alvin.mes" | ||
android:versionCode="1" | ||
android:versionName="1.0"> | ||
<application android:icon="@drawable/icon" android:label="@string/app_name"> | ||
<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> | ||
|
||
</application> | ||
<uses-sdk android:minSdkVersion="9"/> | ||
<!-- <uses-permission android:name="android.permission.CALL_PHONE"/> | ||
--> | ||
<uses-permission | ||
android:name="android.permission.SEND_SMS" | ||
/> | ||
|
||
</manifest> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# This file is automatically generated by Android Tools. | ||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED! | ||
# | ||
# This file must be checked in Version Control Systems. | ||
# | ||
# To customize properties used by the Ant build system use, | ||
# "build.properties", and override values to adapt the script to your | ||
# project structure. | ||
|
||
# Project target. | ||
target=android-9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* AUTO-GENERATED FILE. DO NOT MODIFY. | ||
* | ||
* This class was automatically generated by the | ||
* aapt tool from the resource data it found. It | ||
* should not be modified by hand. | ||
*/ | ||
|
||
package com.alvin.mes; | ||
|
||
public final class R { | ||
public static final class attr { | ||
} | ||
public static final class drawable { | ||
public static final int bg=0x7f020000; | ||
public static final int icon=0x7f020001; | ||
} | ||
public static final class id { | ||
public static final int button2=0x7f050002; | ||
public static final int content=0x7f050001; | ||
public static final int number2=0x7f050000; | ||
} | ||
public static final class layout { | ||
public static final int main=0x7f030000; | ||
} | ||
public static final class string { | ||
public static final int app_name=0x7f040000; | ||
public static final int button1=0x7f040002; | ||
public static final int button2=0x7f040006; | ||
public static final int content=0x7f040005; | ||
public static final int mobile=0x7f040001; | ||
public static final int number1=0x7f040003; | ||
public static final int number2=0x7f040004; | ||
public static final int sucess=0x7f040007; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
-optimizationpasses 5 | ||
-dontusemixedcaseclassnames | ||
-dontskipnonpubliclibraryclasses | ||
-dontpreverify | ||
-verbose | ||
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* | ||
|
||
-keep public class * extends android.app.Activity | ||
-keep public class * extends android.app.Application | ||
-keep public class * extends android.app.Service | ||
-keep public class * extends android.content.BroadcastReceiver | ||
-keep public class * extends android.content.ContentProvider | ||
-keep public class * extends android.app.backup.BackupAgentHelper | ||
-keep public class * extends android.preference.Preference | ||
-keep public class com.android.vending.licensing.ILicensingService | ||
|
||
-keepclasseswithmembernames class * { | ||
native <methods>; | ||
} | ||
|
||
-keepclasseswithmembernames class * { | ||
public <init>(android.content.Context, android.util.AttributeSet); | ||
} | ||
|
||
-keepclasseswithmembernames class * { | ||
public <init>(android.content.Context, android.util.AttributeSet, int); | ||
} | ||
|
||
-keepclassmembers enum * { | ||
public static **[] values(); | ||
public static ** valueOf(java.lang.String); | ||
} | ||
|
||
-keep class * implements android.os.Parcelable { | ||
public static final android.os.Parcelable$Creator *; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:orientation="vertical" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:background="@drawable/bg" | ||
> | ||
<TextView | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:text="@string/number2" | ||
/> | ||
<EditText | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:id="@+id/number2" | ||
/> | ||
<TextView | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:text="@string/content" | ||
/> | ||
<EditText | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:minLines="3" | ||
android:id="@+id/content" | ||
/> | ||
<Button | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/button2" | ||
android:id="@+id/button2" | ||
/> | ||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="app_name">拨号器和短信发送器</string> | ||
<string name="mobile">输入号码</string> | ||
<string name="button1">拨号</string> | ||
<string name="number1">15155191589</string> | ||
|
||
<string name="number2">输入号码</string> | ||
<string name="content">输入信息内容</string> | ||
<string name="button2">发送</string> | ||
<string name="sucess">发送成功</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.alvin.mes; | ||
|
||
import java.util.ArrayList; | ||
|
||
import android.app.Activity; | ||
import android.content.Intent; | ||
import android.net.Uri; | ||
import android.os.Bundle; | ||
import android.view.View; | ||
import android.widget.Button; | ||
import android.widget.EditText; | ||
import android.widget.Toast; | ||
|
||
public class MainActivity extends Activity { | ||
private EditText edittext=null; | ||
private EditText numbertext; | ||
private EditText contenttext; | ||
public void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.main); | ||
//找到文本输入框,按钮 | ||
numbertext=(EditText)this.findViewById(R.id.number2); | ||
contenttext=(EditText)this.findViewById(R.id.content); | ||
Button button2=(Button)this.findViewById(R.id.button2); | ||
//处理按钮的点击事件,内部类 | ||
button2.setOnClickListener(new View.OnClickListener(){ | ||
public void onClick(View v) { | ||
//得到电话号码和内容框中的内容 | ||
String number=numbertext.getText().toString(); | ||
String content=contenttext.getText().toString(); | ||
//创建一个消息管理器对象 | ||
android.telephony.SmsManager manager=android.telephony.SmsManager.getDefault(); | ||
//短信的字数限制,把很长的短信分成几条短信发送 | ||
ArrayList<String> texts=manager.divideMessage(content); | ||
//对arrayList进行一次遍历 | ||
for(String text:texts){ | ||
manager.sendTextMessage(number, null, text, null,null); | ||
} | ||
Toast.makeText(getApplicationContext(), R.string.sucess, Toast.LENGTH_SHORT).show(); | ||
contenttext.setText(null); | ||
} | ||
}); | ||
} | ||
} |