Bootstrap

android13 rom frameworks 蓝牙自动接收文件

总纲

android13 rom 开发总纲说明

目录

1.前言

2.源码查找

3.我们先实现第一种改法

4.实现第二种改法

5.第三种改法代码参考

6.编译测试


1.前言

我们从导航栏这里,点开这个蓝牙的接收框,弹出来的对话框,使用android studio 的layout inspector可以发现这个是 Bluetooth里面的对话框

进入蓝牙源码

packages/apps/Bluetooth

先大概的浏览下bluetooth里面的信息,

看看有没有Notification之类的

一般通知操作方法

    Intent snoozeIntent = new Intent(this, MyBroadcastReceiver.class);
    snoozeIntent.setAction(ACTION_SNOOZE);
    snoozeIntent.putExtra(EXTRA_NOTIFICATION_ID, 0);
    PendingIntent snoozePendingIntent =
            PendingIntent.getBroadcast(this, 0, snoozeIntent, 0);
    NotificationCompat.Builder notificat
;