You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by basvanbeek <gi...@git.apache.org> on 2014/08/08 12:27:06 UTC

[GitHub] cordova-plugin-device pull request: adds new property 'manufacture...

GitHub user basvanbeek opened a pull request:

    https://github.com/apache/cordova-plugin-device/pull/20

    adds new property 'manufacturer' for Android (and hardcoded for iOS, Blackberry)

    For some platforms it makes sense to be able to list the Manufacturer for a device. These changes allow retrieval of manufacturer name for Android, iOS & Blackberry. Have not added to other platforms as I have no access to those or know the API's.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/basvanbeek/cordova-plugin-device master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-device/pull/20.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #20
    
----
commit c1388533fc0f15dd24b828c3cf1b7005fc7afd33
Author: Bas van Beek <ba...@tobin.nl>
Date:   2014-08-07T19:15:03Z

    added device.manufacturer property for Android, iOS (Apple duh), Blackberry (RIM duh)

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-plugin-device pull request: adds new property 'manufacture...

Posted by purplecabbage <gi...@git.apache.org>.
Github user purplecabbage commented on the pull request:

    https://github.com/apache/cordova-plugin-device/pull/20#issuecomment-69961610
  
    The user-agent has adequate information to handle this.
    -1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-device pull request: adds new property 'manufacture...

Posted by clelland <gi...@git.apache.org>.
Github user clelland commented on the pull request:

    https://github.com/apache/cordova-plugin-device/pull/20#issuecomment-51784352
  
    I've linked this to https://issues.apache.org/jira/browse/CB-7285 for discussion. I'd like to see WP, FireOS (all Amazon?) FFOS chime in on this as well.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cordova-plugin-device pull request: adds new property 'manufacture...

Posted by fishgrind <gi...@git.apache.org>.
Github user fishgrind commented on the pull request:

    https://github.com/apache/cordova-plugin-device/pull/20#issuecomment-72141975
  
    Thanks for adding this Bas


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-device pull request: adds new property 'manufacture...

Posted by purplecabbage <gi...@git.apache.org>.
Github user purplecabbage commented on the pull request:

    https://github.com/apache/cordova-plugin-device/pull/20#issuecomment-72761694
  
    I have decided to accept this pull request, and implement the windows/wp8 functions.
    The fact that the native api makes this information available implies the importance of the info.  Hiding this from cordova apps simply to prevent misuse is probably not helpful. [CB-7285]


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-device pull request: adds new property 'manufacture...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-plugin-device/pull/20


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-device pull request: adds new property 'manufacture...

Posted by purplecabbage <gi...@git.apache.org>.
Github user purplecabbage commented on the pull request:

    https://github.com/apache/cordova-plugin-device/pull/20#issuecomment-69973766
  
    I am not waiving it away, or neglecting it, just stating my opinion of it's relative value.
    If others feel strongly for it then by all means, we should add it.
    Generally, I try to resist the urge to add cordova features that are reachable/possible within the browser already.  The overall goal of cordova is to not exist, meaning we shouldn't push developers to depend on cordova specific apis when we don't have to.
    
    All of that said, this is relatively easily supported on wp8 and windows8 so I will have no problem adding it if enough people want it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-device pull request: adds new property 'manufacture...

Posted by jsoref <gi...@git.apache.org>.
Github user jsoref commented on the pull request:

    https://github.com/apache/cordova-plugin-device/pull/20#issuecomment-69971601
  
    Personally, I don't think exposing this is a good thing. And if the UA already exposes this junk, then, I'd rather people sniff it so that they're aware what they're doing is **wrong**.
    
    -1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-device pull request: adds new property 'manufacture...

