首页 文章 精选 留言 我的

精选列表

搜索[安卓系统],共10000篇文章
优秀的个人博客,低调大师

关于安卓图像显示比iOS差的原因(英文文档)

There are so many comparations between Android phone and iPhone. We cannot make the conclusion about which one is better, but we all knows that the image quality of Android phone is much worse than iPhone. No matter you are using Facebook, Twitter or even Instagram, after taking the photo, adding a filter, then sharing to the social network, the images produced by Android phone are always coarse. Why? Our team had been working on this issue in the last year. After very deep research, we found that this was a "TINY" mistake made by Google. Although tiny, but the influence was very huge (all Android Apps related to image), and lasted till today. The problem is : libjpeg. We all know that libjpeg is widely used open source JPEG library. Android also uses libjpeg to compress images. After digging into the source code of Android, we can find that instead of using libjpeg directly, Android is based on an open source image engine called Skia. The Skia is a wonderful engine maintained by Google himself, all image functions are implemented in it, and it is widely used by Google and other companies' products (e.g.: Chrome, Firefox, Android......). The Skia has a good encapsulation of libjpeg, you can easily develop image utilites base on this engine. When using libjpeg to compress images, optimize_coding is a very important parameter. In libjpeg.doc, we can find following introductions about this parameter: boolean optimize_coding TRUE causes the compressor to compute optimal Huffman coding tables for the image. This requires an extra pass over the data and therefore costs a good deal of space and time. The default is FALSE, which tells the compressor to use the supplied or default Huffman tables. In most cases optimal tables save only a few percent of file size compared to the default tables. Note that when this is TRUE, you need not supply Huffman tables at all, and any you do supply will be overwritten. As the libjpeg.doc, we now know that because setting the optimize_coding to TRUE may cost a good deal of space and time, the default in libjpeg is FALSE. Everything seems fine about the doc, and libjpeg is very stable. But many people ignored that this document was writen for more than 10 years. At that time, space and computing abilities are very limited. With today's modern computers or even mobile phones, this is not an issue. On the contrary, we should pay more attention to the image quality (retina screens) and image size (cloud services). Google's engineers of skia project did not set this parameter, so the optimize_coding in Skia was remained to FALSE as the default value, and Skia concealed this setting, you could not change the setting outside of Skia. This became to a big problem, we had to endure worse image and bigger file size. Our team had tested optimize_coding for many different images. If you want the same quality of image compressing, the file size are 5-10 times bigger when setting the optimze_coding to FALSE than to TRUE. The difference is quite significant. We also compared the jpeg compressing between iOS and Android (they both concealed the optimize_coding parameter). With the same original images, if you want same quality level, you need 5-10 times file size on Android. The result is clear, Apple does know the importance of optimize_coding and Huffman tables and Google does not. (Apple uses their own Huffman table algorithm, not like libjpeg or libjpeg-turbo. It seems that Apple has done more tuning works on image compressing.) Finally, we decided not to use JPEG compress functions provided by Android, and we compiled our own native library based on libjpeg-turbo (libjpeg-turbo also has performance improvements). Now we can save 5-10 times of image space and enjoy the same or even better image quality. This work is totally worth to do. Thanks for reading, :) Our project on github: https://github.com/bither

优秀的个人博客,低调大师

Google:这个安卓新漏洞其实没什么大不了

