dotMobimobiThinkingmobiForgemobiReadyDeviceAtlasfind.mobigoMobi

Posted by spillow 1 year 48 weeks ago

pic
 spillow
mobiForge Newbie
Posts: 4
Joined: 2 years ago
[offline]

We are trying to see if the DeviceAtlas solution will fit a current need. The system has a table called device which has a device_id. This internal device_id is used and referenced throughout the database schema. So essentially, we would need a mapping between the internal device_id and the Device Atlas data.

What is the best way to get the DeviceAtlas data into a database? Has anyone written a parser for the JSON file to create database tables and populate them?

Posted by atrasatti 1 year ago

pic
 atrasatti
dotMobi logo
Mobile Genius
Posts: 325
Joined: 3 years ago
[offline]

DeviceAtlas comes as a pair of API and data and the data is provided as a JSON.

We think the best way to access our data is via the API, in fact the way data is structured in the JSON is optimized for the API and real-time device detection.

Why do you want to import the device profiles in a database? Couldn't you just use the API?

Posted by spillow 1 year ago

pic
 spillow
mobiForge Newbie
Posts: 4
Joined: 2 years ago
[offline]

The API could definitely be used to detect the device. However, we are working with an existing system. The existing system has a device table and an thus an associated device_id field. This field is a foreign key to many tables throughout the system. In order to accommodate this, we would have to have a mapping between the DeviceAtlas data and the existing device table. We would then build an Admin tool that could be used to maintain the mapping between the existing device table and the DeviceAtlas data. Maybe there is a better way, but this is what we think we would need to do at this time.

Posted by livingtech 1 year ago

pic
 livingtech
mobiForge Newbie
Posts: 3
Joined: 1 year ago
[offline]

I have need for this also. I'm having a "fun" time trying to get all the user_agents out of the json doc. The API should really have methods for this, IMHO.

Posted by livingtech 1 year ago

pic
 livingtech
mobiForge Newbie
Posts: 3
Joined: 1 year ago
[offline]

I'll wax a bit more on why the API is not a good fit for my environment. Essentially, we have a situation where not all the pages are php. So we want to put our device detection in a .htaccess file. This has worked for us in the past with a limited number of user agents, but now we want to use the device atlas database to populate it with all the devices we care about. Not sure if this is practical yet, as I still haven't identified a good way to get all the user_agent strings out of the device atlas data.