Closed
Bug 816429
Opened 12 years ago
Closed 12 years ago
Can't access DeviceStorage in Bluetooth app
Categories
(Firefox OS Graveyard :: Gaia::Bluetooth, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 814323
People
(Reporter: echou, Assigned: iliu)
References
Details
Originally, when users try to send a file, a prompt would be shown to ask for user's approval to access device storage. After Bug 814294 landed, no prompt appears even if we share a file via Bluetooth, and we will get a "Bluetooth.getFile: SecurityError" error message from logcat.
Reporter | ||
Comment 1•12 years ago
|
||
cc Gregor, assignee of bug 814294 Hi Gregor, I'm not sure how to make permission prompt to be shown while Bluetooth app trying to access DeviceStorage for Bluetooth file-sharing. Could you help us? Thanks in advance. Eric
Summary: Can't access evice storage in Bluetooth app → Can't access DeviceStorage in Bluetooth app
Comment 2•12 years ago
|
||
You need the right permission for it. Currently I see for the bluetooth app: "device-storage:pictures":{ "access": "readwrite" }, "device-storage:music":{ "access": "readwrite" } What media type do you want to access? Also try a make reset-gaia to make sure you have the current version of the permission DB.
Comment 3•12 years ago
|
||
If the right permission is in the manifest, please look at b2g/components/ContentPermissionPrompt.js and let me know what variables (request.type and request.access) you see in the handleExistingPermission function for the failing prompt.
Comment 4•12 years ago
|
||
Gregor, we are using navigator.getDeviceStorage('sdcard') in bluetooth app, so what's the current permission we should write?
Comment 5•12 years ago
|
||
(In reply to Dominic Kuo [:dkuo] from comment #4) > Gregor, we are using navigator.getDeviceStorage('sdcard') in bluetooth app, > so what's the current permission we should write? Then you have to add the sdcard permission to the manifest: "device-storage:sdcard":{ "access": "readwrite" }
Comment 6•12 years ago
|
||
Does this work now?
Reporter | ||
Comment 7•12 years ago
|
||
(In reply to Gregor Wagner [:gwagner] from comment #6) > Does this work now? Yes, it works. I think Ian or Dominic will send a patch tomorrow. Thank you, Gregor.
Updated•12 years ago
|
Component: DOM: Device Interfaces → Gaia::Bluetooth File Transfer
Product: Core → Boot2Gecko
QA Contact: wachen
Updated•12 years ago
|
Assignee: nobody → dkuo
blocking-basecamp: --- → ?
Comment 8•12 years ago
|
||
Ian has sent a patch includes that change we mention above https://github.com/mozilla-b2g/gaia/pull/6706 Re-assigning to Ian, thanks.
Assignee: dkuo → iliu
Comment 9•12 years ago
|
||
What's the reason we need to ask the user for permission here? Please help clarify, thanks.
Comment 10•12 years ago
|
||
(In reply to Chris Lee [:clee] from comment #9) > What's the reason we need to ask the user for permission here? Please help > clarify, thanks. We won't ask the user for permission in this scenario. We had a bug in our permission implementation so that missing permissions in the manifest file resulted in prompting and not in an automatic deny. So the prompt was wrong in the first place.
Reporter | ||
Comment 11•12 years ago
|
||
This has been resolved in Bug 814323 by Ian.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Updated•12 years ago
|
blocking-basecamp: ? → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•