一家以色列安全公司声称在 Linux 内核中发现了一个重大的安全漏洞,它已经存在了将近三年。影响到了成千上万的 Linux 服务器和 Linux 桌面计算机;此外,据说近 70% 的 Android 手机和平板也受此漏洞影响。 在 Perception Point 发表的一篇文章中也详细地报导了 Linux 和 Android 的这一安全漏洞,并将它命名为 cve – 2016 – 0728。据报道,可能已经有数百万设备暴露在该安全漏洞之下,这听起来似乎很可怕,Linux Story 此前也报道过。 那么到底这一漏洞对我们有多大的危害呢?谷歌可出来辟谣了。 据谷歌官方透露,这一漏洞并没有想象中那样的可怕,甚至可以说没有多大危害。准确来说,Andriod上 的所谓“安全漏洞”更加准确地说法是“安全泄露”. 同时谷歌的安全问题高管也在 Google+ 上面发表了文章表示将严肃对待这一漏洞,谷歌也表示已经推出了相应的补丁来修补这一漏洞了。 ====================================分割线================================文章转载自 开源中国社区[http://www.oschina.net]

优秀的个人博客,低调大师

谷歌发布开源 AI 项目 Androidify,可生成个性化“安卓人”

谷歌日前正式上线全新 AI 应用 Androidify,用户可通过上传自拍或输入提示词,借助 AI 技术生成专属的 Android 机器人形象。该应用现已在网页端及 Google Play 商店同步开放下载。 据介绍,Androidify 集成了 Gemini 与 Firebase AI Logic SDK,支持图像验证、自动生成描述以及个性化机器人生成等功能。 应用会先利用 Gemini 2.5 Flash 对用户上传的照片进行检测,确保画面清晰且符合安全标准,随后生成详细描述,并调用 Imagen 3 模型生成最终的机器人形象。 值得一提的是,最新版本还新增了“背景氛围生成”与“贴纸模式”。前者可通过 Gemini 模型为机器人添加场景背景,后者则利用 ML Kit 分割技术去除背景,生成可在聊天应用中使用的 PNG 贴纸。 谷歌表示,Androidify 的目标是让用户在轻松娱乐的同时,体验到 AI 与 Android 技术结合所带来的创造力与个性化。 该项目已开源:https://github.com/android/androidify

优秀的个人博客,低调大师

FlexSQL 安卓版,无需写 SQL 语句的 ORM,自动同步表结构

FlexSQL For Android 1.引入Gradle依赖 implementation 'cn.vonce:flexsql-android:1.7.0' annotationProcessor 'cn.vonce:flexsql-android:1.7.0' 2.标注实体类 //实体类基类 @Data public class BaseEntity { @SqlId(type = IdType.SNOWFLAKE_ID_16) @SqlColumn(notNull = true, remarks = "唯一id")//字段不能为null,表字段注释 private Long id; @SqlColumn(remarks = "创建者")//表字段注释 private Long creator; @SqlDefaultValue(with = FillWith.INSERT) @SqlColumn(remarks = "创建时间")//表字段注释 private Date createTime; @SqlColumn(remarks = "更新者")//表字段注释 private Long updater; @SqlDefaultValue(with = FillWith.UPDATE) @SqlColumn(remarks = "更新时间")//表字段注释 private Date updateTime; @SqlLogically @SqlColumn(remarks = "是否删除(0正常 1删除)")//表字段注释 private Boolean deleted; } //构建项目(Rebuild Project)后会根据实体类生成字段常量,例如User类生成的常量类是User$,例如获取id字段是User$.id$ @Data //autoAlter设置为true,实体类有变动时自动同步表结构 @SqlTable(autoAlter = true, value = "t_user", remarks = "用户") public class User extends BaseEntity { @SqlColumn(notNull = true, remarks = "用户名")//字段不能为null,表字段注释 private String userName; @SqlColumn(remarks = "姓名")//表字段注释 private String nickName; @SqlColumn(notNull = true, remarks = "手机号码")//表字段注释 private String mobilePhone; @SqlColumn(notNull = true, remarks = "密码")//表字段注释 private String password; @SqlColumn(notNull = true, remarks = "性别")//表字段注释 private Integer gender; @SqlColumn(remarks = "年龄")//表字段注释 private Integer age; @SqlColumn(remarks = "电子邮箱")//表字段注释 private String email; @SqlColumn(remarks = "头像", oldName = "head_portrait")//表字段注释,修改表字段名称需要在oldName指定旧的名称 private String avatar; @SqlDefaultValue(with = FillWith.INSERT) @SqlColumn(notNull = true, remarks = "状态(0正常 1停用)")//字段不能为null,表字段注释 private UserStatus status; } 3.获取连接(建议在上一步把所有表字段关系建立好,第一次获取连接时会自动创建表结构) public class MainActivity extends AppCompatActivity { private SqlBeanHelper<Essay, String> essaySqlBeanHelper; //private SqlBeanHelper<User, String> userSqlBeanHelper; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); //方式一,单库模式 SQLiteHelper.init(this, "testdb", 1);//建议放在MainActivity或继承的Application essaySqlBeanHelper = SQLiteHelper.db().get(Essay.class); //方式二,多库模式 //essaySqlBeanHelper = SQLiteHelper.db(this, "testdb1", 1).get(Essay.class); //userSqlBeanHelper = SQLiteHelper.db(this, "testdb2", 1).get(User.class); } } 4.CRUD操作 public class MainActivity extends AppCompatActivity { private SqlBeanHelper<Essay, String> sqlBeanHelper; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); SQLiteHelper.init(this, "testdb", 1); sqlBeanHelper = SQLiteHelper.db().get(Essay.class); } //查询 public void select() { //查询列表 List<User> list = userService.select(); list = sqlBeanHelper.selectBy(Wrapper.where(Cond.gt(User$.id$, 10)).and(Cond.lt(User$.id$, 20))); //指定查询 list = sqlBeanHelper.select(new Select().column(User$.id$, User$.user_name$, User$.mobile_phone$).where().gt(User$.id$, 10)); //查询一条 User user = sqlBeanHelper.selectById(1L); user = sqlBeanHelper.selectOneBy(Wrapper.where(eq(User$.id$, 1001))); //sql语义化查询《20岁且是女性的用户根据创建时间倒序,获取前10条》 list = sqlBeanHelper.select(new Select().column(User$.id$, User$.user_name$, User$.mobile_phone$).where().eq(User$.age$, 20).and().eq(User$.gender$, 0).back().orderByDesc(User$.create_time$).page(0, 10)); //联表查询《广州或深圳的18岁的女性用户,根据创建时间倒序,查询前10条用户的信息和地址》 Select select = new Select(); select.column(User$.id$, User$.user_name$, User$.mobile_phone$, UserAddress$.province$, UserAddress$.city$, UserAddress$.area$, UserAddress$.details$); select.innerJoin(UserAddress.class).on().eq(UserAddress$.id$, User$.id$); select.where().eq(User$.age$, 18).and().eq(User$.gender$, 0).and(condition -> condition.eq(UserAddress$.city$, "广州").or().eq(UserAddress$.city$, "深圳")); select.orderByDesc(User$.create_time$); select.page(0, 10); //查询Map Map<String, Object> map = sqlBeanHelper.selectMap(select); List<Map<String, Object>> mapList = sqlBeanHelper.selectMapList(select); } //分页 public void getPageList() { // 查询对象 Select select = new Select(); PageHelper<User> pageHelper = new PageHelper<>(0, 10); pageHelper.paging(select, sqlBeanHelper); ResultData<List<Essay>> data = pageHelper.getResultData(); } //统计(函数使用) public void getStatistics() { Select select = new Select(); select.column(SqlFun.count(User$.id$), "count").column(SqlFun.avg(User$.age$)); select.where().gt(SqlFun.date_format(User$.create_time$, "%Y-%m-%d"), "2024-06-24"); select.groupBy(User$.gender$); select.orderByDesc("count"); List<Map<String, Object>> mapList = sqlBeanHelper.selectMapList(select); } //更新 public void update(Essay essay) { //根据bean内部id更新 long i = sqlBeanHelper.updateByBeanId(essay); //根据外部id更新 //i = sqlBeanHelper.updateById(essay, 20); //根据条件更新 //i = sqlBeanHelper.update(new Update<User>().set(User$.gender$, 1).set(User$.name$, "Jovi").setAdd(User$.age$, User$.age$, 1).where().eq(User$.id$, 111).back()); } //删除 public void deleteById(String[] id) { //根据id删除 long i = sqlBeanHelper.deleteById(id); //根据条件删除 //i = sqlBeanHelper.deleteBy(Wrapper.where(gt(User$.age$, 22)).and(eq(User$.gender$, 1))); } //插入 public void add() { List<Essay> essayList = new ArrayList<>(); for (int i = 0; i < 100; i++) { Essay essay = new Essay(i, "name" + i); essayList.add(essay); } sqlBeanHelper.insert(essayList); } }

优秀的个人博客,低调大师

安卓恶意软件FlyTrap席卷超百个国家和地区

近日,一种名为FlyTrap的新型Android木马,攻击了一百多个国家/地区的10,000多名受害者。 根据安全公司Zimperium的报告,自3月以来,这个被命名为FlyTrap的木马已经通过社交媒体劫持、第三方应用程序商店进行广泛传播。 Zimperium的zLabs移动威胁研究团队首先确定了该恶意软件,并发现该恶意软件通过感染Android设备来劫持Facebook等社交媒体帐户,允许攻击者从受害者那里收集信息,例如Facebook ID、位置、电子邮件地址和IP地址以及与用Facebook帐户相关联的cookie和令牌。 Zimperium研究人员写道:“这些被劫持的Facebook账号会话中可被添加木马链接,并通过受害者的地理位置和详细信息进行虚假宣传,形成恶意传播,损害受害者社会信誉。” “这些社会工程技术在互联网世界中非常有效,攻击者通过利用对用户有吸引力的主题,例如免费的Netflix优惠券代码、Google AdWords优惠券代码、投票选出最佳足球球队或球员等信息吸引受害者,将恶意软件从一个受害者传播到另一个。” 研究人员将恶意软件归因于越南的攻击组织,并表示该组织能够使用Google Play和其他应用程序商店传播恶意软件。谷歌收到了一份关于恶意软件的报告,对其进行了验证并从商店中删除了所有相关恶意应用程序。 但报告指出,仍有三个恶意软件可在第三方、不安全的应用程序商店中下载到。 【本文是51CTO专栏作者“安全牛”的原创文章,转载请通过安全牛(微信公众号id:gooann-sectv)获取授权】 戳这里,看该作者更多好文 【责任编辑:赵宁宁 TEL:(010)68476606】 点赞 0

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

用户登录
用户注册