2012年1月16日星期一

Google App Inventor 10

Introduction Scratch Scratch is known as a programming language that assists us to make many of our stories, animations, games, etc. who you can share from the internet. Scratch is involving the Lifelong Kindergarten Group on the MIT Media Lab, with financial support within the National Science Foundation, Microsoft, Intel Foundation, Mac Arthur Foundation, Google, Iomega and MIT Media Lab research consortia. It truly is used worldwide in schools, colleges, museums,mac makeup, community centers and homes. It is usually intended specially for people from age range 6-16 but people spanning various ages have used it.聽For example, a small kid will use it for entertainment purposes while a grown up will use it for completing any school or college project. The appearance of scratch is simple to make certain that you are able to easily learn and make stuff wedding party drag and drop functionality. There isn't a code to publish for any what to become. A computer owner interface to your Scratch development environment divides the screen into several panes: in the left could be the blocks palette, in the centre the present sprite information and scripts area, and also on the suitable takes place and sprite list. The blocks palette has code fragments (called "blocks") which is dragged to the scripts area for making programs. App Inventor AppInventor is brought to life by Google for creating applications for Android operating system.Its quite similar to "Scratch" simply because it also uses the idea of drag and drop and connecting blocks for developing a questionaire work. This application is focused at those who find themselves unfamiliar with program language. Depending on Google, "A sixth grade student may possibly build Android apps with the AppInventor."聽The applications developed from app inventor could very well be tested for an emulator or even a phone. If all goes well, we can package the app into the phone and employ it. Basic Functionalities The AppInventor involves basic two components: The Design View It has lots of the components one will want to design a loan application. The Block Editor View It works with actual function on combining blocks to execute a loan application. Setting up the AppIventor Pre-requisites for implementing an AppInventor One have to be aquiring a Gmail account. Steps for configuring AppIventor Download the setup through the following site聽AppInventorSetup. Then Install the AppInventor setup. This is needed to connect and run the applications over a emulator or on the phone. Once you have installed the setup into your PC, you are on you technique to start building apps viaAppInventor. Steps concerning how to start AppInventor Go to your following site of聽AppInventor. Enter your Gmail credentials. Just click "MyProjects". Here anyone online can see our existing projects there is created before or you can easliy make your new project. Click on New->And required name of the project (for e.g.:Test). This will open the design and style View of the聽AppInventor. Design View The planning view incorporates a different list of components, each deals with back yard garden methods, actions and events. In line with the user's requirement, he will work with the different components for building the job. These elements have in the user from Google they can not modify or personalize it dependant upon their requirements. Following are set of two component utilised in the style View: Basic components Media components Animation components Social components Sensors components Screen Arrangement components Other components Basic Components The normal components provides basic functionality for building the applying. It offers the below components: Button Canvas CheckBox Clock Image ListPicker PasswordTextBox Screen TextBox TinyDB It's possible to use any of the components dependant on his/her requirements. Media Components The media components shows the functionality related to media like voice,nfl store, image and video.It contains these components: Camera ImagePicker Player Sound VideoPlayer Animation Components The animation components provides each functionality linked to animation from the applications. It contains this particular components: Ball ImageSprite Social Components The social components offer the functionality to add in the social networking things for your application. Will help you to get the social traffic feel in your own apps. It includes the below components: Contact Picker Email Picker Text message PhoneNumber Picker Texting Twitter Sensors Components The sensors components provides each functionality of tracking of location, having access to accelerometer in gaming, etc. It contains the examples below components: Accelerometer Sensor Location Sensor Orientation Sensor Screen Arrangement Components The screen arrangement components is advantageous in arranging and changing the screen of some application as reported by the user's requirement. It provides these components: Horizontal Arrangement Vertical Arrangement Table Arrangement Other Components Moving forward components, there several other components which are often used for special purposes across various applications. It offers the examples below components: Activity Starter Barcode Scanner Bluetooth Client Bluetooth Server Notifier Speech Recognizer Text-to-speech Tiny WebDB Web Block Editor View This view defines multiple couple of blocks and this can be helpful to make our application perform different number of operations determined by user requirements.聽Each part of Design View features its own list of blocks which often can be聽used decide on the behavior of a element of to work with in your application.These blocks are helpful in building the approval the path we end up needing. It describes the behaviour with the application.聽The behaviour in the application is decided in line with different聽ways the blocks are connected.聽This in such a way is as block programming. So also a who doesn't know programming that well are able to access the blocks and connect blocks with one another to earn the applying run. Except for it,聽Appinventor聽provides some standard set of blocks the following: Definition blocks These blocks are employed to define some variable without notice for making examples of the procedural calls, etc. Text blocks These blocks widely-used to perform different group of operations relating to text like compare,mlb shop, split, convert to uppercase or lowercase, etc. List Blocks These blocks widely-used to perform list operations like making a list, getting a list item, inserting straight into a list, deletion on a list, etc. Math Blocks These blocks allow us perform all operations relating to math. Logic Blocks These blocks are accustomed to perform logical operations like and rather than. Control Blocks These blocks are accustomed to perform operations like聽if-else, condition,聽foreach, range,mac makeup wholesale, etc. Color Blocks These blocks are widely used to perform color operations like changing color, defining new color towards a component, etc. Each component inside the design view does have its set. CaseStudy Setting up a Simple Twitter Client Using Google AppInventor One can build many applications in accordance with their requirements. Here we are intending to make a simple twitter client. Through this twitter application, each application is associated to a single person only for the reason that credentials were mapped throughout the applications. As we know, we've two basic components for building any application in聽AppInventor. First at all, we are going to look into the design view: Steps for designing the design and style View of Twitter Client We have a聽"Login" Button that may enable us to login towards the application. Only then do we have label name "Label1" having message "Not Logged in?". This label allows you to identify a computer owner whether as well as successfully logged in you aren't. On successful authentication, what it's all about in label will changed to "Logged in". Then we have a聽TextBox聽called "tweetMsgBox". Here you will write his/her Tweets. A聽Button聽named "tweetButton" is used because a user is completed writing his/her tweet and wishes to post it. The "tweetLogout"聽Button聽is designed to logout from the application. Also you'll find non-visible component called "Twitter" which helps us to perform all operations based on Twitter. Authentication Mechanism in Twitter The Twitter component included in the AppInventor does not have any block for accepting account information in order that it can authorize you.. As Twitter uses OAuth mechanism for authentication, we should authorize and give the means to access our application then it access the twitter functionalities.. For additional information on OAuth, refer to聽https://dev.twitter.com/docs/auth/. So basically a Twitter component would require a "Consumer Key" and "Consumer secret" for those authentication mechanism. As we have the consumer key and consumer secret, it may authenticate you. Steps for getting Consumer Key and Consumer Secret Go the site聽http://dev.twitter.com/. Login utilizing your twitter credentials. You're now logged in, you should have fill in the required details after that you are going to be owning your consumer key and consumer secret. When you login with all your twitter client with all the consumer key and consumer secret, it'll ask the permission to authorize the application form. It will ask for the twitter username and password. If you authorize, then you're post your tweets. Now you can look the Block Editor View: Steps for Designing the Block Editor View First of most, we need to authorize the twitter client (i.e., ought to login). And much more the LoginButton click, came across call the block "Twitter.Authorize". This block uses the OAuth Authentication mechanism used the patron key and consumer secret defined while in the Twitter element of Design View to authenticate your client. Initially, we set the visibility of聽tweetMsgBox,聽tweetButton聽and聽tweetLogout聽Button as fasle. On successful login, we'll set the visibility of login button as聽false聽and the visibility of oftweetMsgBox,聽tweetButton聽and聽tweetLogout聽Button as聽true. User can write any tweet in the聽tweetMsgBox聽and post it by clicking the聽tweetButton. Following a user is conducted using its tweeting, he'll logout belonging to the system using logout button which calls theTwitter.DeAuthorize聽block as well as sets the visibility of the聽tweetMsgBox,聽tweetButton聽andtweetLogout Button聽as聽false. It then returns within the main login page again. Conclusion Through RAD tools like Google App Inventor, anybody can easily build an Android application in the fast way. The moment the depend on for creating a simple application could there really be if App Inventor has all components you'll it, you can easliy do it. Since latest, GoogleApp Inventor has been free by Google Labs that's taken on by MIT now. Which means this can function within the MIT Labs.

没有评论:

发表评论