Posted by IngusSkaistkalns <gi...@git.apache.org>.
Github user IngusSkaistkalns commented on the pull request:

    https://github.com/apache/cordova-plugin-device/pull/20#issuecomment-69907763
  
    Real life use-case: App for displaying specific ads on mobile devices in stores. Manager installs this app, thats acts like a screensaver/daydream service, on first app launch, it is registered in administrative portal with all available device info, but without manufacturer. 
    So this manager can control what kind of ad-campaign is displaying on any device. Manager creates specific ad-campaign for HTC devices. Wants to assign it to all HTC devices, but no easy way to do that, because there are no HTC devices or Samsung devices, there are at best model names. So to accomplish that, manager have to maintain manufacturer info manually either from administrative portal, or with adding device registration form into application that is displayed on  first app launch. 
    
    Added image for device registration form that gets reviewed by managers after installing app on mobile device and than registering it in administrative portal right from the app, second field would be manufacturer, currently empty and will get replaced with dropdown of available manufacturers or smth like that:
    ![image](https://cloud.githubusercontent.com/assets/219684/5738594/ca55040e-9bf6-11e4-942a-5e66ee07938d.png)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-device pull request: adds new property 'manufacture...

Posted by IngusSkaistkalns <gi...@git.apache.org>.
Github user IngusSkaistkalns commented on the pull request:

    https://github.com/apache/cordova-plugin-device/pull/20#issuecomment-70050191
  
    @purplecabbage - maybe, but how do you expect to get string `samsung` from string like this -> `Mozilla/5.0 (Linux; U; Android 4.4.2; en-gb; GT-I9505 Build/KOT49H) AppleWebKit/537.16 (KHTML, like Gecko) Version/4.0 Safari/537.16`, i guess this would require additional maintaining of user-agents or model names in our administrative portal.
    Also I don't really understand point of why exposing manufacturer is _wrong_. Am I overlooking some security issues or smth like that?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-device pull request: adds new property 'manufacture...

Posted by purplecabbage <gi...@git.apache.org>.
Github user purplecabbage commented on the pull request:

    https://github.com/apache/cordova-plugin-device/pull/20#issuecomment-72762464
  
    @basvanbeek Can you sign and submit an ICLA? 
    http://cordova.apache.org/#contribute


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-device pull request: adds new property 'manufacture...

Posted by basvanbeek <gi...@git.apache.org>.
Github user basvanbeek commented on the pull request:

    https://github.com/apache/cordova-plugin-device/pull/20#issuecomment-73009009
  
    @purplecabbage ICLA signed and sent


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-device pull request: adds new property 'manufacture...

Posted by basvanbeek <gi...@git.apache.org>.
Github user basvanbeek commented on the pull request:

    https://github.com/apache/cordova-plugin-device/pull/20#issuecomment-69969853
  
    @purplecabbage so while the Android API has implemented a method to easily get the Manufacturer name from the device, we are declined to reach that method from the most obvious cordova plugin to have this logic disclosed? And the rationale is that in your opinion we just have to parse user-agent strings and build device model to brand mapping tables to get what we want and keep on checking and updating the parsing logic / mapping tables all the time? Highly inefficient and a pure waste of time. 
    
    If the cost of adding, maintaining and having this feature would be high I can understand hesitation but cost is negligible and the cost for developers needing this information and now having to resort to forking the plugin and keeping in sync with ongoing development or even adding an additional plugin to each app requiring this feature sounds very user unfriendly and also discourages people to contribute code if even the simplest of code updates get waved away / neglected like this.
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-device pull request: adds new property 'manufacture...

Posted by jsoref <gi...@git.apache.org>.
Github user jsoref commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-device/pull/20#discussion_r22973090
  
    --- Diff: src/blackberry10/index.js ---
    @@ -57,6 +57,7 @@ module.exports = {
                 modelName = getModelName(),
                 uuid = getUUID(),
                 info = {
    +                manufacturer: 'Research in Motion',
    --- End diff --
    
    For reference, `Research in Motion` is not the name of the company anymore, it's `BlackBerry`:
    
    http://press.blackberry.com/press/2013/research-in-motion-changes-its-name-to-blackberry.html


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org