iOS Push Notifications in Airplane Mode

I work a lot with the cruise ship industry, and one of the more interesting challenges we run into is that often there are user-facing systems that have to work without an Internet connection. I’ve designed applications that are supposed to work in a mine, or on a plane, and then later sync with the cloud, but building something that might not have a web connection for three days through the fjords  is a little different.

We’ve been looking into sending local notifications without any Internet access at all – from a server installed locally on the ship, to an app on a crew member or guest’s personal device. The basic idea is that an app, installed on the phone or tablet, can send a “local push notification” or “background push notification” to the operating system. Even if the app is not in the foreground, or the phone is asleep, the notification should wake the device up, and present the user with a message. This is exactly the same as a standard push notification (think Facebook or calendar notifications), but instead of using Apple’s push server, you are using an app itself to send the message. The problem is how do you trigger the app to do something in the background? The app has to wake up in the background, contact the local server, check for messages, download any available message or content, and then alert the user if it found anything.

There are a couple of ways to trigger a background application to do something for you. The two we looked into for our purposes were “Location Updates” and “Background Fetch”

Our limitation here is obviously the cellular modem will be turned off (Airplane mode) because there either is no cell tower around, or you don’t want your passengers paying international data roaming fees. There are other ways to trigger a background app action, but they mainly involve things like plugging in headphones, managing VoIP calls, and mainly Internet-requiring services. You can read more about the available options here: http://apple.co/29288f1

