├── .gitattributes
├── .gitignore
├── AndroidManifest.xml
├── README.md
├── gen
└── com
│ └── example
│ └── smartcontroller
│ ├── BuildConfig.java
│ └── R.java
├── ic_launcher-web.png
├── libs
└── android-support-v4.jar
├── proguard-project.txt
├── project.properties
├── res
├── drawable-hdpi
│ ├── ic_launcher.png
│ └── speak_now.png
├── drawable-mdpi
│ └── ic_launcher.png
├── drawable-xhdpi
│ └── ic_launcher.png
├── drawable-xxhdpi
│ └── ic_launcher.png
├── layout
│ └── activity_main.xml
├── menu
│ └── main.xml
├── values-sw600dp
│ └── dimens.xml
├── values-sw720dp-land
│ └── dimens.xml
├── values-v11
│ └── styles.xml
├── values-v14
│ └── styles.xml
└── values
│ ├── dimens.xml
│ ├── strings.xml
│ └── styles.xml
└── src
└── com
└── example
└── smartcontroller
└── MainActivity.java
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 | *.sln merge=union
7 | *.csproj merge=union
8 | *.vbproj merge=union
9 | *.fsproj merge=union
10 | *.dbproj merge=union
11 |
12 | # Standard to msysgit
13 | *.doc diff=astextplain
14 | *.DOC diff=astextplain
15 | *.docx diff=astextplain
16 | *.DOCX diff=astextplain
17 | *.dot diff=astextplain
18 | *.DOT diff=astextplain
19 | *.pdf diff=astextplain
20 | *.PDF diff=astextplain
21 | *.rtf diff=astextplain
22 | *.RTF diff=astextplain
23 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #################
2 | ## Eclipse
3 | #################
4 |
5 | *.pydevproject
6 | .project
7 | .metadata
8 | bin/
9 | tmp/
10 | *.tmp
11 | *.bak
12 | *.swp
13 | *~.nib
14 | local.properties
15 | .classpath
16 | .settings/
17 | .loadpath
18 |
19 | # External tool builders
20 | .externalToolBuilders/
21 |
22 | # Locally stored "Eclipse launch configurations"
23 | *.launch
24 |
25 | # CDT-specific
26 | .cproject
27 |
28 | # PDT-specific
29 | .buildpath
30 |
31 |
32 | #################
33 | ## Visual Studio
34 | #################
35 |
36 | ## Ignore Visual Studio temporary files, build results, and
37 | ## files generated by popular Visual Studio add-ons.
38 |
39 | # User-specific files
40 | *.suo
41 | *.user
42 | *.sln.docstates
43 |
44 | # Build results
45 |
46 | [Dd]ebug/
47 | [Rr]elease/
48 | x64/
49 | build/
50 | [Bb]in/
51 | [Oo]bj/
52 |
53 | # MSTest test Results
54 | [Tt]est[Rr]esult*/
55 | [Bb]uild[Ll]og.*
56 |
57 | *_i.c
58 | *_p.c
59 | *.ilk
60 | *.meta
61 | *.obj
62 | *.pch
63 | *.pdb
64 | *.pgc
65 | *.pgd
66 | *.rsp
67 | *.sbr
68 | *.tlb
69 | *.tli
70 | *.tlh
71 | *.tmp
72 | *.tmp_proj
73 | *.log
74 | *.vspscc
75 | *.vssscc
76 | .builds
77 | *.pidb
78 | *.log
79 | *.scc
80 |
81 | # Visual C++ cache files
82 | ipch/
83 | *.aps
84 | *.ncb
85 | *.opensdf
86 | *.sdf
87 | *.cachefile
88 |
89 | # Visual Studio profiler
90 | *.psess
91 | *.vsp
92 | *.vspx
93 |
94 | # Guidance Automation Toolkit
95 | *.gpState
96 |
97 | # ReSharper is a .NET coding add-in
98 | _ReSharper*/
99 | *.[Rr]e[Ss]harper
100 |
101 | # TeamCity is a build add-in
102 | _TeamCity*
103 |
104 | # DotCover is a Code Coverage Tool
105 | *.dotCover
106 |
107 | # NCrunch
108 | *.ncrunch*
109 | .*crunch*.local.xml
110 |
111 | # Installshield output folder
112 | [Ee]xpress/
113 |
114 | # DocProject is a documentation generator add-in
115 | DocProject/buildhelp/
116 | DocProject/Help/*.HxT
117 | DocProject/Help/*.HxC
118 | DocProject/Help/*.hhc
119 | DocProject/Help/*.hhk
120 | DocProject/Help/*.hhp
121 | DocProject/Help/Html2
122 | DocProject/Help/html
123 |
124 | # Click-Once directory
125 | publish/
126 |
127 | # Publish Web Output
128 | *.Publish.xml
129 | *.pubxml
130 |
131 | # NuGet Packages Directory
132 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line
133 | #packages/
134 |
135 | # Windows Azure Build Output
136 | csx
137 | *.build.csdef
138 |
139 | # Windows Store app package directory
140 | AppPackages/
141 |
142 | # Others
143 | sql/
144 | *.Cache
145 | ClientBin/
146 | [Ss]tyle[Cc]op.*
147 | ~$*
148 | *~
149 | *.dbmdl
150 | *.[Pp]ublish.xml
151 | *.pfx
152 | *.publishsettings
153 |
154 | # RIA/Silverlight projects
155 | Generated_Code/
156 |
157 | # Backup & report files from converting an old project file to a newer
158 | # Visual Studio version. Backup files are not needed, because we have git ;-)
159 | _UpgradeReport_Files/
160 | Backup*/
161 | UpgradeLog*.XML
162 | UpgradeLog*.htm
163 |
164 | # SQL Server files
165 | App_Data/*.mdf
166 | App_Data/*.ldf
167 |
168 | #############
169 | ## Windows detritus
170 | #############
171 |
172 | # Windows image file caches
173 | Thumbs.db
174 | ehthumbs.db
175 |
176 | # Folder config file
177 | Desktop.ini
178 |
179 | # Recycle Bin used on file shares
180 | $RECYCLE.BIN/
181 |
182 | # Mac crap
183 | .DS_Store
184 |
185 |
186 | #############
187 | ## Python
188 | #############
189 |
190 | *.py[co]
191 |
192 | # Packages
193 | *.egg
194 | *.egg-info
195 | dist/
196 | build/
197 | eggs/
198 | parts/
199 | var/
200 | sdist/
201 | develop-eggs/
202 | .installed.cfg
203 |
204 | # Installer logs
205 | pip-log.txt
206 |
207 | # Unit test / coverage reports
208 | .coverage
209 | .tox
210 |
211 | #Translations
212 | *.mo
213 |
214 | #Mr Developer
215 | .mr.developer.cfg
216 |
--------------------------------------------------------------------------------
/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
12 |
13 |
14 |
19 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Smartcontroller
2 | 基于android的智能语音家居控制系统 安卓端1.0
3 |
4 | # 视频
5 | http://v.youku.com/v_show/id_XODk0NzEzMjQ4.html
6 | # 功能
7 | - 获取温湿度、光照等, 通过蓝牙上传到手机中显示
8 | - 可接受来自手机的指令, 立刻开启关闭电器, 如:控制电动窗帘
9 | - 当可燃气体气浓度过高时, 能自动启动排气扇排出可燃气体, 防止事故发生
10 | - 当室外光照较强时建议关闭室内灯光, 若室内没有人则把灯光全部关闭
11 | - 室外温度适宜时, 建议关闭空调并开窗通风透气
12 | - 深夜时门窗等的开启关闭将根据情况判断是否发出警报
13 | - 每天定时开关电器, 如:每天下午开启电热水器, 深夜关电热水器
14 | - 一段时间后开关电器, 如:半小时后关闭音乐播放器
15 | - 远程控制家中电器, 如:某日提早回家, 依然能先把启动电热水器, 回到家马上就能洗澡
16 |
17 | # 创新点
18 | - 基于Android手机的语音识别
19 | - 利用基于Android手机的蓝牙技术控制
20 | - 具有远程控制功能(通过GSM模块发送短信实现)
21 | - 提供远程信息反馈功能
22 | - 智能环境状况测量功能(检测范围:温度、湿度、光强、可燃气体浓度、门窗开关)
23 | - 根据环境状况智能控制电器(例:当可燃气体浓度超过安全范围(爆炸下限的20%以下)时,调用手机铃声提醒用户,同时开启门窗)
24 | - 软硬结合,利用如今android手机的强大的数据处理能力,将主要计算功能放在安卓应用端,减少了硬件端的数据处理量,使系统运行更加流畅,高效
25 | - 硬件为集成开发,使用方便。
26 |
27 | # 例图
28 | 
29 |
--------------------------------------------------------------------------------
/gen/com/example/smartcontroller/BuildConfig.java:
--------------------------------------------------------------------------------
1 | /** Automatically generated file. DO NOT MODIFY */
2 | package com.example.smartcontroller;
3 |
4 | public final class BuildConfig {
5 | public final static boolean DEBUG = true;
6 | }
--------------------------------------------------------------------------------
/gen/com/example/smartcontroller/R.java:
--------------------------------------------------------------------------------
1 | /* AUTO-GENERATED FILE. DO NOT MODIFY.
2 | *
3 | * This class was automatically generated by the
4 | * aapt tool from the resource data it found. It
5 | * should not be modified by hand.
6 | */
7 |
8 | package com.example.smartcontroller;
9 |
10 | public final class R {
11 | public static final class attr {
12 | }
13 | public static final class color {
14 | public static final int black=0x7f060001;
15 | public static final int blue=0x7f060003;
16 | public static final int grey=0x7f060000;
17 | public static final int red=0x7f060002;
18 | }
19 | public static final class dimen {
20 | /** Default screen margins, per the Android Design guidelines.
21 |
22 | Customize dimensions originally defined in res/values/dimens.xml (such as
23 | screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
24 |
25 | */
26 | public static final int activity_horizontal_margin=0x7f040000;
27 | public static final int activity_vertical_margin=0x7f040001;
28 | }
29 | public static final class drawable {
30 | public static final int ic_launcher=0x7f020000;
31 | public static final int speak_now=0x7f020001;
32 | }
33 | public static final class id {
34 | public static final int RelativeLayout1=0x7f090001;
35 | public static final int RelativeLayout2=0x7f090008;
36 | public static final int action_settings=0x7f090025;
37 | public static final int btn1=0x7f090010;
38 | public static final int btn2=0x7f090011;
39 | public static final int btn3=0x7f090013;
40 | public static final int btn4=0x7f090014;
41 | public static final int btnConnect=0x7f090002;
42 | public static final int btnVoice=0x7f090006;
43 | public static final int editText1=0x7f090005;
44 | public static final int layout1=0x7f09000f;
45 | public static final int layout2=0x7f090012;
46 | public static final int layout3=0x7f090016;
47 | public static final int layout4=0x7f090019;
48 | public static final int scrollView1=0x7f090007;
49 | public static final int textView1=0x7f090003;
50 | public static final int textView10=0x7f09001c;
51 | public static final int textView11=0x7f09001d;
52 | public static final int textView12=0x7f09001e;
53 | public static final int textView13=0x7f09001f;
54 | public static final int textView14=0x7f090020;
55 | public static final int textView15=0x7f090021;
56 | public static final int textView16=0x7f090022;
57 | public static final int textView17=0x7f090023;
58 | public static final int textView18=0x7f090024;
59 | public static final int textView2=0x7f090009;
60 | public static final int textView3=0x7f090015;
61 | public static final int textView4=0x7f09000a;
62 | public static final int textView5=0x7f09000b;
63 | public static final int textView6=0x7f09000c;
64 | public static final int textView7=0x7f09000d;
65 | public static final int textView8=0x7f09000e;
66 | public static final int textView9=0x7f090004;
67 | public static final int toggleButton1=0x7f090017;
68 | public static final int toggleButton2=0x7f090018;
69 | public static final int toggleButton3=0x7f09001a;
70 | public static final int toggleButton4=0x7f09001b;
71 | public static final int widget0=0x7f090000;
72 | }
73 | public static final class layout {
74 | public static final int activity_main=0x7f030000;
75 | }
76 | public static final class menu {
77 | public static final int main=0x7f080000;
78 | }
79 | public static final class string {
80 | public static final int DoorsWindowsSensor=0x7f050011;
81 | public static final int HWversion=0x7f05001c;
82 | public static final int action_settings=0x7f050000;
83 | public static final int app_name=0x7f050001;
84 | public static final int app_version=0x7f05001b;
85 | public static final int btn1=0x7f050008;
86 | public static final int btn2=0x7f050009;
87 | public static final int btn3=0x7f05000a;
88 | public static final int btn4=0x7f05000b;
89 | public static final int connect_string=0x7f050003;
90 | public static final int empty=0x7f050002;
91 | public static final int gasIntention=0x7f050010;
92 | public static final int humidity=0x7f05000e;
93 | public static final int lightIntention=0x7f05000f;
94 | public static final int no_connection=0x7f050004;
95 | public static final int switch1_off=0x7f050014;
96 | public static final int switch1_on=0x7f050013;
97 | public static final int switch2_off=0x7f050016;
98 | public static final int switch2_on=0x7f050015;
99 | public static final int switch3_off=0x7f050018;
100 | public static final int switch3_on=0x7f050017;
101 | public static final int switch4_off=0x7f05001a;
102 | public static final int switch4_on=0x7f050019;
103 | public static final int temperation=0x7f05000d;
104 | public static final int text1=0x7f05000c;
105 | public static final int text2=0x7f050012;
106 | public static final int voice=0x7f050007;
107 | public static final int voice_result=0x7f050005;
108 | public static final int voice_result_hint=0x7f050006;
109 | }
110 | public static final class style {
111 | /**
112 | Base application theme, dependent on API level. This theme is replaced
113 | by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
114 |
115 |
116 | Theme customizations available in newer API levels can go in
117 | res/values-vXX/styles.xml, while customizations related to
118 | backward-compatibility can go here.
119 |
120 |
121 | Base application theme for API 11+. This theme completely replaces
122 | AppBaseTheme from res/values/styles.xml on API 11+ devices.
123 |
124 | API 11 theme customizations can go here.
125 |
126 | Base application theme for API 14+. This theme completely replaces
127 | AppBaseTheme from BOTH res/values/styles.xml and
128 | res/values-v11/styles.xml on API 14+ devices.
129 |
130 | API 14 theme customizations can go here.
131 | */
132 | public static final int AppBaseTheme=0x7f070000;
133 | /** Application theme.
134 | All customizations that are NOT specific to a particular API-level can go here.
135 | */
136 | public static final int AppTheme=0x7f070001;
137 | }
138 | }
139 |
--------------------------------------------------------------------------------
/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liming-7/Smartcontroller/9ea1a448844083683d683092a8b4297bc2198071/ic_launcher-web.png
--------------------------------------------------------------------------------
/libs/android-support-v4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liming-7/Smartcontroller/9ea1a448844083683d683092a8b4297bc2198071/libs/android-support-v4.jar
--------------------------------------------------------------------------------
/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-19
15 |
--------------------------------------------------------------------------------
/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liming-7/Smartcontroller/9ea1a448844083683d683092a8b4297bc2198071/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/drawable-hdpi/speak_now.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liming-7/Smartcontroller/9ea1a448844083683d683092a8b4297bc2198071/res/drawable-hdpi/speak_now.png
--------------------------------------------------------------------------------
/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liming-7/Smartcontroller/9ea1a448844083683d683092a8b4297bc2198071/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liming-7/Smartcontroller/9ea1a448844083683d683092a8b4297bc2198071/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liming-7/Smartcontroller/9ea1a448844083683d683092a8b4297bc2198071/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
25 |
26 |
37 |
38 |
46 |
47 |
59 |
60 |
61 |
71 |
72 |
73 |
74 |
80 |
81 |
87 |
88 |
99 |
100 |
109 |
110 |
119 |
120 |
129 |
130 |
139 |
140 |
149 |
150 |
156 |
157 |
163 |
164 |
170 |
171 |
172 |
178 |
179 |
185 |
186 |
192 |
193 |
194 |
204 |
205 |
212 |
213 |
220 |
221 |
228 |
229 |
230 |
236 |
237 |
244 |
245 |
252 |
253 |
254 |
265 |
266 |
276 |
277 |
287 |
288 |
298 |
299 |
309 |
310 |
320 |
321 |
331 |
332 |
341 |
342 |
351 |
352 |
353 |
354 |
--------------------------------------------------------------------------------
/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/res/values-sw600dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/res/values-sw720dp-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | 128dp
8 |
9 |
10 |
--------------------------------------------------------------------------------
/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/res/values-v14/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Settings
5 |
6 | #808080
7 | #000000
8 | #FF0000
9 | #1E90FF
10 |
11 | Smart Controller
12 | -
13 | 连接
14 | 未连接
15 | 语音命令:
16 | 命令识别结果
17 | Voice
18 | 获取温湿度
19 | 获取光强
20 | 获取可燃气体浓度
21 | 获取门窗传感器数据
22 | 家居环境
23 | 温度:
24 | 湿度:
25 | 光强:
26 | 可燃气体浓度:
27 | 门窗传感器数据:
28 | 电器控制
29 | 关灯
30 | 开灯
31 | 关风扇
32 | 开风扇
33 | 关空调
34 | 开空调
35 | 关音响
36 | 开音响
37 | app版本: 1.0
38 | 硬件版本:
39 |
40 |
--------------------------------------------------------------------------------
/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/com/example/smartcontroller/MainActivity.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liming-7/Smartcontroller/9ea1a448844083683d683092a8b4297bc2198071/src/com/example/smartcontroller/MainActivity.java
--------------------------------------------------------------------------------