当前位置:   article > 正文

Android实验二:电话拨号和短信发送_androud sms通讯开发实验

androud sms通讯开发实验

Android实验:电话拨号和短信发送


实验四 Android程序间通信(2课时)
一、实验目的
1、学习android程序之间的通信方法。
二、实验内容
1、编写程序,实现短信发送的功能,要求程序提供用户输入电话号码和短信内容的界面。
2、编写程序,实现电话拨号的功能,要求程序提供用户输入电话号码界面。
三、实验步骤
1、建立一个android工程,修改main.xml文件并编写程序代码,设计一个实现短信发送的功能的程序,要求程序提供用户输入电话号码和短信内容的界面。
2、建立一个android工程,修改main.xml文件及清单文件,并编写程序代码,设计一个电话拨号功能的程序,要求程序提供用户输入电话号码的界面。
四、考核标准:
1、完成全部题目,设计合理,结果正确;评定为A。
2、完成部分题目,设计比较合理,结果正确;根据实际情况评定为B或C。
3、未独立完成实验要求;评定为D。

1.界面布局

activity_main.xml文件

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity"    >
    <LinearLayout
        android:layout_width="410dp"
        android:layout_height="205dp"
        android:orientation="vertical"
        tools:layout_editor_absoluteX="4dp"
        tools:layout_editor_absoluteY="4dp">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            tools:ignore="MissingConstraints">
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="电话号码: " 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小舞很执着/article/detail/988369
推荐阅读
相关标签
  

闽ICP备14008679号