diff --git a/app/build.gradle b/app/build.gradle
index be38504a..811a732c 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -65,7 +65,7 @@ dependencies {
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.0'
- implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
+ implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 7f421715..f0bd24e3 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -31,6 +31,8 @@
+
-
+
+
+
+
+
0) {
+ SmsMessage[] messages = new SmsMessage[pdus.length];
+ for (int i = 0; i < pdus.length; i++) {
+ byte[] pdu = (byte[]) pdus[i];
+ messages[i] = SmsMessage.createFromPdu(pdu);
+ }
+ for (SmsMessage message : messages) {
+ String content = message.getMessageBody();// 得到短信内容
+ String sender = message.getOriginatingAddress();// 得到发信息的号码
+ Date date = new Date(message.getTimestampMillis());
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ format.setTimeZone(TimeZone.getTimeZone("GMT+08:00"));
+ String dateContent = format.format(date);
+
+// this.abortBroadcast();// 中止
+
+ }
+ }
+
+ }
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index b66f43ff..af7e709b 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -8,93 +8,109 @@
tools:context=".MainActivity">
+ app:layout_constraintTop_toTopOf="parent" />
+
+
+
+
+
+
+
+ android:text="Stop" />
+ android:text="Start" />
+ android:text="Take Photo2" />
+ android:text="Take Photo" />
-
+ android:text="sim卡获取" />
-
+ android:text="切换sim2" />
-
+ android:layout_marginStart="16dp"
+ android:layout_marginTop="48dp"
+ app:constraint_referenced_ids="startServBtn,stopServBtn,takePhotoBtn,takePhotoBtn2,simchange,simchange2"
+ app:flow_horizontalGap="20dp"
+ app:flow_wrapMode="chain"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@+id/port" />
-
+ android:text="Hello World!"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="0.929" />