当前位置:网站首页>20道25K+Android工程师面试必问面试题,网易Android面试必问
20道25K+Android工程师面试必问面试题,网易Android面试必问
2022-04-22 14:17:00 【InfoQ】
- 我们为什么要选择离职
- 面试必问面试题
- 如何选择心仪的公司
- 工资跟不上消费
- 上班找不到归宿感和成绩感,上班感觉和坐牢一样
- 在公司没有发展空间(之前我有一篇介绍选择公司注重薪资和个人薪资的文章,可以参考[从BAT这种公司平薪跳槽头条,是否值得?](())
- system/app:系统自带的应用程序,无法删除
- data/app:用户程序安装的目录,有删除权限。安装时把apk文件复制到此目录
- data/data:存放应用程序的数据
- data/dalvik-cache:将apk中的dex文件安装到dalvik-cache目录下
- Binder
- Socket/LocalSocket
- 共享内存
- Proc A 通过 tmpfs 创建一块共享区域,得到这块区域的 fd(文件描述符)
- Proc A 在 fd 上 mmap 一片内存区域到本进程用于共享数据
- Proc A 通过某种方法把 fd 倒腾给 Proc B
- Proc B 在接到的 fd 上同样 mmap 相同的区域到本进程
- 然后 A、B 在 mmap 到本进程中的内存中读、写,对方都能看到了
- 封装:对数据进行封装,提供统一的接口,使用者完全不必关心这些数据是在DB,XML、Preferences或者网络请求来的。当项目需求要改变数据来源时,使用我们的地方完全不需要修改。
- 提供一种跨进程数据共享的方式。
- 如果该Provider尚未被调用进程使用过:
- 通过ServiceManager查找activity service得到ActivityManagerService对应BinderProxy
- 调用BinderProxy的transcat方法发送GET_CONTENT_PROVIDER_TRANSACTION命令,得到对应ContentProvider的BinderProxy。
- 如果该Provider已被调用进程使用过,则调用进程会Android开源项目《ali1024.coding.net/public/P7/Android/git》保留使用过provider的HashMap。此时直接从此表查询即得。
- 创建我们特定的ContentObserver派生类,必须重载onChange()方法去处理回调后的功能实现
- 利用context.getContentResolover()获得ContentResolove对象,接着调用registerContentObserver()方法去注册内容观察者,为指定的Uri注册一个ContentObserver派生类实例,当给定的Uri发生改变时,回调该实例对象去处理。
- 由于ContentObserver的生命周期不同步于Activity和Service等,因此,在不需要时,需要手动的调用unregisterContentObserver()去取消注册。
- 对于第一种方法,我们需要养成一个良好的习惯:在Activity进入停止或者销毁状态的时候使用unregisterReceiver方法将注册的BroadcastReceiver注销掉。
- 对于<receiver>标签进行注册的,那么该对象的实例在onReceive被调用之后就会在任意时间内被销毁。
【附】相关架构及资料
版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢
https://xie.infoq.cn/article/1929e9572067ad8a758a2803e
边栏推荐
- 深入理解Condition
- What is adapter mode?
- Live classroom system platform software source code available for personal testing
- HashTable哈希表练习查找插入删除217、349 、202、287、290、532、205、128
- CPT 104_Lab 09
- Error reported by uniapp to wechat developer tool - [wrong content of app.json file] JSON: the sitemap.json file corresponding to ["sitemaplocation"] was not found
- [pytorch] implement the simplified version of yoov3 [v] and realize the yoov3 loss function (I)
- Blocking queue-
- Actual combat of wechat applet mall project (Part 6: commodity search)
- 【终于等到你】微信转发语音的方法 - 语音信息转发
猜你喜欢

plsql developer文件编码格式设置

Advanced multithreading

spark代码 spark-submit提交yarn-cluster模式

独立站运营 | 6个Facebook推广小技巧,你都知道吗?

P2B论文复现——点云学习记录

Mariadb互为主从(双主模式)配置

Solution to the blank page of small and medium-sized programs running from uniapp to wechat developer tool

Cannot read property 'forceupdate' of undefined - wechat developer tool reports an error

idea中pom.xml文件里mysql5.7坐标报红出错

深入剖析Lock与AQS
随机推荐
In February, I relied on this PDF document to interview bat. Unexpectedly, I received five offers
awk命令
Binarytree练习二叉树序列化反序列化606、331、652、297
Iclr2022 outstanding Thesis Award was released, Tsinghua University and National People's Congress won awards, and Zhejiang University nominated
深入理解Condition
Move blog to CSDN
makefile 调用bash脚本遇到的坑
logcat的使用
【鲲鹏迁移及实践帖子汇总】第一弹~~
redis连接工具无法连上docker中redis
Hashtable hash table and index 1, 599, 219
Byte beating interview sharing, in order to win this offer, who knows what I have experienced
redis的理解
[pytorch] implement the simplified version of yoov3 [v] and realize the yoov3 loss function (I)
Binarytree practice binary tree serialization and deserialization 606, 331, 652, 297
Redis相比memcached
Thread pool--
链表 环形链表 链表判环 寻找入环节点141、142
shell入门使用
双指针头尾指针 167、|345、680、15、16、18、11、42