出口活动许可AppWidget配置活动 [英] Exported Activity Permission for AppWidget Configuration Activity

查看:144
本文介绍了出口活动许可AppWidget配置活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出口=真正的标记:

后,我加入了的android我得到此警告在清单文件我AppWidget的配置活动。这就是它看起来像...

 <活动机器人:名字=。widgets.WidgetConfigurationActivity
              机器人:主题=@安卓风格/ Theme.Translucent
              机器人:出口=真正的>
         &所述;意图滤光器>
               <作用机器人:名字=android.appwidget.action.APPWIDGET_CONFIGURE/>
         &所述; /意图滤光器>
< /活性GT;

我得到的警告是出口活动并不需要许可。从我的理解,在导出标记设置为true,意味着没有涉及到我的应用程序的另一个应用程序可以访问它(这将使意义,因为在主屏幕上启动应用程序需要启动我AppWidget的配置活动)。有谁知道我需要在这里添加,使这个不给错误是什么样的权限?


解决方案

  

从我的理解,导出的标签设置为true,意味着没有涉及到我的应用程序的另一个应用程序可以访问它。


正确的。请注意,这是多余的位置:有一个<意向滤光器> 使活动被默认出口


  

有谁知道我需要什么样的权限在此补充,使这个不给错误?


据我所知,你不能保证主屏幕有任何特定的权限。

恕我直言,这是我提出了相关的问题为错误的警告,人们 这应该是固定的一天。

I'm getting this warning for my AppWidget's configuration activity in the manifest file after I added the android:exported="true" tag. This is what it looks like...

<activity android:name=".widgets.WidgetConfigurationActivity"
              android:theme="@android:style/Theme.Translucent"
              android:exported="true" >
         <intent-filter>
               <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
         </intent-filter>
</activity>

The warning I'm getting is "Exported activity does not require permission". From my understanding, setting the exported tag to true means that another application not related to my app can access it (which would make sense since the home screen launcher apps needs to launch my AppWidget's configuration activity). Does anyone know what kind of permission I need to add here to make this not give an error?

解决方案

From my understanding, setting the exported tag to true means that another application not related to my app can access it

Correct. Note that it is superfluous here: having an <intent-filter> makes the activity be exported by default.

Does anyone know what kind of permission I need to add here to make this not give an error?

AFAIK, you cannot guarantee that the home screen has any particular permission.

IMHO, this is an erroneous warning, one that I filed a related issue for that should be fixed someday.

这篇关于出口活动许可AppWidget配置活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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