permissions

Android storage access framework persistable permission not granted during asyntask

半腔热情 提交于 2019-12-12 03:46:54
问题 I set the intent flags here: public void createAlbum(View view) { Intent intent = new Intent(); intent.setType("image/*"); intent.setAction(Intent.ACTION_OPEN_DOCUMENT); intent.addCategory(Intent.CATEGORY_OPENABLE); intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true); intent.addFlags(Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION); String intentChooserDialog = getResources().getString(R.string.pick_image_dialog); startActivityForResult(Intent.createChooser(intent, intentChooserDialog), PICK

Vibrator permission force close

主宰稳场 提交于 2019-12-12 03:43:23
问题 I have this line of code calling 2 seconds from the vibrator_service ; Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); v.vibrate(2000); and this in my manifest <permission android:name="android.permission.VIBRATE" ></permission> But I am still getting a force close java.lang.security.exception: Requires Vibrate Permission . Have I declared the permission wrong?? 回答1: You need to add a uses-permission tag in the manifest file (as a child of the manifest element, same as the

Mapping of access mask in DACL for CNG keys

扶醉桌前 提交于 2019-12-12 03:29:18
问题 (Note: IMO the question is mainly about WinAPI and DACL and not about CNG, so please read on!) I'm currently trying to modify the sample CNG key storage provider of Microsoft's Cryptographic Provider Development Kit in such a way that it does not store the keys in single files. However, I'm in trouble with the security descriptors that can be assigned to the private keys. In the Certificates Snap-in of the Windows Server Management Console, private keys of certificates can be managed, i.e.

“permission denied” error despite having all needed file system permissions

瘦欲@ 提交于 2019-12-12 03:03:46
问题 I'm on an android, using adb shell to troubleshoot an issue which my app has with the file system. I'm encountering a permissions error when using tinyalsa, so I wish to investigate the directories involved. cannot open device '/dev/snd/pcmC1D0c': Permission denied If I su and then stat each item in the path, the shell tells me the following permissions: / (755/drwxr-xr-x) /dev/ (755/drwxr-xr-x) /dev/snd/ (755/drwxr-xr-x) If I try to stat /dev/snd without su , however, I get Permission denied

My AlarmManager for service update doesn't work

最后都变了- 提交于 2019-12-12 02:45:47
问题 Why my AlarmManager for service update doesn't work? this is my code: public class MainActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); startService(); } // Method to start the service public void startService() { startService(new Intent(getBaseContext(), MyService.class)); } // Method to stop the service public void stopService() { stopService(new Intent

Office Interop Issue on Windows Server

偶尔善良 提交于 2019-12-12 02:41:38
问题 I am trying to access the Word Office Interop on a server from my aplication using the following line: Microsoft.Office.Interop.Word.Application word = new Microsoft.Office.Interop.Word.Application(); This however causes an exception to be throw: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). Does anyone know what I can do to

Subscribe to Facebook Page photos using Pages API webhook

寵の児 提交于 2019-12-12 02:35:44
问题 TL/DR; With page webhook in place, if I upload new photo to the Page via Photos Facebook notifies my webhook. If I do the same on page timeline — it doesn't. Details: I want my application to receive new posts from some public Facebook page. Posts may have a photo attached or may not. What have I done: In my Facebook app settings I've created a Page Subscription in Webhooks section. I've chosen 'feed' field. I've subscribed my app to the target page using "/subscribed_apps" endpoint. Page

Set up ruby globally for all users on ubuntu 14.04

喜夏-厌秋 提交于 2019-12-12 01:53:31
问题 Question: How can I install ruby, in such a way, that it's visible to all users on my ubuntu 14.04 server ugh I'm trying to make ruby -v visible for all users and I failed. Question 2: Can I just change permissions? if so, how? if not, how would I uninstall the other installation? I have 2 main users: ubuntu (default) and jenkins(secondary) I followed this set up for rbenv from this Tut: cd git clone git://github.com/sstephenson/rbenv.git .rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >>

Some issues acessing asset files in production mode

蓝咒 提交于 2019-12-12 01:53:14
问题 I am using Ruby on Rails 4.1.1 and on my local machine I have the following image: # Directory: MyApp/app/assets/images/ logo.png I upload MyApp using the Capistrano gem and all seems to work as expected. However when I try to access my website through the browser at the following URLs 1) http://www.myapp.org/logo.png 2) http://www.myapp.org/assets/logo.png 3) http://www.myapp.org/images/logo.png 4) http://www.myapp.org/assets/images/logo.png then I get an error page: The page you were

'pip install <package>' consistent permission denied

[亡魂溺海] 提交于 2019-12-12 01:51:24
问题 I just started building a new macbook pro. I'm an admin user. If I run a pip command I consistently get permission denied errors as such: Permission denied: '/lib/python2.7/site-packages/' When I run $ sudo pip install <package> I get this error: The directory '/Users/nate_argetsinger/Library/Logs/pip' or its parent directory is not owned by the current user and the debug log has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want