permissions

“Write settings” permission not granted marshmallow android

狂风中的少年 提交于 2019-12-19 19:53:46
问题 <uses-permission android:name="android.permission.WRITE_SETTINGS" I have declared above line in my manifest ,and i ask for permission on activity start but unlike other permissions,after restarting my app,it again asks for permission.When i check if permission has been granted or not,i get result that says not granted for only this permission but when i checked the same thing with other permissions ,they are granted after the user has done so. ActivityCompat.requestPermissions(SplashScreen

Asking for permissions at run-time, Android M+

泄露秘密 提交于 2019-12-19 19:49:25
问题 Firstly, I know this is a duplicate question, but I've been over the answers from other similar questions and haven't been able to find success with any of those solutions. I've developed an app which works perfectly on my testing device which is a Samsung S4 running Android L (5.0.1) however I would like for this app to also work on newer versions of Android. I understand that requesting permissions have changed for Android M+ so that they have to be asked at run-time, but when I try to

Detecting wether a permission can be requested or is permanently denied

廉价感情. 提交于 2019-12-19 19:43:12
问题 Situation One of my fragments accesses the camera. So of course i need to check the permission in my activity first, before i redirect to it. If the user denies the permission the Activity finishes and redirects him to the previous Activity he was in. Additionally i would like to show a different fragment when the Activity starts and detects that the permission was permanently denied. (The little checkbox "Never ask again" on the android permission dialog) Problem I could not find a proper

Best way to check if directory is writable in BAT script?

若如初见. 提交于 2019-12-19 17:39:24
问题 How can I check whether a directory is writable by the executing user from a batch script? Here's what I've tried so far: > cd "%PROGRAMFILES%" > echo. > foo Access is denied. > echo %ERRORLEVEL% 0 Ok, so how about... > copy NUL > foo Access is denied. > echo %ERRORLEVEL% 0 Not that either? Then what about... > copy foo bar Access is denied. 0 file(s) copied. > echo %ERRORLEVEL% 1 This works, but it breaks if the file doesn't exist. I've read something about internal commands not setting

How to play audio in background with firefox os?

*爱你&永不变心* 提交于 2019-12-19 17:38:23
问题 In my manifest file I've add the audio-channel-content in permissions: "permissions": { "audio-channel-content":{"description":"Use the audio channel for the music player"} } In my index.html I've got an audio tag like: <audio mozaudiochannel="content" preload="none" src="http://my-stream-url"></audio> I can play my audio stream during 2mn: The first one when the phone is unlock. After 1mn my phone auto-lock the screen and it continue playing for another minute. Does it possible to play this

Android 6.0 needs restart after granting user permission at runtime

本秂侑毒 提交于 2019-12-19 12:49:17
问题 I follow this guide to ask for permissions for Android 6.0, https://developer.android.com/preview/features/runtime-permissions.html#support-lib However, I have to destroy my application and re-launch to actually have the WRITE_EXTERNAL_STORAGE permission, otherwise it keeps failing for file creation. Am I missing something? if(ActivityCompat.checkSelfPermission(mContext, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_DENIED){ ActivityCompat.requestPermissions(

capture permission granted complete event

守給你的承諾、 提交于 2019-12-19 11:27:00
问题 I'm creating an app using flash cc. I needed storage permission. It turns out I needed to ask user the permission for using storage devices. I can ask user for permission and it is working fine. I use examples from this website: https://helpx.adobe.com/flash-player/release-note/fp_24_air_24_release_notes.html But my problem is I wasn't able to capture the complete event for accessing the storage permission. Because of that I couldn't run codes after I get access to storage. Is it possible to

Encountered errors while bringing up the project

让人想犯罪 __ 提交于 2019-12-19 10:52:13
问题 I have a problem when I am installing odoo 10 by docker. I can't compose up docker.error while creating mount source path. People can help me! Thanks! ERROR: for dockercomposeodoo100_odoo10_1 Cannot start service odoo10: b"error while creating mount source path '/host_mnt/c/Users/hoang/Downloads/docker-compose-odoo-10.0/o_etc': mkdir /host_mnt/c/Users/hoang/Downloads: permission denied" ERROR: for odoo10 Cannot start service odoo10: b"error while creating mount source path '/host_mnt/c/Users

PhoneGap “Failed to load resource: the server responded with a status of 404 (Not Found)”

笑着哭i 提交于 2019-12-19 10:27:46
问题 I have a web application that I recently tried converting into PhoneGap, but for some reason, when running it on my android, it doesn't have access to the internet. When debugging with chrome via usb, I see the error "Failed to load resource: the server responded with a status of 404 (Not Found)" for all external requests (e.g. loading google fonts as stylesheets from fonts.googleapis.com in my html, and calling firebase from my js). I'm using the default <access origin="*"/> directive, which

Permissions with Git Post-Receive

不打扰是莪最后的温柔 提交于 2019-12-19 10:06:20
问题 I have setup git locally and on my server and created a 'post-receive' so that when I do a push to the live server it should then checkout to the virtual hosts directory of the website. #!/bin/sh GIT_WORK_TREE=/var/www/domainname/public_html/ git checkout -f However, when I try to do my push, it goes out the master successfully but I get permission denied errors when trying to create those files on my server web root. e.g. remote: error: unable to create file index.php (Permission denied)