清除默认的Andr​​oid应用 [英] Clear Default Android Application

查看:134
本文介绍了清除默认的Andr​​oid应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以知道用户已设置默认应用程序的特定操作?一世。即android.intent.action.CALL_PRIVILEGED

假设我我的应用程序还提供了对Call_privilaged行动调用。但用户已设置内置的拨号器的默认启动器Call_privilaged行动。

我的问题是,我可以知道亲语法该用户已设置拨号器的默认启动器Call_privalged行动。

感谢你。

解决方案
  

我们可以知道用户已设置默认应用程序的特定操作?一世。即android.intent.action.CALL_PRIVILEGED

我不认为有一个简单的方法来做到这一点。呼叫获取preferredActivities() PackageManager ,并通过筛选的名单,其中,IntentFilter的&GT ; 你回来,试图找到一个匹配的意图可能工作

Can we know that user has set default application for particular action? i. e. android.intent.action.CALL_PRIVILEGED

Suppose I my application also provide called on action of Call_privilaged. but user has set inbuilt dialer as default launcher for Call_privilaged action.

My question is can I know pro grammatically that user has set dialer as default launcher for Call_privalged action.

Thank You.

解决方案

Can we know that user has set default application for particular action? i. e. android.intent.action.CALL_PRIVILEGED

I do not think that there is an easy way to do this. Calling getPreferredActivities() on PackageManager, and sifting through the List<IntentFilter> you get back to try to find a match for your Intent might work.

这篇关于清除默认的Andr​​oid应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