CPSC 110-08: Computing on Mobile Phones
Fall 2011
Sharing Your Source Code
For this course, with its emphasis on free and open source
software (FOSS), it is encouraged that you share your source code.
In fact, for 2-person projects it's necessary that we share our
code and the method outlined here will show you how:
- Create a File Cabinet Page: Login in to your Portfolio and
create a new page (tab on the top right). Select the File
Cabinet. Name your page something like MyApps.
- Download Your Project's Source Code: From within the App Inventor
Designer page, select "My Projects" and then checkmark the project you want
to share. Under the "More Actions" tab, choose "Download Source". This will
download a file named "MyApp.zip". Save it on your desktop.
- Don't Unzip This File: If you are sharing it with a
partner, just email it, as is (not unzipped), to your partner. Your
partner should use the "My Projects > More Actions > Upload Source"
option to upload the Zip file.
- Upload to Zip File To Your Portfolio Page: Click on the
link to your MyApps (file cabinet) page and choose the Add
File. Then browse to your ZIP file and upload it.
- Your ZIP's URL: In order to link to your ZIP file you'll need
to know its URL (Uniform Resource Locator) for your file.
Assuming your file cabinet is named MyApps and your app
is named MyApp, your URL will
be: https://sites.google.com/site/yourportfolioname/MyApps/MyApp.zip.
Type carefully. It's case sensitive.
- Create a Link to Your ZIP File: To create a link to the ZIP file on
your Portfolio page, follow these steps:
- Click on edit page (tab on the top right).
- Highlight the text that you want to serve as the link text.
- Use the insert tab (top left) to insert a link. This will
bring up a dialog box.
- Select Web address for your link and paste the URL to your
ZIP file into the URL text box. Make sure your URL is spelled correctly.
Then click "OK".
- Save your Portfolio page.
- Test that the link is correct by clicking on it.
Sharing Your App
This tutorial shows you how to share your app with friends and
others who have Android phones. We will create a file that can be
downloaded to an Android phone. We'll upload that file to our
Portfolios. Then we'll create a 2-D bar code, a QR Code and
post that on our Portfolios. Your friends will then use a bar code
reader app on their Android phones to download your app.
- Create a File Cabinet Page: Login in to your Portfolio and
create a new page (tab on the top right). Select the File
Cabinet. Name your page something like MyApps.
- Package Your App for a Phone: When your app is finished
select the
Download to this Computer under the Package for Phone
tab. This will create what is called
an APK
file, an Android package file -- a file that is bundled
to be downloaded to an Android phone. If your app is named MyApp,
your APK file will be named MyApp.apk.
- Upload your APK File to Portfolio File Cabinet: Click on the
link to your MyApps page and choose the Add File. Then browse
to your APK file and upload it.
- Your APK's URL: In order to link to your APK file you'll need
to know its URL (Uniform Resource Locator) for your file.
Assuming your file cabinet is named MyApps and your app
is named MyApp, your URL will
be: https://sites.google.com/site/yourportfolioname/MyApps/MyApp.apk.
Type carefully. It's case sensitive.
- Create a Link to Your APK: To create a link to the APK on
your Portfolio page, follow these steps:
- Click on edit page (tab on the top right).
- Highlight the text that you want to serve as the link text.
- Use the insert tab (top left) to insert a link. This will
bring up a dialog box.
- Select Web address for your link and paste the URL to your
APK file into the URL text box. Make sure your URL is spelled correctly.
Then click "OK".
- Save your Portfolio page.
- Test that the link is correct by clicking on it.
- Generate the QR Code Image: Go to the following
site, http://qrcode.kaywa.com/,
and paste your URL into the text box and click the "Generate" button.
This will generate a 2-d barcode image.
- Save the QR Image: Right click and save this image to
your desktop or somewhere. The default name for the file will be
something like "img.php" or "img.php.png". You'll want to rename it
to "myapp.png" or something similar. The file name must have a ".png"
extension in order to upload it.
- Upload the QR Code Image to your Portfolio: Upload
the saved QR Image to your Portolio page -- by selecting Insert > Image
while in edit mode. After copying and saving the
QR image, upload it to your portfolio.
- Download to Your Phone: Test that the QR code is correct
by downloading the app to your phone using the Barcode Scanner
app. If not already installed on your phone, you can find one by
searching the Android Market. Once you've installed Barcode Scanner,
point it at your QR code and download your app.
- That's It! Just point your friends to your Portfolio.