Thursday, December 6, 2012

TextGroup App

I just finished another app that sends a text to a group of people. It didn't take long -- no where near as long as the last one. (:

Here are the components I needed for this app:
  • TextBox - this is where the user will enter the message; renamed MessageText; set the hint to "Enter a message"
  • Button - this is what the user will click after entering the message; renamed TextGroupButton; set text to "Text Group"
  • Label - this will report when the message has been sent; renamed StatusLabel; set text to "status"
  • Texting - this is the component that sends the text

To send the text, I needed to set two properties of the Texting component: the phone number and the message. Once these properties are set, I call the SendMessage function to actually send the text. This is what it will look like in Block's Editor (except the 1112222 will be replaced with an actual phone number):


Next, I'll modify the blocks to text more than one number at a time (note: in this version, the numbers are predetermined. So to choose different numbers, I would have to modify the blocks. There's a way to make the app so that the user can pick different numbers every time, but I don't know how to do that yet):


I'll reconfigure the blocks already in TextGroupButton.Click, and it'll look like this:


Now, when the TextGroupButton is clicked, the Texting1.Message property is set to the message entered by the user in MessageText. Then the foreach block begins executing. The two lines of blocks nested within the foreach will be executed three times, because there are three items in the list PhoneNumbers . The first time they are executed, the value var will hold the value "1112222", and the message will be sent to that number. As soon as the message is sent, the app will "loop up" and repeat the foreach blocks. The second time through, the value var will hold "3334444", and the message will be sent to it. On the third iteration, var will hold "5556666", and the third text will be sent out.

Next I modified the blocks so that the status label reports the last message sent. The updated TextGroupButton.Click looks like this:


This is what the final looks like:


This is what the app looks like:


I want to figure out how to make the app using the database, so that the user can pick different numbers every time they decide to use the app.

This app wasn't as complicated as the other one, but I still liked doing it..... I like knowing how things work!

Wednesday, November 28, 2012

QuizMe App

I've completed another app, and this one I really like. It's called QuizMe, and the tutorial made it about baseball, but I switched it up and made it about something else. The topic I used was the movie "The Land Before Time", which is a very old animated movie I watched as a little girl about dinosaurs.

This app wasn't that hard to make, but it took a while. The first couple of things I had to do involved creating the interface for the app, which was pretty straight forward. I created the following components:
  • Image - this is the picture that shows up in the app
  • Label - this displays the current question; renamed QuestionLabel
  • HorrizontalArrangement - this organizes the AnswerPromptLabel and Text, which are coming next
  • Label - this is the text that will prompt for an answer; renamed AnswerPromptLabel
  • Text Box - this is where the user will enter text for their answer; renamed AnswerText
  • Label - this is where "correct" or "incorrect" will be displayed; renamed RightWrongLabel
  • HorizontalArrangement - this organizes the AnswerButton and NextButton, which are coming next
  • Button - this is what the user uses to submit their answer; renamed AnswerButton
  • Button - this is what the user uses to move on to the next question; renamed NextButton

The next couple of things I did included uploading the image I was going to use and setting "Image"'s picture property to that imagine. I changed QuestionLabel's text property to "Question:" ; AnswerPromptLabel's text property to "Enter answer:" ; AnswerText's text property to "Please enter an answer:" ; AnswerButton's text property to "Submit" ; NextButton's text property to "Next" ; RightWrongLabel's text property to "correct/incorrect". I moved AnswerPromptLabel and AnswerText into HorizontalArrangement1 and moved AnswerButton and NextButton to HorizontalArrangement2.


^ This is what it looked like, only my picture was one of the Land Before Time characters.

I won't go into too much detail about what I did in the Block's Editor because that would take all day, but I'll show you:


My questions were:
  • In what year was the first The Land Before Time released?
  • What kind of dinosaur was Chomper?
  • Whose mom died?
  • What were the dinosaurs called that Little Foot and his friends were afraid of?
  • When was the last The Land Before Time  released?
This is what I did next:

 My answers were:
  • 1988
  • T-Rex
  • Little Foot
  • Sharptooths
  • 2007
For QuizMe, when the app starts, the app should choose the first question in the list and display it in the QuestionLabel component. To get it to do that, this is what I had to put together:

 Next I had to program the behavior of NextButton. I already defined the current QuestionIndex to remember the question the user is on. When NextButton is clicked, the app needs to increment this variable, e.g., change it from 1 to 2 or from 2 to 3, etc., and then use the resulting value to select the new "current" question. This is what I had to do:



