之前一直都有看到关于Google App Inventor的介绍,也看到一个介绍视频。充分体现出Android的开放性。大家先来看看这个视频,非常不错:
今天看到Google App Inventor已经向全部开发者开放了,只要你有Gmail账号登录就OK。快来爆发你的小宇宙吧,简单创建属于你的APK。
Google App Inventor地址:http://appinventor.googlelabs.com/about/
现在附上一个简单教程:
使用App Inventor的准备工作:
在Getting started页面你需要完成两个步骤:设置你的手机和电脑、将app inventor与手机相连。
电脑设置:下载最新版的Java(www.java.com)、安装app inventor附加软件(Instructions for Mac OS X;Instructions for GNU/Linux;Instructions for Windows)
手机设置(英文):
- From your phone’s home screen, select the menu, then Settings, then Applications.
- If your phone has an Unknown Sources box, it should be turned on (checked).
- Still on the Applications screen, tap Development.
- Make sure both USB Debugging and Stay Awake are checked.
- Go back to the Settings screen (you can tap the Back button twice to get there).
- Tap Sound & Display. Scroll down to Orientation and make sure it’s not checked. Note: On some phones there might be be only a Display settings item. If so, tap that and make sure that the Auto-rotate screen item is not checked.
第一个Android应用:
这个界面叫做设计器Designer,中间的部分viewer查看台,左侧是palette组件区(包括常见的文本label、按钮Button、还有高级一些的加速度感应计、指南针、图像、画板canvas等等)右侧的components是你的app中正在使用的组件和组件中链接的媒体(这里链接了一张图片和一个mp3文件);最右侧是组件的属性,包括组件的大小,文字颜色,背景色,背景图等。
这是一个say hello,点击那头驴(实际上是个按钮)就会发出叫声。当你摇晃手机的时候,也会发出叫声。
Design相当于你做菜的时候的菜板,你把所有的葱姜蒜、肉都放在了菜板就等着下锅炒一炒了。然后你要告诉他们怎么炒,先放葱还是先放肉,这时候你就需要用到Blocks editor模块编辑器了。
每个block都有自己的相关属性,比如按钮有自己的点击、聚焦、聚焦丢失等属性;声音有自己的play、resume、stop等属性。这些都是告诉你在Designer里的组件他们的动作是什么。
对于一个有点编程基础知识的人,在app inventor里面还是完全用不到的。这个东西真是太强大了,Google圆了很多想做程序而又没有基础的人的梦。