Digital Signage Touchscreen Displays with a Mac Mini?

Use Case

First of all, why would you want to? Digital Signage isn’t always just a video playing in a loop, which can run off a built-in media player (like on a Samsung DM55E screen with MagicInfo S3 Digital Signage Software) or a BrightSign player with it’s overly convoluted content management system. Sometimes you have an HTML5 application that can run in Google Chrome as a full screen app, other times you have a complex Unity3D desktop app that also needs to run off more of a serious machine than a typical media player.

You’re certainly better off with a PC in this situation. Intel’s NUC and others now even allow the small form factor that Mac Mini used to rule.

Mac Minis weren’t originally designed for touchscreen displays, but what if you’re stuck with venue or client that has already purchased a Mac Mini and now you have to use that equipment because the budget’s been spent?

One option that works

Assuming there’s budget and you have some leeway in choice of touchscreens, rent an ELO touchscreen. Something like the 4202L 42″ Interactive Digital Signage. ELO does provide drivers for Mac that work with single touch (at least).

Note: ELO’s site provides drivers for lower versions of Mac OS / OS X and says “MAC OS X (10.12): Contact Tech Support for Max OSX 10.12”. Unofficially, their latest driver at the time – UPDD_05_01_1482.dmg – worked for me on Mac OS 10.12. Their tech support never got back to me, so keep that in mind.

Advertisements

Retrieve Your cordova app’s localStorage Data Directly From iOS Device

Use Case

If WiFi fails, your ajax call fails and your backup re-submit code fails, you may need a last ditch solution of physically grabbing your form data from inside your PhoneGap app, off of an individual iOS device.

Prerequisites

Make sure the app is coded to save data locally using HTML5 localStorage API.

Once the localStorage functionality is tested and working, and you have your PhoneGamp / cordova app running on an iPad, you can use PhoneView to access the file system on your the iPad.

Install DB Browser for SQLite on your Mac. Under the hood, cordova saves your localStorage data as a simple SQLite database.

Retrieve the Data

  1. Connect your device to your Mac and open PhoneView Demo
  2. Go to Apps in the main nav on the left.
  3. Click on Settings in the top nav icons bar and you’ll see this dialog window:
    sc1
  4. Check the “Show Entire Disk in Disk Mode” and “Show All Apps in Apps Mode (Developers Only)” boxes. You’ll get a warning confirmation popup, which you should accept by clicking OK.
  5. You’ll now see your custom cordova app listed under Apps:
    screen-shot-2016-10-25-at-4-10-00-pm

  6. The folders you want is yourApp/Library/Caches/ and yourApp/Documents/Backups/. The file should be called something like “file__0.localstorage” in /Library/Caches or “localstorage.appdata.db” in /Documents/Backups. It’s essentially a SQLite file, and can be opened using an app that lets you view SQLite files.
  7. To open it, you need to first copy the Library folder to your Mac.
  8. Click the Library folder to to select it
  9. Click on Copy from iPhone button in the top icons navbar
  10. Choose a location to save it on your machine.
  11. Launch DB Browser for SQLite
  12. Open your recently copied “file__0.localstorage” or “localstorage.appdata.db” files from your Mac in DB Browser for SQLite
  13. Click on the Browse Data tab towards the top of the interface
  14. You should see your localStorage Key / Value pairs listed as a SQL table:
  15. If you stored your Values as Arrays, your actual data may be stored as a BLOB data type and not plain text
  16. Select your BLOB value in the table and look at the right side of the interface, under Edit Database Cell
  17. Make sure the Mode is set to “Binary”
  18. You should be able to see your data with very bad kerning
  19. Click the “Export” button above the cell content area
  20. Save your file as .txt and open the .txt in any text editor, like SublimeText, to access your data as plain text.

Meraki MDM and iOS 10.0.2 – “App Already Scheduled For Management” and “Unable to install right now” Error Messages

The Symptoms

The issues this time were very similar, almost identical to what I’ve written about here. Meraki’s individual device page Activity Logs would show us the following error over and over again: “App… Already Scheduled For Management”. On the remote end, in a different city, an on-site event lead would be trying to install and getting the vague “Unable to install right now” popup message repeatedly.

The Workaround

We’ve tried everything from uninstalling all provisioning profiles from our iPads (via Settings > General > Profiles) to sending uninstall/reinstall signals from the Meraki dashboard, both from the individual device page and from the individual app page.

We eventually worked past our “Unable to install right now” message but then got stuck with grey stub icons for our apps that said “Waiting…” under the grey image.

