Join Anastasia McCune for an in-depth discussion in this video Publishing mobile and desktop applications, part of Up and Running with Flash Professional CC.
Let's take a look at how to test and publish your flash pieces as an Adobe AIR File for mobile that can be uploaded to places like Google Play or the Apple apps store. We'll also touch on publishing AIR files to be deployed and installed on a Desktop. This movies meant to give you just a taste of what this process is like. There are entire courses here in the lynda.com library that focus specifically on developing and deploying Air applications. So let's take a look at testing and deploying from mobile. So we have this piece that showcases some of Paul Shellington's art as a kind of gallery.
It's a different piece than the Bird Watching piece we built during the course, but it uses some of the same content. This piece, by the way, was built using one of the templates that come with Flash. You can find it by going to the File menu, then New, Templates, AIR for Android, and then Swipe Gallery. I'm going to save a copy of this in the end folder in the exercise files for this chapter so we can clearly see all the resulting files that we get when we publish. Looking in the Property Inspector, this piece is targeting AIR 3.6 for Android. Note that AIR 3.6 for IOS is a choice for mobile as well. Now, before you actually publish an application for mobile, you can test it out and simulate how it will behave on a mobile device. You can do this by hitting Ctrl+Enter or Control > TestMovie > In AIR Debug Launcher.
What's called the content simulator comes up. The content Simulator shows you what your appllication will look like on a device. You can test out things like how the application affects the accelerometer which referes to when the device is tilted. Our application doesn't utilize accelerometer, but you may have played some games on a mobile phone or tablet at one point that do. You can also test things like various gestures and movements you make with your finger. I'll move to the Touch and Gesture area and then Check to activate the Touch Layer. Now I'll select Swipe. I can use the mouse to simulate what it's like to actually use this on my mobile. Once you're happy with your piece in the content simulator, you can test it out on an actual mobile device.
To do that, first we have to set some settings in Flash. I'll click on the wrench icon next to the Target drop-down where we've chosen Air 3.6 for Android. Know that the process we go through here is similar for Android and iOS devices. Although the resulting files are different depending on which platform you're targeting. So on the General tab we see right away the name of our end output file for Android. It will be birdwatching_mobileApp.apk. The App name, we'll leave as it is, the App ID, we'll put com.lynda.birdWatchingMobile. For this application, we'll leave the Aspect ratio at Portrait. On the Deployment tab, you're asked to provide a Certificate and a Password for that certificate.
The Certificate is basically like using, yes I am the creator of this application. I am responsible for what's in it and what it does and I promise I am not trying to do something nasty like break into your bank account and steal all your money. Now, you can create a certificate right here by clicking Create and filling up this form. So I will fill out my name, the organization unit I will put lynda.com, the organization Lynda as well and I’ll create a Password. I’ll click Browse to tell the computer where I want to save my certificate. I’ll put mine on the Desktop.
Now I’ll click Save and then click OK to actually create the certificate. Flash says the self-signed certificate has been created. It is a .p12 file. So this works fine, but when a user installs this application, they'll be warned that the certificate is unknown. Basically it means that there's not a way for Flash or the application you're creating to verify that you really are who you say you are. If your looking to create applications that you want to sell for money or deploy to a public audience or something similar. You might want to look into getting a certificate from a certificate authority. The process of getting a certifecate for iOS is more complex than this and it does cost some money.
There is also a registration process for the actual devices you might want to test on like an iPhone or an iPad. The course, Building Mobile Apps for Multiple Devices by Paul Trani, here in the lynda.com library goes through that in detail. Anyway, the p12 has been created, and I'll type in the Password I just set. I'll also click to remember my password for this session, so if I accidentally close this dialog, I don't have to retype it again. Lower on this screen, in the AIR runtime section, you can choose your AIR Runtime to be captive runtime, so, embed AIR runtime with application. Or have the user get it from Google Play or the Amazon App Store. We'll stick with Google Play.
If you are not sure what this means, please refer to the movie about Adobe AIR just a little bit early in this course. Now on the Icons tab, you have the option of including icons for your application. So these will be used in different places, like when the app is installed in your phone and you touch the icon representing the app to open it up. I have icons for this in the Start folder in the exercise files, so I will add them in. Here's the one for 36 by 36. Flash is asking me here, is it okay if I copy the icons over to the end folder in the exercise files? Yes, that's fine. I'll do it for 48 by 48, and 72 by 72.
The permissions has some things that you can decide if you want the user to be notified about or not when they install the app. I'll check Internet. The Languages tab is about what other languages you want your application to be able to support. So now I'm ready to connect my Android phone. First I need to change something on the actual phone itself before I can test the app. So on the phone I'll access the sub-menu button and go to Settings and Applications. Then check Unknown sources. That allows for the installation of non-market applications. Then you can also go to Development and check USB debugging, if you want to be able to debug on the device as well.
Lastly you can always check Allow for mock locations in case you need that for GPS. So the phone is ready and I'll connect it via USB to the computer. I'm going to go back to the Deployment tab and near the bottom make sure that Install application on the connected Android device. And launch application on the connected Android device are both checked. Edbe7a45 is the serial number of my phone. Flash actually just detected that my phone is connected to the computer, so I'll check the checkbox.
If you don't see your mobile device listed in the box, you can click the Refresh button. If you're clicking Refresh and your device still doesn't show up, you might want to try downloading and installing the USB device drivers for your mobile. You should be able to find them for free from the manufacturer of your device. So, I'll click Publish. We wait for just a minute and we're told that the APK file has been created. That's the installable air file for Android devices. The app also appears on my phone. I can swipe between the different images and when I'm done I can hit the submenu button and exit out of my app.
So that's really cool. Now let's say I'm now ready to put the app up on Google Play. Well, what you need is for Flash to create an APK file. I already did that when I published to my phone. Here it is in my File Explorer. Notice also the supporting XML file called the application descriptor file. But I'll unplug the phone to simulate the situation where I didn't deploy it to the phone first and I just want to publish out the APK file. Back in Flash I'll click on the icon of the wrench again to open up the Settings box. Basically what you have to do to publish an APK file for upload is what we just did with the certificate and setting up the icons the permissions everything. Since we already did all of that the only thing different is that I'll go to the deployment tab and uncheck install application on connected Android device. So I'll click Publish and wait for it to finish, and my APK file has been recreated.
From here you'll use the APK file and the XML file and upload it to your favorite app store and you can try to get a million downloads. So I'll close this file. Publishing to make an application for desktop is just as easy, and we have an example that's already done. If you look in the end folder in the exercise files for this unit, you'll find a subfolder called birdWatchingForDesktopInstall. The FLA here is the same one that we spent our time building in this course, just with the peacock video taken out. You'll notice that in the target drop down it says AIR 3.6 for Desktop. If you click on the wrench icon, you'll see that I already filled out all of the information in the AIR Settings boxes for you. And I also already published out the end AIR file. If you want to try publishing this out on your computer, you'll just need to change the P12 Certificate file on the Signature tab to a P12 you have on your computer. Instead of pointing to my P12 that isn't included in the exercise files. It's also possible that the icons may not be remembered by Flash. If that's the case you can go through and just add them again. Anyway, the end AIR file is this one.
It has an icon that looks like a box with Air written on it, and you can see that it's an installer package. I'll double click on it to install it. So first I'm warned that the signer of this certificate Is an unknown possibly scary person. That's okay, I'll click Install and we'll go ahead and click Continue here, and it takes just a second and the application is installed in my computer. Now this is running just like any other application on my computer like Word or Photoshop or Flash. You can see I have a short cut here on my Desktop and it also shows up in my System Tray, and there we have it. You can create and deploy AIR projects within Flash Professional and make them an installable application for the desktop and for mobile. The Publish process is very similar for both. The thing to take away from this, is that you have everything you need within Flash to develop for desktop and mobile.
If you feel comfortable with the basics of creating content. Using things like movie clips and tweening, that we've seen in this course, you're well positioned to go on to other courses in the lynda.com training library.
- What is Flash?
- Using the Timeline
- Creating shapes in the Merge and Object drawing modes
- Using symbols
- Creating simple animations
- Using ActionScript to create navigation
- Converting and integrating video
- Publishing for web, mobile, and desktop applications