Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a helper script/web page for generating values for a new device #34

Open
cvan opened this issue Feb 16, 2018 · 5 comments
Open

Comments

@cvan
Copy link
Contributor

cvan commented Feb 16, 2018

It'd be nice to eventually have users load a page from any mobile device, information is gathered from client-side JS, and parameters get calculated and added to the JSON file. That'd obviously involve some backend service, or generate some fancy new GitHub issue URL with query-string parameter for the user's device (à la https://github.com/immersive-web/webvr-polyfill-dpdb/issues/new?body=Example).

As a simpler start, it'd be nice to have a basic index.html at https://dpdb.webvr.rocks/ that could automate the process of adding a new device to the database.

A basic JS snippet would suffice. I don't want to commit to anything too grand, but helping folks crowdsource this data better really would be fantastic.

Basically, I'd like to recreate the workflow of SDL2's crowdsourced gamepad controller mappings:

@jsantell
Copy link
Contributor

My understanding is that most of this data isn't available to web content, so we'd need to manually get the information, which is the reason that this crowd-sourced DB exists -- if web content had access to this already, it wouldn't need to look up via UA!

I wonder if there could be a script provided, that, with a connected Android device via adb, could get the relevant information from the connected device, and output a JSON chunk to be contributed.

@cwervo
Copy link

cwervo commented Nov 19, 2019

@jsantell & @cvan I know it's been over a year but I'm curious to know if either of you have any more ideas/requirements/thoughts on this issue? I'm thinking about creating a script like this but don't think I have enough context on the problem yet & would love some help!

@cvan
Copy link
Contributor Author

cvan commented Nov 19, 2019

@cwervo np, thanks for asking. what are your use cases? I have thoughts on this, but the more clearly I understand the context, I can probably help better.

@jsantell
Copy link
Contributor

jsantell commented Dec 1, 2019

I think something like this can be automated by installing a mobile app; the physical size of the screen is needed to calculate the lens distortion, which isn't available to the web, but the DPI is available to native applications, from which the screen size can be deduced.

I think the most straight forward way to make this easy to contribute new device info to is via native app that queries whatever platform API to get the DPI (a la DeviceInfo App), and calculates a result using the formulas and processes from Adding A Device and display a JSON chunk to copy/paste somewhere. I believe there used to be a cardboard app that did something like this, but a lot of cardboard info is hard to find now: and the calculations and the data's origin for the DPDB in the README are locked behind corp walls, leaving these instructions the most detailed AFAIK on the DPDB.

On a wider topic of easy to contribute, an app that submits the result to be added (via bot or maintainer) would remove the need to know how git works, although that seems more of a part 2 😄 (edit: OP already mentions this, woops)

@jsantell
Copy link
Contributor

jsantell commented Dec 1, 2019

app that queries whatever platform API to get the DPI (a la DeviceInfo App)

This could also be a script maybe running via adb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants