So for my Mobile Web assignment…. I had no more creativity left in my brain after the other mobile assignments, so as a warning, my mobile web assignment is super simple. When you load up my app, the user is greeted with an instruction page (dialogue page) that tells them to click the “take a pic” button. After that it asks them if they are ready followed by a yes and a no button that are grouped in a control group. If the user clicks no they are brought to another dialogue page that says too bad they should start using the app, if the user hits yes they are brought to the take a picture page that has the take a pic button. (2 options bring you to the same take a pic page). The take a pic page has a button that says take a pic (the button also has a custom camera icon!). When they click take a pic they are brought to the phone, where it takes a picture, and when they have finished with the native camera function, they are brought to the view image page where they can see the lovely photo they just took. You can go to the take a pic page, the image page, or the instruction dialogue at anytime within the app.
]]>
Some lessons I learned were that tearing apart JSON can actually be a challenge if the site that provides it does not organize it well OR name their tables properly. Seriously, toptracks returns a single entry so it should be singular and track returns multiple entries so it should be plural. Confusing when you are trying to figure out what is what.
My app is designed for two people (maybe a significant other) living together and want to keep count on each others costs so that they remain even. Basically, after you are done shopping for mutual groceries, or maybe you share a car and you bought the gas, you add that to the database. Whenever you want to “square up” with the other person you can query the database and get the difference/2 (It is divided by 2 because I am assuming you and the other person each owe half of whatever was placed in this app) and figure out who owes who what money to remain even.
On the main screen you input your name (no more than 2 different names allowed in the database), the thing you shopped for, and the cost of it. After hitting insert, it will place it in the database and clear the editText boxes. If you hit delete or update it will get you a list view of the entire database at that point in time. If you are in the delete activity on a long click it will delete that entry and update the listView. If you are in the update activity and long click a item, it will replace all text within that row with whatever you have in the 3 editText boxes in MainActivity. If you click query it will give you who owes who how much at that given point in time.
During the creation of this app, I got a huge refresher in SQL. Also I learned a lot about how to interact with the database. By the end I was fairly comfortable when pulling out or deleting or updating the information within the database very easily. Also I learned a lot about listViews and filling them from a sqllite database.
]]>
–Enjoy!
Machines learn from me
they cannot do it alone
I am thier ruler
Java is my friend
it hides most of the hard stuff
ignorance is bliss
Mobile computing
a new age of programming
sign into Twitter
We control robots
with our phones and mobile apps
I fear the future
Fast information
it is in everyone’s pants
now that is power
on_click_listener
can be so aggrevating
pushes my buttons
Edit Text boxes
they hold my information
unless it is false
Information is
at everyones fingure tips
but we like Angry Birds
The Android OS
it is a powerful thing
detects my actions
I need permission
therefore I must ask for it
manifest is god
]]>For the U and I assignment I have created an app that will aid in counting your Cribbage hand. For those of you un-familiar with the card game Cribbage, there is a point in the game where you end up with a “5 card hand” (4 cards in your hand but a special card that everyone can use with their hands) and receive points depending on what you have. After this point, you move your game piece that many points ahead. First person to reach 121+ points completes the board and wins the game. You can gain points by having pairs (2 points), runs of 3,4 or 5 (3,4 and 5 points respectively), having cards that add up to 15 (2 points for each combination of cards that add to 15), also if you have a Jack in your hand that matches the special card everyone can use, that is 1 or 2 points depending on house rules. The last rule (implemented by my friends to make my life miserable) is that any points you do not count, and someone else in the game finds, they keep. Basically you must count your hand carefully and make sure you do not miss points or they will go to someone else. I have created a 2 activity app to aid in hand counting to make sure your points do not end up with your friend. It is a 2 activity app.
The first one takes in your name and has a start button
The second one is where the magic happens. Your name that you entered in the main_activity gets passed as the title of the second activity. Here you have options to enter how many pairs,sets of 15, runs of 3, etc. you have and it gets totaled on the right side (by pair, sets of 15, runs of 3, etc) and on the bottom you have a total for your hand that round (the amount you would move your piece). Finally a reset button to start entering your hand over (for the next round).
I used TextViews, EditTexts, and Buttons to carry along information across my application.
I have learned many lessons doing this. My first lesson I learned was to test frequently (even though the emulator can be a pain sometimes) because there was a point where I coded a huge amount and than it did not work. Unlike a “normal” java assignment you can use println to isolate the problem area. In the emulator it is a little harder to do something that easy. The other lesson I took away from this is that handling different types of information is very hard in Android development. Taking strings from EditText that you need to be an integer to do math, can cause a lot of headaches.
1. I would really like to know how to create some kind of game that 2 (or more?) players can share some sort of “game board” and alter it in real time and the other player would be able to see the updates. The specific one I have in mind is some sort of tower defense, where you battle another player and both players send attackers to the other and you must also defend against the attackers sent. Both players must play offense and defense, and both work on the same “game board” at the same time as they are attacking and defending in real time.
2. I would like to see a GPS tracker that you can have a “group” and be able to see the locations of people in your “group” based off the GPS of their phone. There wold have to be crazy security measures to make sure nobody else had access to somebodies groups.
3. Learning how to do any programming with accelerometers would be awesome. It could be a game or just flipping the screen, or controlling a robot (Sphero)!
4. This probably exists, but learning how to create some “shared” calendar that you could share with a loved one so you always know their schedule and they always know yours.
5. Finally working with graphics in an application. I do not have a ton of experience with any graphics in any programming but the ones on mobile devices intrigue me. Creating something like a bird that you fling across the screen, and than smashes into a bunch of blocks that collapse and move I think is really cool. The part that confuses me the most is the movement of the graphics on the screen. How do they get drawn in the first place, where are they stored, etc.
]]>