Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Publishing to an Android device (PC)

From: Flash Professional CS5: Creating a Simple Game for Android Devices

Video: Publishing to an Android device (PC)

Now that I have an APK file created, what I want to do with this file, which is really my game, is I want to go ahead and put it on my Droid device. So I happened to have a Motorola Droid 2 that I want to put this APK file on, but there is one thing I need to do on my droid device first. So here's my Motorola Droid 2. I'm going to go ahead and hit that Options button down in the lower-left, and I am going to go into the Settings. Now some of these buttons might not be exactly the same depending on your droid device, but it will be in Settings, and if you go into Applications there should be Development.

Publishing to an Android device (PC)

Now that I have an APK file created, what I want to do with this file, which is really my game, is I want to go ahead and put it on my Droid device. So I happened to have a Motorola Droid 2 that I want to put this APK file on, but there is one thing I need to do on my droid device first. So here's my Motorola Droid 2. I'm going to go ahead and hit that Options button down in the lower-left, and I am going to go into the Settings. Now some of these buttons might not be exactly the same depending on your droid device, but it will be in Settings, and if you go into Applications there should be Development.

So select Development to set Development options, and right within this list notice it says USB debugging. So debug mode when USB is connected, go ahead and check that. You can also allow for mock locations if you do any location-based gaming or anything like that, but again, that's the only box you need to check, and when you're done with that you can just go ahead and hit on that Home button and now the device is ready and good to go.

So from here I can go ahead and connect this device to the computer through a USB cable. Now, we're really getting down to the fun part where we actually get to take our game and put it on an actual device and play with it. So again, here's my game right here. It's an APK file. And I want to take that and push it out to this Motorola Droid that I have connected via USB already, so it's already connected, and that's how I choose to push it out to the device and know that I can also take this APK and I can email it to the device, or I can put it on a URL and go to that URL on the device as well.

So there are many different ways, but I find connecting it through USB just makes development much faster. So really, what I need to make this happen is the AndroidSDK. So I'm going to go ahead and go to developer.android.com, and right there on the Home page you'll see Download, and this is where you'll download the SDK. I will click Learn More, and again, this is constantly being updated, but you can see right here in this main area, here's my Windows link for that SDK, and I can select it and download it.

It is a zip file, so again just download it, unzip it. I've actually already done that, so it's right here, so I'm going to click Cancel, and I'll just open up that folder. As you can see, these are all of the items that I've already downloaded, but before I get into that information, I would like to point out a couple resources on this page, because everything from the blog to the forums is really helpful, but know that since I'm connecting this device through USB, I need to make sure my USB drivers are up to date. So if yours aren't for some reason, you might consider going out here and just updating your drivers, okay.

My drivers are doing fine on this droid device, so I don't need to do that and you might not need to either. But nonetheless, just go ahead and download that SDK. Here it is. I'll open this up, and the first thing you would want to do is run this SDK manager. This is really going to install everything that you need. So I'll run this, and as you can see, I pretty much have everything already installed. So again your list may vary, but again, I have one item on my list that I can go ahead and install. But again, just make sure they're all checked and then select Accept All, just to install everything, just to make sure you have everything you need. Click Install. In this case, I'm fully up to date, so I can just click Close, and that could take up to 10 minutes, by the way, but notice it does install quite a few things and a lot of tools you might end up needing.

But again when it comes to just pushing out an APK to a device, I am really only need the Android Debug Bridge, so let's take a look at where is that at. Now that everything is installed, if I go back out here to this folder, notice that there's this Platform tools folder, and this gets installed when you run the SDK manager. So I'll open this up, and nonetheless here is the ADB, our Android Debug Bridge that I want to run. Now I'm going to use this to push out this APK to my device.

So I'm going to takes this APK and I'm just going to drag it into that same folder. Okay this is just going to make development a little quicker for me. I'll move this off to the side, and again I'm going to use this to package up this APK, and I'm going to do that through the command line. So I'm to go ahead and select the Start menu, and I'll just type CMD. There is my executable so I can hit Enter, select it, and here we are. So the first thing I need to do is I need to target that specific folder. So I'm going to say CD for Current Desktop and type in Desktop and point to that specific folder, so AndroidSDK. So whatever that folder is called, again, I have just renamed it and to make it a little shorter and easier to type, and I want to make sure that everything is capitalized appropriately. AndroidSDK/platform dash tools right in that folder.

I'll just do a forward slash, hit Enter, and now I'm targeting this folder. Now the next thing I need to do is I need to go ahead and use the ADB, so just type in ADB install and then Invaders.apk. Since it's in that same folder, this is really easy to type. I would say it's pretty darn straightforward, and that's all I need to do. So again, I'm going to make sure my device is connected by USB. I'm going to make sure my drivers are up to date, and if they are, all you need to do is hit Enter. It will go ahead and take that APK. Sure enough, success is what it says here, and it pushes it out to my device. And here's my Droid 2, so all I need to do is go to my Applications area, where all my applications are at. Notice how it says Doodle Galaxy Invaders.

I can go ahead and select that app to launch it. Here's the intro screen. I can go ahead and click Play to play the game. So using only really one of the features of the Android SDK, I can easily take any APK and push it out to a connected device.

Show transcript

This video is part of

Expand all | Collapse all
  1. 1m 48s
    1. Welcome
      1m 0s
    2. Using the exercise files
      48s
  2. 7m 16s
    1. Understanding the user
      4m 2s
    2. Flash content on Android devices
      3m 14s
  3. 17m 28s
    1. Reviewing the game
      1m 50s
    2. Creating a file in Device Central
      5m 39s
    3. Reviewing the game structure
      8m 23s
    4. Adding code snippets
      1m 36s
  4. 36m 13s
    1. Animating the intro screen
      8m 13s
    2. Moving the player
      8m 13s
    3. Adding enemies
      6m 49s
    4. Adding movement
      4m 16s
    5. Adding chance and randomness
      8m 42s
  5. 34m 30s
    1. Adding lasers
      8m 14s
    2. Detecting collisions
      7m 57s
    3. Adding explosions
      6m 26s
    4. Removing assets from the stage
      8m 50s
    5. Adding audio
      3m 3s
  6. 33m 12s
    1. Adding scoring and levels
      7m 41s
    2. Subtracting lives and ending the game
      4m 26s
    3. Creating a results screen
      5m 8s
    4. Displaying the score
      6m 57s
    5. Saving and loading game results
      9m 0s
  7. 17m 14s
    1. Detecting movement with the Accelerometer
      6m 39s
    2. Using the swipe gesture
      4m 42s
    3. Using hardware keys
      5m 53s
  8. 23m 18s
    1. Handling exits and idle mode
      3m 31s
    2. Handling activation and deactivation
      6m 14s
    3. Optimizing graphics
      7m 14s
    4. Optimizing ActionScript
      6m 19s
  9. 34m 41s
    1. Creating the application files
      8m 23s
    2. Creating the app (Mac)
      5m 5s
    3. Creating the app (PC)
      7m 19s
    4. Publishing to an Android device (Mac)
      7m 7s
    5. Publishing to an Android device (PC)
      6m 47s
  10. 8m 56s
    1. Uploading to the Android market
      7m 7s
    2. Downloading from the Android market
      1m 49s
  11. 1m 22s
    1. Next steps
      1m 22s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Flash Professional CS5: Creating a Simple Game for Android Devices.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.