安卓开发
嵌入式探索者
这个作者很懒,什么都没留下…
展开
-
添加系统权限
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (!Settings.System.canWrite(this)) { AlertDialog alertDialog1; alertDialog1 = new AlertDialog.Builder(this) .setTitle("申请权限")//标.原创 2020-08-06 13:01:30 · 170 阅读 · 0 评论 -
app实现遥控看电视(上)
我们要实现手机app遥控看电视,分为俩个步骤:1写服务器端app,安装于讯为4412开发板,2写手机客户端,用于控制遥控 1 服务端,新建一个空工程,想要实现app开机自动启动,需要实现拦截广播android.permission.RECEIVE_BOOT_COMPLETED,并且需要使用静态注册广播的方法(即在AndroidManifest.xml文件中定义广播)代码如下: 在AndroidManifast.xml中添加权限,并注册一个receiver <?xml version="1.0" en原创 2020-06-12 22:44:32 · 542 阅读 · 0 评论 -
仿淘宝APP--实现监听,搜索栏
首先实现整体的排列位置,搜索栏,按钮,下面的八个图片和文字,新建一个空活动 布局文件如下所示: <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/an...原创 2020-03-20 19:19:53 · 727 阅读 · 0 评论