What the app needs to do is ask a question-- check a condition-- when the NextButton is clicked, and execute different blocks dependending on the answer. One way to ask the question is to ask, "is the variable currentQuestionIndex already 3?" If the answer is yes, you should set currentQuestionIndex back to 0 so the user is taken back to the first question. Here's what I did:


The current app shows the same image, no matter what question it is on. I changed this so that a picture pertaining to each question will pop up on the screen when that question is reached. This is how:


After I put the pictures in, I had to modify the NextButton.Click event-handler so that it modifies the picture depending on what question the user is on:


Next, I added blocks that report whether or not the user answered the question correctly. The RightWrongLabel had to be modified to report whether or not the answer is correct:


To blank out the RightWrongLabel and the AnswerText, I did the following:


This is what the Block's Editor looked like when I finished:


This is what the app looks like:



That took a lot of explaining but it was fun (:

Wednesday, November 14, 2012

What's New?

So these past couple of weeks, I've been working on a website called App Inventor, which is a site that helps people create their own applications for Android. It's really cool, and not very difficult. The first app I made was called Hello Purr, and itmakes a picture of cat "meow" when it is touched. It was the easiest app I created. The last one I created was a version of Whack-A-Mole. It took two full days to make, and although it's done and functional, I'm not completely satisfied with it. Pretty soon, I'm going to start making my own apps that we can use in class.

Now that I know how to do this, I can make apps that I think are fun too. My favorite app that I've made so far is the Magic 8 Ball, which everyone's heard of: you ask a "yes" or "no" question, shake the device, and it gives you an answer. I LOVE things like that, even though they're not real.....

I'll let you know what's coming next!



Monday, June 4, 2012

ELL Book

Because I am writer, Mr. Elkner has asked me to write a book for the HILT students. There aren't many books out there for teenagers who, because English isn't their first language, are on a lower reading level than other high schoolers. I was given a list of words to use, and I am working on a book for them. What I actually decided to do was take a book that I wrote, the one entitled "Cupid's Arrow", and redo it so that the HILT students can read it. I needed to edit Cupid's Arrow anyway because I had a couple issues with the characters and the plot development, so this is the perfect opportunity. My goal is to be done by the end of the week, but if not, I know it'll be done by the end of the school year.

(:

Friday, May 25, 2012

Sigil

Mr. Elkner installed a program on my computer to replace eCub. It's called Sigil. It does the same thing as eCub in the sense that it converts word documents (well, text or HTML documents) to ePub format. But the best part is that you can also edit the text/HTML document once it's in ePub format. You can add images, cover pages, a table of contents, chapter breaks, and more! This is really cool, because I needed to work on the spacing of one of the books I put on my Nook.

Sigil is really cool! I downloaded it onto my computer at home and am using it to edit another of my books right now! Thank you, Mr. Elkner!

Thursday, May 17, 2012

I Did It !

I finally did it! I converted two of my books, "True Love" and "Centipedophobia", into eBook format and put them on my Nook. It was very simple and, even better, it was FREE!

First, Mr. Elkner downloaded eCub onto my computer. eCub is the program that converts documents into eBook format. Before you can convert a document to eBook format, go to the document and click "save As." Then save it as a text (.txt) document. If you don't do this, eCub won't be able to convert the book. Once the program is downloaded, you click on the icon. Then click "New Project". It will take you to a screen where you have to type in the title of the book, the author, and the identifier. I'm still not sure what the identifier is, but I type in a different number for each book that I convert. There are other areas that can be filled in, but that is optional. Then click next. After that, you have to locate the folder that your text document is saved in. Hit the next button. You can hit the next button again. Then you will come to a screen that has a box with checked items in it. Make sure that your document is checked. If not, nothing will convert over. Hit the finish button. Now you will see a smaller screen with the title of the book on it. Up at the top is a button that says "Compile." Press that. Once eCub is finished, your book is now in eBook format! It will be saved in the same folder as your original document.

Next, Mr. Elkner downloaded Calibre. You can use Calibre, or Adobe Digital Editions. Both are free. Click the icon of whichever program you downloaded. For this blog, I will describe what to do in Calibre.  Once the Calibre library pops up, plug in your eReader. A button that says "Device" will pop up on the top. That's how you know your eReader is registered. Next, click the button on the top that says "Add Books." Browse for the epub format of your document and click OK. Now your book is in your Calibre library! You can drag and drop it to the button that says device, or you can right click and click on "Send it to device", or you can click the item and then click the button at the top that says "Add to device."

That's all you have to do! Make sure you eject your device before you unplug it, and then you are done!

Monday, May 14, 2012

eCub

Mr. Elkner downloaded eCub on my computer so I can convert my books and poems to ePub format. I converted "True Love" to ePub format and will put it on my Nook tomorrow when I bring the cord. Yay!