NoBrandCon App – Final Project – jahnkekm
This is almost more of a progress report than it is a post mortem. The application is not yet complete, and there’s many more features I intend to implement, it’s almost a pity that I’m giving this app away, or it wouldn’t be serving its purpose.
The application I made is a personal guide to the local anime/gaming convention NoBrandCon. It gives users easy access to any information they might want at the convention. Guests, schedule, or something as simple as when an where the convention is.
Let’s start at the main hub:
The camera activity goes to a camera, but is otherwise not functional yet. In its place from the specifications I made, I decided to make a “connect with us” activity. The News activity currently simply takes the user to the website, so I won’t cover it anywhere else.
The first thing this app does when it loads is it goes out to a web service and retrieves the current basic convention information. Such as date, and what “number” it is. (Next year is Nobrandcon 11). It decides what convention to search for based off of a preference, which is default to 11, so the webservice knows what to look for. The intent is that this app will not need to be updated from year to year, and that all the changes will be made to databases backing the webservices. I had to create the databses and webservices myself, and because the convention isn’t for another 5 months, not all the information is present in the database, so some parts of the app are lacking in content.
The first actual activity we’ll look at is the info activity:
It simply displays the basic information about the convention. Number, date, location. And it provides links to the schedule (which is the same as the link in the main hub) and the guests. We’ll start with guests. First we go to a listactivity of the guests. A user may pick one to see a bio of the guest. Once there, instead of pressing back to choose a different guest, gestures were implemented to allow a user to page forward or backward (left and right) between guests. As you can see, I didn’t write up a bio for Kyle Hebert, but there would be a full bio displayed under his name.
The events activity was initially the trickiest thing for to figure out. I needed to have an hour by hour schedule, that covers three days. There are 8 rooms, each needing their own schedule. So I ended up approaching it the same way I did guests. Using gestures to page left or right between the rooms. At first I had trouble getting the gesture overlay to work with a list, but after I found the intercept attribute in gestures, I got it to work. Currently, only two rooms have any scheduling, but you can page between all of them. A feature I intend to add to the final build will be if the application is being used during the convention weekend, that going to a schedule will scroll you down to the current events (ie: if it’s 4PM saturday, the schedule will scroll to 4PM saturday)
The”connect with us” activity was as interesting challenge at the end. It display a variety of means to connect with NoBrandCon online, such as Facebook or Twitter (Google+ and Youtube coming soon), as collected from a web service. However, I also wanted to maintain which links a user has already clicked on, so that the adapter could sort itself keeping the links that haven’t been clicked to for last. This information would only be stored in the local database. This causes problems when I retrieve from the webservice, as it intends to clear the local database, and then repopulate it. Instead of “delete” and “addall”, I used an “insert or update” where it tried to insert, with the primary key predetermined (mirroring the id from the webservice), and if the insert returned an error (I always cringed at the red in the console window, even though it worked as intended), then it would update the “connection” of the same id
The challenges I faced were in two significant places. I had to create json webservices. I didn’t have any idea how to do that. I thankfully found a very helpful tutorial here http://www.itnewb.com/tutorial/Introduction-to-JSON-and-PHP and after some work, I was well on my way to writing the four webservices. Sadly the tutorial wasn’t perfect at explaining how to make a jsonarray, but after some prodding I got it to work.
The second challenge was with gestures, and that problem was twofold. First, when implementing a gestureoverlay, everything under it seems to stack, because of this, I ultimately decided that in the guests, you can only gesture over their bio, but not their name. Second was the problem with the listactivity, and being able to navegate the list below. Events will be clickable to show a description, but to avoid clicking while gesturing, I will most likely make the list activity long clickable instead. The last thing about it was that my gestures were incredibly simple. Left, or right, so instead of making a gesture builder, I broke down the gesture myself into a start and end point, and determined if they swiped left or right using trigonometry.