Nothing worked until we did a full factory reset of each iPad, re-set up our Apple ID via the Settings app, re-downloaded the free Meraki app, re-registered with Meraki using our network ID.

Good times were had by all. Dinner was eventually served. Experiential / Live Events marketing + wireless technology = be prepared to have your tech guys on standby.

DC Metro API – Show Real-Time Train Arrivals with Javascript

I’ve worked with Twitter, Instagram and Facebook APIs. Those are always a bundle of unpredictable joy/not, as APIs usually are. The WMATA (DC Metro) API is fairly easy to work with by comparison. They don’t have to worry about anyone’s personally identifiable information (PII), hence, less headaches for developers. They provide an adequate level of documentation and are reasonably responsive over email. All issues I had while working with this code were easy enough to resolve, using the ol’ Googley machine and common sense. A business lead I worked with was extra enthusiastic about the project, so he did email the API developers a few times and they responded on the same day.

The rate limit is 10 calls/second and 50,000 calls per day, which should work just fine for most uses. I’d pay extra attention here if you have multiple versions of the code during development (using the live end point) or, if you have a live version out and are working on changes, while using the live API (which is sometimes unavoidable, since there’s no dev end point).

In general, if you call it 3 times a minute or every 20 seconds, as the WMATA’s own real time arrivals web app does, you’ll be more than ok. Here’s a screenshot:

You can see their list of real time arrival stations here. It works rather well and uses their Real-Time Rail Predictions API, but one thing I’d certainly do differently – it’s literally reloading the whole page every 20 seconds to update the data. I’m guessing a backend developer put this together real quick, while working under several deadlines. A simple AJAX call can fix this (there are multitudes of examples of this on StackOverflow alone).

Note: if their app/API feed is down, their real time arrivals link just shows a mostly blank page:

Again, I’m guessing this was done in a hurry.

Meraki MDM and iOS 9.3.1 – “App Already Scheduled For Management” Error Message

We kept getting this message on two out of five iPads recently, first with iOS 9.2.1. We updated to 9.3.1, same issue. We’ve had this “App Already Scheduled For Management” message come up in the Event Log and Activity Log in the dashboard, on each individual device page.

There were some unique symptoms this time around:

  1. The app would get prompted for an Install, we’d tap that Trust/Install button
  2. Immediately after, iOS would prompt us for an App Store / iTunes login
  3. We’d cancel, as we’ve done lots of times in the past
  4. our MDM app published for enterprise distribution would start installation and quick shortly after, giving a generic “unable to install right now” message.

Note – I was working with a buddy who was located remotely, so I had to rely on them telling me what their screen looks like and what the messages are, etc. I didn’t have the privilege of looking at the device as I’m trying to “Re-push to all”, “Re-push to missing” from the Systems Manager app page or “Update” or “Install” from each registered device’s page.

Usually, clicking “cancel” on the iTunes / App Store login works just fine.

This time, it turns out the remotely located buddy / their teammate started creating the iTunes / App Store account but didn’t finish. So, they created the user name and login but didn’t click through all of the “Agree” type fine print pages in the sign up process. As a result, I’m guessing iOS disabled the ability to install ANY and ALL apps, until this unfinished iTunes process was completed.

Sure enough, after the remotely located employee re-logged into iTunes/App Store and finished that sign up process, our enterprise MDM app managed via Meraki’s Systems Manager installed within a few minutes, after I re-pushed it.

Up and Running with NW.js on OS X

Formerly known as node-webkit, NW.js lets you convert pretty much any HTML5 project into a desktop app.

First, make sure you have the right versions of npm and node installed. I updated npm and ended up updating node via nvm to maintain various versions of node and getting the right one for NW.js.

To launch the test app, I ran this command via Terminal:

open -n -a nwjs --args "/Users/your_usr_name/path_to_project/html_nwjs_test"

There’re a few other options on the project’s Github page. Do check it out.

If your package.json has a “window” node that looks like what I have below (aka no window chrome, no taskbar functionality), keep in mind that on OS X you can just launch Activity Monitor and use that utility to shut your app down when you’re ready:

{
  "name": "HTML5 Desktop Test App",
  "main": "index.html",
  "window": {
    "title": "HTML5 Screensaver Test",
    "frame": false,
    "toolbar": false,
    "fullscreen": true,
    "always-on-top": true,
    "show_in_taskbar": false
  }
}

I’m sure Windows Task Manager or Windows Explorer has a similar option.

When the app’s ready, nw-builder seems like a good option to create executables for multiple platforms (win32, win64, osx32, osx64, linux, etc). It seems a bit annoying that for Windows, nw-builder outputs a bunch of .dll files along with the .exe.