找回密码
 立即注册
Androidthepermissionamp | android开发 2022-05-24 90 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
源码介绍:
这是Android平台下的吹气效果源码。这个例子比较简单。单击按钮后,在屏幕上吹一下,然后 UI 上的 TextView 将更改一次。
这个吹的原理其实就是麦克风的监听,所以这两个权限应该加到AndroidManifest.xml中
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
效果如下图所示。因为使用了麦克风,所以无法测试模拟器。只能用真机有效~

(Source code introduction:
This is the source code of blowing effect under Android platform. This example is relatively simple. After clicking the button, blow it on the screen, and then the textview on the UI will change once.
The principle of this blowing is actually the monitoring of the microphone, so these two permissions should be added to androidmanifest In XML
&amp; lt; uses-permission android:name=&amp; quot; android. permission. RECORD_ AUDIO&amp; quot;/& amp; gt;
&amp; lt; uses-permission android:name=&amp; quot; android. permission. WRITE_ EXTERNAL_ STORAGE&amp; quot;/& amp; gt;
The effect is shown in the figure below. The simulator cannot be tested because a microphone is used. Only the real machine can work~)

[下载]11044820593.rar


110447wfuyn8gdbu2hzyj8.jpg


上一篇:Android 触摸屏幕产生小气泡的效果应用源码
下一篇:Android 带文字的ProgressBar Demo源码