Option 1. The background fetch function appears to be the best option for this kind of app. This is something we’ve used in the past, but never had to worry about sans-Internet issues. The way background fetch works is the operating system puts your app into a queue of other apps asking for background services. The queue is processed based on which apps have the best efficiency. Apple does not really go into details, but it appears that the less data and the less battery your application uses in the background, the more frequently your app will be given background privileges (http://apple.co/291iAkd).

However, the problem here was we didn’t know exactly how efficient the application will be before we build it and start tuning it. So we built a prototype. While plugged in to a charger, it was able to receive messages every 10-12 minutes. Unplugged it was able to check the server only ever 20 minutes.

Option 2 (Augmentation). So in order to augment the inconsistent/unknown response time of the background fetch, we looked at the location updates. Location Updates are a way of triggering a background function when the device detects “a significant location change”. The idea is that if the phone detects movement that is “significant” (whatever that means) it will trigger your app. This is not exactly well documented but through some research and some experimentation it appears that “significant” means 1000 meters. This would be perfect for us, because seeing as while on a cruise you are probably moving 10 meters a second, we could have the app update every minute and a half. That would be an additional update cycle to cut down on the 10-minute maximum update cycle. The problem is that this measurement is tracked using the cellular antenna, and not the GPS! After a fair amount of banging our head on the desk, we gave up on Option 2.

As far as I know, planes and cruise ships are going to be relegated to the notification abyss for the time being. Without reliable Internet access, devices can’t get timely push notifications. The limitations on local push notifications while in airplane mode might be ok for notifying crew about training drills and passengers about dinner times, but it would not be reliable enough for emergency notifications.

Share

5 tips for launching your first app

Almost everyone wants to have an app these days. But how do you go about finding the right designers, programmers, and marketers to take your app from an idea to millions of downloads in the app store?

  1. Validate your idea. Not all ideas are as great as you my think, and no one wants to call their baby ugly. Validation can be done quickly and cheaply by creating a simple “Pros and Cons” spreadsheet of your competitors, and running online surveys. But you got to do it.
  2. The planning stage is the last time your have total control – You can save a lot of money in development costs if you have drawn the entire app drawn out on paper. I’m not talking about just the main screens; I mean EVERYTHING. Each pop-up message, every menu option. It seems like overkill, but you’re really designing an architectural blueprint here. Designers and engineer have to follow these “wireframes” so they know what to build, and even so that they can give you accurate estimates. You wouldn’t give a build a blueprint for your house with a downstairs bathroom missing, and expect them to just fill in the blanks would you? If you don’t want to do this, expect to pay your developer team to do the wireframes for you, and never use a company who doesn’t offer this step.
  3. Find the right team for you. In any technical endeavor, it’s hard to pick a good team, especially if you are not very technical yourself. You can be techno-babbled to death, or won over by shinny demos. There are a few simple questions you can ask to make sure the team you’re picking is a good one:
    1. Where is the actual development done (in the US? Or is it outsourced to India?)
    2. How does the team manage their source code? You want to hear them say that they use a version control system like GIT (This is like the Track Changes function in Microsoft Word, but for software code).
    3. How is the team going to help you through the planning process? Are they going to build you a functional wireframe you can play with? How about a basic prototype? The more steps they have early on, the more likely you are to succeed.
    4. Ask to touch and play with real life examples of systems the team has worked with.
    5. Find our if they’ve worked on similar products or in similar industries. A little bit of previous experience goes a long way. Find a team who has already made their mistakes on someone else’s dime, so that you don’t have to pay for it.
  4. Understand the process – You don’t have to become a programmer yourself, but spend sometime educating yourself on the technologies and jargon you will encounter. Unlike building a house, you probably have never seen a software project being worked on as you drive down the road. So your frame of reference is very difficult. The process can be extremely opaque as a result. It’s your money; learn a little about how the sausage is made. I’d suggest learning at least a little bit about how databases work, and how source control works – these two topics alone will allow you to have much honest conversations with your developers.
  5. Don’t launch it and leave it – When your app is all done, getting it in the app store can be tricky. Start finding out what you need to do to get into the Apple store early on – this includes reading their terms of use, which isn’t as bad as you think. Make sure you have a business entity set up, and a registered Dunn and Bradstreet number if you’re going to charge money for you app, include ads, or in-app purchases. And finally, learn about how to promote your app in the stores and on the web. You’ve all heard about SEO, but there is such a thing as App Store Optimization as well.
Share

Setting up a Star SP500 Wireless Printer

The wonderfully undocumented SP500 printer with wireless Ethernet connection has been the bane of my existence for the last few days.

So I have the IFBD-HW03/04 model, which isn’t even mentioned really in the manual. That means that my firmware is a thousand years old.

This is silly for many reason, but it also forces me to use a Windows machine as well… which just makes me grind my teeth. YOU HAVE TO HAVE A WINDOWS PC WITH IE to do this.

First things first, find the MAC address.

  1. Turn of the printer
  2. Hold the FEED button
  3. Turn it back ON
  4. After you hear the first BEEP, let go the FEED button
  5. Wait a minute or two. Yeah, seriously.
  6. It’ll print out one page of useless information. And then with a big pause in between, it’ll print out the network information, which is what you need.

Then load up the Star Micronics Printer Utility which you can actually download from their website.

  1. Choose SP512 as your printer
  2. Ethernet as your connection.
  3. You should be able to hit “Search Network” and find the printer, but that has never worked for me. So….
  4. Hit Temporary IP Address Assignment
  5. Fill in the MAC Address from your receipt
  6. On your Windows machine, Start > Run > cmd
  7. Find your IP address of your machine with “ipconfig”
  8. Whatever your IP is, give the printer something similar, so you are XXX.XXX.XXX.153 make the printer .158 or something
  9. Hit OK and you should be prompted to go to the control panel.

Next, the interface

  1. The tool will open the interface in your default browser. If this is not IE (which hopefully it isn’t’), open up IE and type in the printer’s IP.
  2. The username is just “root”
  3. Go to NIC
  4. Then got to WiFi-.11b (no it does not support WAP)
  5. Choose “Infra.” as your Wireless Mode (I guess there wasn’t room for “Infrastructure”)
  6. Pop in your SSID of the network you want it to join and the WEP key.

NOW – theoretically this should just work. But I haven’t had any luck.

 

How to reset the printer’s Ethernet settings.

If you screw something up, you’re dead in the water. The problem is you have to connect to the printer in Ad-Hoc mode (SSID STAR-WIFI) before you can set it up. So if you mess something up on the network settings, you can’t get back in to fix it. Fortunately, you can reset this (although you’d never know from reading the manual) but hitting the second dip switch on the WiFi card.

Open up the case

Find the second switch on the WiFi card. Make sure the printer is OFF. Push it to the DOWN position. Then turn the printer back ON and let it boot up. After that, turn it OFF again. Put the switch back to the UP position and turn it back ON. All the settings are now cleared 🙂

Share