Subway Subcard on Pebble

As an experiment, I downloaded the Subway Subcard Android app and extracted the QR code from a screenshot. The screenshot has been modified to prevent anyone claiming my Subcard points (of which I currently have very few, but it’s the principle!)

subcardfull

I then created a simple Pebble app to show this code as a BitmapLayer for the store scanner to scan. It looks like this with the dummy QR code:

pebble-screenshot_2014-02-27_11-22-28

And it worked! The points were added in the Android app but I didn’t have to unlock my phone and open the Subcard app. So some time was saved, and I got a positive reaction from the cashier, which is always a bonus!

If you want to use this yourself, get the code from the GitHub repo and replace qr.png with a 144×144 crop of your own Subcard QR code from the app or carefully from a photo of your physical card, then re-compile.

Advertisements
12 comments
  1. Ian said:

    I know this is an old thread but I was wondering if there was a tutorial on how to add multiple images like this and scroll through them with the up and down buttons. I don’t know how to program but I have the images all ready and was trying to find one on github that I could import into cloudpebble and upload my png but no luck.

    Thanks!
    Ian

    • bonsitm said:

      Hi Ian, you can easily achieve this by using bitmap_layer_set_bitmap in a ClickHandler for each button. You can do this after becoming basically familiar with the SDK on the Pebble Developers site, or by reading my tutorials.

      • I’ll try looking through it again. I just have never really done any programming and it’s just for a one off thing I need on my Pebble. I played around and saw how to load an image but wasn’t sure how to adapt the tutorials for multiple images and to make sure to release them properly and to link that up to button presses to scroll through 4 or 5 images. Thanks for the tip, i’ll read up some more on bitmap_layer_set_bitmap and ClickHandler

      • bonsitm said:

        Normally I’d provide more detail, but I’m very busy these days. Have a look at the font (for button code) and image related examples on the pebble-sdk-examples GitHub repo for samples.

      • I appreciate you pointing me in the right direction. Thanks a lot!

      • bonsitm said:

        Good luck!

      • After reading for a few hours I am learning a little. I was wondering if you could just let me know which would be easier/possible.

        1. Having a menu that I can scroll down and when I select one it opens a specific bitmap. (I have one running with the menu list but still figuring out how to load the image from that). Based on feature_simple_menu_layer
        2. The app opens to the first image of 5 and you scroll through them with the up and down buttons.

        If you are too busy I understand.

        Thanks

      • bonsitm said:

        If you feel comfortable pushing new windows when the menu item is clicked, I’d choose option 1.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: