Updates from March, 2012 Toggle Comment Threads | Keyboard Shortcuts

  • Nick 7:30 am on March 1, 2012 Permalink | Reply  

    Forcing Portrait Orientation on Android PhoneGap 

    I’ve made some good progress on my Barcode Bots project: most notably I found out (after much flailing) how to force Portrait orientation in Android PhoneGap. A simple addition to the main class in my project’s _AndroidActivity.java did the trick (see below).

    I’ve also added a new screen, the help screen, and was able to test the Barcode Scanner PhoneGap plugin on an actual device. Success! Download the current code here.

    public void onConfigurationChanged(Configuration newConfig)
        {
            super.onConfigurationChanged(newConfig);
            setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        };  
    }
    
     
    • Sean Montgomery 10:09 pm on March 3, 2012 Permalink | Reply

      Looks good Nick. You button clicks weren’t all working for me in chrome and I couldn’t run your code on a device because I didn’t have the barcode lib project, so be sure to include that when you turn in your project next week. FYI, you can also enforce portrait mode (among other options) in the Android Manifest, but your way works fine too. 10/10 + 5/5 extra credit

  • Nick 6:54 am on February 23, 2012 Permalink | Reply  

    Barcode Scanner Plugin for PhoneGap and other misadventures 

    With the help of Simon MacDonald’s informative blog post I managed to get the Barcode Scanner Plugin for PhoneGap up and running. Although installing a plugin in Eclipse wasn’t exactly idiot-proof, it wasn’t as scary as I had expected either. I even seem to be able to get confirmation that the plugin is working via the Android emulator, as pictured, which is fantastic as I don’t have an Android device to test on at the moment. I’m not sure if the scanner will appear as reminiscent of the Mario Bros. 3 title screen on an actual device (I’m assuming the checkerboard background is a stand-in for camera input), but I wouldn’t be entirely disappointed if so. I do wonder what navigation options the user will have and how I’ll be able to transition from the camera back to my app, as right now my options for customizing the plugin seem limited. You can download my project here.

     
  • Nick 8:11 am on February 13, 2012 Permalink | Reply  

    Barcode Bots progress 

    Development has begun on my Barcode Battler/Pokemon/Monster Rancher inspired game! So far there have been no surprises in using PhoneGap for Android – it’ll be interesting how easily this translates to the XCode SDK. One thing I’ve noticed his some built-in viewport, height and width settings which is a consistent annoyance I’ve run into in building mobile web apps. Source here.

     
  • Nick 8:40 am on February 9, 2012 Permalink | Reply  

    I’m thinking about creating a phone tablet game… 

    I’m thinking about creating a phone/tablet game for my Mobile Web class inspired by the classic ‘Barcode Battler’ handhelds of the 90s – a game that would prompt you to explore a bit more and to investigate strange products/stores in search of unique barcodes. Here’s a rough outline of the product stages for the ‘phone’ portion.

    Project: Barcode Bots (Client)

    Summary: An app that allows you to scan UPC barcodes thus generating a unique creature or robot. The robots can then battle via the Barcode Bots Arena app for tablets.

    Stage 1: UI Design

    Tasks:

    • Sketch a rough outline of the app’s flow and some screens using paper and pen.

    Questions/Pitfalls:

    • What pages are needed in this app? Is more or less better in this type of app/game?

    Resources:

    • Classmates/instructors at ITP.
    • Research alternative games such as Monster Hunter / Pokemon.

    Stage 2: Get camera working and reading barcodes.

    Tasks:

    • Enable camera via PhoneGap Camera API
    • Find a library or plugin to recognize and read UPC barcodes.

    Questions/Pitfalls:

    • Will I be able to find a library that can both read UPC barcodes and play nice with the PhoneGap API? What are PhoneGap plugins?

    Resources:

    Stage 3: Design an algorithm for turning a UPC Barcode into a unique creature.

    Tasks:

    • Evaluate the string output of a UPC barcode
    • Research what sort of variables might make a compelling creature.
    • Try some combinations and see what emerges.

    Questions/Pitfalls:

    • Again, how much is too much to be overwhelming and how little is too little to be interesting?

    Resources:

    • Google, StackOverflow

    Stage 4: Put it all together.

    Tasks:

    • Use HTML/CSS/JavaScript to build a functional app.
    • Determine the best way to generate a visual creature through code. Processing.js?

    Questions/Pitfalls:

    • How will generating a visual creature in this app translate to the ‘Arena’ app?
    • Should I try to connect to an SQL server in this iteration? (For saving creatures).

    Resources:

     
  • Nick 3:26 am on February 2, 2012 Permalink | Reply  

    Mobile Web ideas- 

    I have two major ideas for a final project in my Mobile Web class.

    Idea 1: Barcode Brawler

    My idea is to create a game that encourages exploration of the physical world by allowing the user to scan UPC barcodes (or QR codes or other unique signature that can be processed by the camera). The data from the barcode is used to generate the vital statistics and physical appearance of a creature. Users will then have their creature saved to a server. Using a companion iPad/tablet app (to be developed concurrently or later), users will be able to then pit their custom creatures against each other, earning both bragging rights and unlockable add-ons for their creature(s). While inspired by a physical game from the early 90s titled ‘Barcode Battler’, to my knowledge there is no app like this on the market. This would utilize camera capture and filesystem storage.

    Idea 2: NearestSubway

    My second idea is to expand a location-aware utility titled “NearestSubway” that I began last semester. The app would present two simple options, “Find the nearest Subway” and “Get me home!” The first option finds where you are and shows you directions to the nearest subway. There is a settings page where one can specifically exclude certain lines from being considered. The “Get me home!” button prompts the user for their address if they have never used the button before. For every instance thereafter, the address will be remembered in localstorage and directions from the current location to the stored home address will be displayed with Google Transit. This app would use geolocation. There are apps with subway information, but the simple one-click access and “home memory” would differentiate my app.

     
    • Sean Montgomery 5:34 am on February 6, 2012 Permalink | Reply

      Both project ideas sound good. Barcode scanner may require a plugin, but should be easy enough.

      For your homework apps, I’d like a little more documentation with screenshots and written description on your blog (it just makes my life a lot easier). Otherwise looks good.

      8/10

c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel