草庐IT

allow_none

全部标签

android - 在 RunTime.exec "uid 1000 not allowed to su"上出现错误 (“su”)

当我尝试从具有系统权限的程序运行su命令时,我在stderr上返回了这个错误:uid1000notallowedtosu我将共享uid设置为android.uid.system或android.uid.shell但它没有改变任何东西。该设备应该是Root过的。我真的不明白发生了什么。代码如下:privatebooleanrunAsRoot(Stringcmd,Fileworkdir)throwsIOException{Log.i(LOG_TAG,"Executecommandasroot:"+cmd);Processp=Runtime.getRuntime().exec(newStri

安卓棉花糖 : How to allow Runtime Permissions programatically?

我正在开发一个需要一些系统权限的应用程序,但是在AndroidMarshmallow上安装时不再自动授予这些权限。我想在运行时请求这些权限并运行某种自动化来授予它们,而无需用户在系统权限对话框出现时点击“允许”按钮。我怎样才能做到这一点?在Marshmallow和更高版本中有什么办法可以做到这一点吗? 最佳答案 对于Marshmallow或更高版本的权限不会在安装时授予,必须在运行时需要时请求(如果之前未授予。)为此,您需要运行ActivityCompat.requestPermissions()在您的Activity中弹出系统权限

安卓 : How to Allow Only One Touch?

如何在Android上只允许一次触摸?我不想支持多点触控,如果我的一根手指已经在触摸屏幕,我希望我的应用程序放弃其他触摸。这就像在iOS上使用独占触摸。另外,有没有办法设置允许的触摸次数?谢谢!编辑:最小目标API=8。 最佳答案 是的,您可以使用此android:splitMotionEvents="false"或android:windowEnableSplitTouch="false"禁用多点触控 关于安卓:HowtoAllowOnlyOneTouch?,我们在StackOverf

android - ServiceWorker 注册失败 : DOMException: Only secure origins are allowed (see: https://goo. gl/Y0ZkNV)

我编写了代码来获取GCMid以发送chrome推送通知。我写了下面的代码来获取GCMid。varChromePushManager=function(serviceWorkerPath,callback){if('serviceWorker'innavigator){navigator.serviceWorker.register(serviceWorkerPath).then(function(registration){//Registrationwassuccessfulconsole.log('ServiceWorkerregistrationsuccessfulwithsco

Android:程序化 'allow reorientation' 首选项仅适用一次

我有一个带有键“allow_reorientation”的CheckBoxPreference。如果启用,那么我的主要Activity应该在设备旋转时重新定向,如果禁用,它应该保持在当前方向。我在我的manifest.xml中设置了'android:configChanges="orientation"'以允许自定义处理方向更改。来self的主要Activity类:@OverridepublicvoidonConfigurationChanged(ConfigurationnewConfig){super.onConfigurationChanged(newConfig);Shared

java - 移动SDK错误: OPERATION_NOT_ALLOWED

我已经下载并注册了适用于Android的HerePremiumMobileSDK的评估。但是,在初始化期间返回错误:OPERATION_NOT_ALLOWED。我做错了什么吗?HERE是否需要在他们这边集中做一些事情来进行评估?mapFragment=(MapFragment)getFragmentManager().findFragmentById(R.id.mapfragment);mapFragment.init(newOnEngineInitListener(){@OverridepublicvoidonEngineInitializationCompleted(OnEngin

mysql - 错误 1130 (HY000) : Host '' is not allowed to connect to this MySQL server

这个问题在这里已经有了答案:Host'xxx.xx.xxx.xxx'isnotallowedtoconnecttothisMySQLserver(28个回答)关闭5年前。为什么我连接不上mysql?mysql-uroot-ptest101-hxxx.xxx.xxx.xxxERROR1130(HY000):Host'xxx.xxx.xxx.xxx'isnotallowedtoconnecttothisMySQLserver在my.cnf我有以下内容#Insteadofskip-networkingthedefaultisnowtolistenonlyon#localhostwhichis

mysql - 错误 1130 (HY000) : Host '' is not allowed to connect to this MySQL server

这个问题在这里已经有了答案:Host'xxx.xx.xxx.xxx'isnotallowedtoconnecttothisMySQLserver(28个回答)关闭5年前。为什么我连接不上mysql?mysql-uroot-ptest101-hxxx.xxx.xxx.xxxERROR1130(HY000):Host'xxx.xxx.xxx.xxx'isnotallowedtoconnecttothisMySQLserver在my.cnf我有以下内容#Insteadofskip-networkingthedefaultisnowtolistenonlyon#localhostwhichis

android - Cordova geolocation watchPosition frequency is higher the options allow it

在我的ionic/angularjs应用程序中,我使用了地理定位插件:https://github.com/apache/cordova-plugin-geolocation就像在我使用它来配置watch的文档中一样:varwatchOptions={frequency:10*1000,timeout:60*60*1000,enableHighAccuracy:true//maycauseerrorsiftrue};watch=navigator.geolocation.watchPosition(on_success,on_error,watchOptions);但是在android

android - HTML 输入 : force numeric keyboard by default but allow letters

我有一个HTML输入。输入在Android手机上的Chrome中打开的网页上。我想要一个选项,让用户在开始输入值时看到数字键盘。但与此同时,我希望他能够输入字母数字字符。我不能使用type="number",因为它不允许输入字母。我不能使用type="text",因为它默认打开字母键盘,用户必须切换到数字键盘。所以我试图找到的选项是当标准字母数字键盘打开但数字输入已经被选中时(就像你在标准键盘上按?123时一样)。我试过使用type="tel"但我不明白如何从数字切换到字母。我正在使用Cordova,所以如果没有使用HTML执行此操作的选项,我可以使用native插件,如果你建议我使用