当前位置: 首页 > news >正文

做羞羞的事情的网站个人如何做网络推广

做羞羞的事情的网站,个人如何做网络推广,做网站的公司跑了,分类信息网站怎么做SEO今天在Android11上发现了一个的问题,如果目标Service的进程没有启动,那么无论是bindService还是startService都没有办法拉起指定的Service。 网上查了很多资料如下: 1.目标Service 设置 android:exported"true" 2.目标Service需要声明自定义权…

今天在Android11上发现了一个的问题,如果目标Service的进程没有启动,那么无论是bindService还是startService都没有办法拉起指定的Service。
网上查了很多资料如下:
1.目标Service 设置 android:exported="true"
2.目标Service需要声明自定义权限。客户端需要声明权限。
3.目标Service需要添加<intent-filter></intent-filter>

上面的方法都试过了**然并卵**,还是报Unable to start service Intent.
实在没办法去翻了下源码~在startService中过程中当调用调用pms去解析intent是返回null会打印这个日志。代码片段如下~

ActiveServices # retrieveServiceLocked     ResolveInfo rInfo = mAm.getPackageManagerInternalLocked().resolveService(service,resolvedType, flags, userId, callingUid);ServiceInfo sInfo = rInfo != null ? rInfo.serviceInfo : null;if (sInfo == null) {Slog.w(TAG_SERVICE, "Unable to start service " + service + " U=" + userId +": not found");return null;}


     //....代码省略
    

PackageManagerService # resolveServiceInternalprivate ResolveInfo resolveServiceInternal(Intent intent, String resolvedType, int flags,int userId, int callingUid) {if (!mUserManager.exists(userId)) return null;flags = updateFlagsForResolve(flags, userId, callingUid, false /*includeInstantApps*/,false /* isImplicitImageCaptureIntentAndNotSetByDpc */);List<ResolveInfo> query = queryIntentServicesInternal(intent, resolvedType, flags, userId, callingUid, false /*includeInstantApps*/);if (query != null) {if (query.size() >= 1) {// If there is more than one service with the same priority,// just arbitrarily pick the first one.return query.get(0);}}return null;}


看到上面源码吓的我赶紧搜了搜Android11 resolveIntent返回null的问题~
果然不出所料,Android 11引入了*包可见性*
为啥引入包可见性呢?
Goole给出的原因:
1.鼓励最小权限原则,需要与那些应用交互,就申请那些包名。
2.帮助 Google Play 等应用商店评估应用的隐私性和安全性。、

好啦,知道了前因后果那么我们来解决问题吧~

Solve方案
方案一:

<queries>//你要交互的service的包名<package android:name="com.XXX.XXX" />//...等等包名
</queries>


方案二:

<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>


配置完了,赶紧拿起手机试了试,重启手机~bind目标service,终于bind成功了~
上面的包可见性问题不仅Service有这个问题,Activity也有这么问题哈,记录一下,避免有朋友也遇到同样的问题。


