Closed Bug 946203 Opened 11 years ago Closed 10 years ago

No API to get Device Name

Categories

(Core :: DOM: Device Interfaces, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: canadese90, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36

Steps to reproduce:

I was trying to get Device Name (Model, Manufacturer, Product)


Actual results:

No way to do that (instead of getting the user-agent and parsing it, even if on my ZTE Open I get  'Mozilla/5.0 (Mobile; rv:18.1) Gecko/18.1 Firefox/18.1' without model).


Expected results:

A developer should have access to basic information about general devices.
E.g. Model, Manufacturer, Product. (e.g. http://developer.android.com/reference/android/os/Build.html)
Severity: normal → enhancement
Component: General → DOM: Device Interfaces
Product: Firefox OS → Core
See Also: → 961650
You can use the Settings API to get the "deviceinfo.product_model" setting as in https://mxr.mozilla.org/gaia/source/apps/bluetooth/js/settings.js#141
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
I cannot understand how it's been resolved.

To access Settings API, App should be Certified. Am I wrong?

Also, according to https://developer.mozilla.org/it/Firefox_OS/Platform/Settings_list there is no deviceinfo.product_model property (but yes, we know it exists now). 

What about self-published applications requiring access to Settings API?
(In reply to canadese90 from comment #2)
> I cannot understand how it's been resolved.
> 
> To access Settings API, App should be Certified. Am I wrong?

Yes, the Settings API is for certified apps only.

> 
> Also, according to
> https://developer.mozilla.org/it/Firefox_OS/Platform/Settings_list there is
> no deviceinfo.product_model property (but yes, we know it exists now). 
> 
> What about self-published applications requiring access to Settings API?

If you mean hosted apps, unfortunately they can't access the Settings API.

The bug description does not mention the required API security level, just the need of an API to get the device model, which is already available. If you are asking for a way to get the device name from hosted apps then please reopen the bug as it is still valid. Thanks.
You need to log in before you can comment on or make changes to this bug.