草庐IT

user_permissions

全部标签

android - android native 应用程序的默认 User-Agent 字符串是什么?

androidnative应用程序请求的默认User-Agent字符串是什么? 最佳答案 这个字符串可以像这样从系统属性中获得:StringuserAgent=System.getProperty("http.agent") 关于android-androidnative应用程序的默认User-Agent字符串是什么?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/2024552

java - Robolectric 给我一个 java.lang.IllegalArgumentException : INTERNET permission is required

我正在为现有应用改造单元测试。当我运行这个简单的单元测试时importorg.junit.Test;importorg.junit.runner.RunWith;importorg.robolectric.RobolectricGradleTestRunner;importorg.robolectric.annotation.Config;importstaticjunit.framework.Assert.assertTrue;@RunWith(RobolectricGradleTestRunner.class)@Config(constants=BuildConfig.class,

android - "developer options not available for this user"棉花糖

我的带棉花糖的GalaxyS6Edge手机遇到了一个非常有趣的问题。当我进入开发者选项时。我收到的不是一长串选项列表,而是“此用户无法使用开发人员选项”的消息。据我所知,我没有任何其他用户(老实说,我什至不知道如何添加用户)。我看到几个人对kitkat有类似的问题,但他们甚至无法在设置中获得开发者选项菜单项。我有那个开发者选项项目,实际上我已经有一段时间了。我最近没有做任何特别的事情,我想知道以前是否有人遇到过这种情况,是否有一种无需恢复出厂设置即可解决此问题的方法。最后还有一些可能与此相关/可能无关的症状。屏幕底部的任务切换按钮不起作用。通知面板上的设置按钮不起作用编辑:我必须通过恢

android - 如何强制将权限 "android.permission.CAMERA"添加到代号一中的 list 中

我正在尝试在代号一中显示后置摄像头的实时预览。我为此使用native界面(我首先针对Android)。为了让我的应用程序在不弄乱构建提示的情况下使用相机,我在我的主窗体中添加了这些行:if(Capture.hasCamera()){Dialog.show("Appareilphotodétecté","Votrematérielestbienéquipéd'unappareilphoto!","OK",null);}我这样做是因为CodenameOneblog声明android.hardware.camera&android.permission.RECORD_AUDIO-aretri

android - android.permission.RECEIVE_BOOT_COMPLETED 不是必需的吗?

有谁知道为什么我的应用程序仍然收到ACTION_BOOT_COMPLETED广播,即使我的应用程序在list文件中没有权限android.permission.RECEIVE_BOOT_COMPLETED?我认为这是必需的,但我使用的一些教程也没有。有几个人做到了。我使用运行CyanogenMod的手机进行测试,但我怀疑这是否重要。LogCat会在每次启动时显示我的“启动通知”日志。使用的代码见下文。AndroidManifest.xml报警接收器类publicclassAlarmReceiverextendsBroadcastReceiver{privatestaticfinalSt

android - java.lang.UnsupportedOperationException : Session: an attempt was made to request new permissions for a session that has a pending request 异常

以下代码用于在android中使用facebookSDK3.0发布状态更新。如果我使用的是UiLifeCycleHelper类,则它运行良好。但是我想在不使用UiLifeCycleHelper类的情况下在facebook中发布状态。我尝试了下面的代码,它在我的logcat中抛出错误并且我的应用程序被强制关闭。publicclassSampleFBPostActivityextendsActivityimplementsOnClickListener{privateEditTextmPostEditText;privateButtonmDoneButton;privateSessionm

android - 使 Android "uses-permission"可选

我有这些:我可以自己检查GPS:locationManager=(LocationManager)context.getSystemService(Context.LOCATION_SERVICE);fSupportsGPS=(locationManager.getAllProviders().contains(LocationManager.GPS_PROVIDER));但我还是有些疑惑。我希望我的应用程序在没有可用wifi/gps/网络的设备上运行。我唯一使用GPS的原因是在Googlemap上显示用户位置。(与应用程序的其余部分相比,这是一个微小的功能,所以我不想对它有任何要求。

android - 在 android AccountService.verifyCredentials() 中使用结构的 twitter 登录不将 new Callback<User> () 作为参数

我想在androidtwitter成功登录后获取所有用户信息。对于twiiter登录,我使用Fabric。这是我的代码。在onCreate()中twitterLoginButton=(TwitterLoginButton)findViewById(R.id.twitterLogin);twitterLoginButton.setCallback(newCallback(){@Overridepublicvoidsuccess(Resultresult){//IfloginsucceedspassingtheCallingtheloginmethodandpassingResultobj

java - 解决SecurityException : Permission Denial: starting Intent. 我需要什么权限?

我想从应用程序打开Play商店。在三星还好,在一加手机就失败了。我不知道alibaba是从哪里来的。很奇怪。异常java.lang.SecurityException:权限被拒绝:启动Intent{act=android.intent.action.VIEWdat=http://play.google.com/...cmp=com.alibaba.intl.android.apps.poseidon/com.alibaba.android.intl.weex.activity.WeexPageActivity}来自ProcessRecord{a1dd30c15827:a2bliving

安卓 : Open Multiple Chat Window for different users

我想通过为不同的聊天用户多次调用单个Activity来打开多个聊天窗口。我曾尝试使用通知打开不同的聊天用户Activity窗口,但它失败了。只打开一个聊天窗口。谁能给我建议怎么做。?或打开多聊天窗口的任何想法或替代方式..?帮助将不胜感激!! 最佳答案 据我所知,您需要使用Androidfragment。http://developer.android.com/guide/components/fragments.html每个聊天窗口都应该是它自己的fragment,但只有一个Activity。