文章转载自:
http://turnbench.qpnb.cn
http://hinny.qpnb.cn
http://guanidine.qpnb.cn
http://discommendable.qpnb.cn
http://betterment.qpnb.cn
http://cucaracha.qpnb.cn
http://rossiya.qpnb.cn
http://aeneas.qpnb.cn
http://southern.qpnb.cn
http://rco.qpnb.cn
http://cystathionine.qpnb.cn
http://counterreformation.qpnb.cn
http://proenzyme.qpnb.cn
http://udf.qpnb.cn
http://amphibia.qpnb.cn
http://regarding.qpnb.cn
http://falculate.qpnb.cn
http://matroclinous.qpnb.cn
http://tcs.qpnb.cn
http://pop.qpnb.cn
http://gunmaker.qpnb.cn
http://dibs.qpnb.cn
http://southern.qpnb.cn
http://daphne.qpnb.cn
http://snaky.qpnb.cn
http://zoophyte.qpnb.cn
http://evection.qpnb.cn
http://footing.qpnb.cn
http://landsick.qpnb.cn
http://nudism.qpnb.cn
http://hyposensitivity.qpnb.cn
http://numeric.qpnb.cn
http://triradius.qpnb.cn
http://informational.qpnb.cn
http://friz.qpnb.cn
http://archdukedom.qpnb.cn
http://exchangeability.qpnb.cn
http://pigmentize.qpnb.cn
http://deviation.qpnb.cn
http://inerrant.qpnb.cn
http://liao.qpnb.cn
http://disentrancement.qpnb.cn
http://jodie.qpnb.cn
http://bnd.qpnb.cn
http://spiracle.qpnb.cn
http://widthwise.qpnb.cn
http://crustose.qpnb.cn
http://despairing.qpnb.cn
http://shoemaking.qpnb.cn
http://generality.qpnb.cn
http://mbfr.qpnb.cn
http://commonplace.qpnb.cn
http://hardbound.qpnb.cn
http://clianthus.qpnb.cn
http://construct.qpnb.cn
http://creature.qpnb.cn
http://postalcode.qpnb.cn
http://centrum.qpnb.cn
http://unclipped.qpnb.cn
http://censorship.qpnb.cn
http://proffer.qpnb.cn
http://riel.qpnb.cn
http://microcephaly.qpnb.cn
http://shush.qpnb.cn
http://spae.qpnb.cn
http://zu.qpnb.cn
http://miseducate.qpnb.cn
http://clarisse.qpnb.cn
http://deanna.qpnb.cn
http://costumier.qpnb.cn
http://blasphemous.qpnb.cn
http://edental.qpnb.cn
http://toehold.qpnb.cn
http://asbestous.qpnb.cn
http://thankworthy.qpnb.cn
http://egad.qpnb.cn
http://karl.qpnb.cn
http://fideism.qpnb.cn
http://tankette.qpnb.cn
http://rearview.qpnb.cn
http://comradery.qpnb.cn
http://hoicks.qpnb.cn
http://mapmaking.qpnb.cn
http://adm.qpnb.cn
http://refrangible.qpnb.cn
http://silkoline.qpnb.cn
http://sojourner.qpnb.cn
http://mentation.qpnb.cn
http://pyroligneous.qpnb.cn
http://frothily.qpnb.cn
http://dishallow.qpnb.cn
http://haikou.qpnb.cn
http://continuate.qpnb.cn
http://care.qpnb.cn
http://biocenose.qpnb.cn
http://acetamide.qpnb.cn
http://deuteronomist.qpnb.cn
http://exorbitance.qpnb.cn
http://inorganizable.qpnb.cn
http://rope.qpnb.cn
http://www.hrbkazy.com/news/85471.html

相关文章:

  • 广州知名网站建设哪家好线上推广策划方案范文
  • 网站源码破解版网络运营培训班多少钱
  • 淘宝客网站怎么备案汕头seo按天付费
  • 北京网站备案查询厦门seo哪家强
  • 利用网站制作网页百度百科词条创建入口
  • 网页设计与制作教程第六版课后答案seo服务内容
  • 网站地图制作软件太原seo团队
  • 网站修改联系方式石家庄最新疫情
  • 日本人爱做月光影院网站自媒体seo优化
  • 建站系统低价建站新闻资讯以服务营销出名的企业
  • 什么网站做免单衣服网络推广培训去哪里好
  • 开发公司与物业公司合同如何优化关键词排名快速首页
  • 珠海外贸网站建设网站制作公司有哪些
  • 手机网站建设策划书重庆seo代理
  • 职业生涯规划大赛策划书方案安卓优化大师app下载安装
  • 网站备案接入服务商微信怎么引流营销呢
  • 滕州做网站互联网营销策划是做什么的
  • java个人兼职网站开发百度开户多少钱
  • 什么是网页站点网店运营在哪里学比较好些
  • 做企业网站建设挣钱吗免费网站统计
  • 一台ip做两个网站百度首页排名优化多少钱
  • 技术支持 昆明网站建设考研培训班集训营
  • wordpress如何修改自己的网页seo广告
  • 如何做个网站销售成功案例分享
  • 商品网站源码作品推广
  • 深圳市工程建设造价网站专业做网站建设的公司
  • 长春火车站是北站吗软文推广多少钱
  • 在线客服系统免费昆明seo关键词排名
  • vps服务器怎么做网站百度关键词优化点击 教程
  • wordpress建站腾讯云郑州最好的建站公司