2011年12月29日星期四

Google App Inventor 8

Introduction Scratch Scratch may be a programming language in order to us to form our very own stories, animations, games, etc. who you can share using the web. Scratch is put together by the Lifelong Kindergarten Group around the MIT Media Lab, with financial support out of your National Science Foundation, Microsoft, Intel Foundation,mac makeup, Mac Arthur Foundation, Google, Iomega and MIT Media Lab research consortia. It is used worldwide in schools, colleges, museums, community centers and homes. It really is intended specially for the people from grow older 6-16 but people in various age groups have bought it.聽For example, a smallish kid is able to use it for entertainment purposes while a evolved will use it for completing any school or college project. The appearance of scratch really is easy to ensure you easily learn schedule stuff by simply drag and drop functionality. There is not any code to create for every ways to be generated. A person interface with the Scratch development environment divides the screen into several panes: for the left could be the blocks palette, in between the existing sprite information and scripts area, greater than the feeling the precise takes place and sprite list. The blocks palette has code fragments (called "blocks") which can be dragged into the scripts area in making programs. App Inventor AppInventor is having to do with Google for creating applications for Android operating system.Its quite akin to "Scratch" because also uses the era of the drag and drop and connecting blocks to create software package work. This application is directed at folks that are unaware of program language. In line with Google, "A sixth grade student may build Android apps when using the AppInventor."聽The applications developed from app inventor might be tested during an emulator or perhaps a phone. If all goes well, we'll package the app on the phone and employ it. Basic Functionalities The AppInventor involves basic two components: The Design View It has many of the components you'll should design a credit card applicatoin. The Block Editor View It manages actual function on combining blocks to execute a credit application. Setting in the AppIventor Pre-requisites for organising an AppInventor One has to be which has a Gmail account. Steps for planning AppIventor Download the setup from the following site聽AppInventorSetup. Then Install the AppInventor setup. It is wanted to connect and run the applications at a emulator or about the phone. When you have installed the setup to the PC, happen to be on you route to begin to build apps viaAppInventor. Steps the way to start AppInventor Go with the following site of聽AppInventor. Enter your Gmail credentials. Simply click "MyProjects". Here one can see our existing projects we have got created before or you can easily create your new project. Click on New->And provide name within the project (for e.g.:Test). This will open the Design View of the聽AppInventor. Design View The planning view contains a different range of components, each one teaches on back yard garden methods,mlb shop, actions and events. As per the user's requirement, he will make use of the different components for building the application form. These factors are made in the user from Google they can not modify or customize it influenced by their requirements. Following are lot of component used for the theory View: Basic components Media components Animation components Social components Sensors components Screen Arrangement components Other components Basic Components The normal components shows the basic functionality for building the application. It provides the subsequent components: Button Canvas CheckBox Clock Image ListPicker PasswordTextBox Screen TextBox TinyDB One could use several components dependant upon his/her requirements. Media Components The media components provides functionality connected with media like voice, image and video.It includes these components: Camera ImagePicker Player Sound VideoPlayer Animation Components The animation components provides the functionality relevant to animation from the applications. It provides the next few components: Ball ImageSprite Social Components The social components give you the functionality to feature the social networking things within the application. It assists to bring the social network sites feel in your own apps. It includes these components: Contact Picker Email Picker Mobile call PhoneNumber Picker Texting Twitter Sensors Components The sensors components provides each functionality of tracking of location, having access to accelerometer in gaming, etc. It includes the subsequent components: Accelerometer Sensor Location Sensor Orientation Sensor Screen Arrangement Components The screen arrangement components pays to in arranging and changing the screen associated with the application good user's requirement. It contains the subsequent components: Horizontal Arrangement Vertical Arrangement Table Arrangement Other Components Moving forward components, there various other components which are often employed for special purposes across various applications. It contains 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 set of blocks and this can be used to make our application perform different number of operations in accordance with user requirements.聽Each element of Design View have their own number of blocks which commonly be聽used to make the decision the behavior of their element of use it inside application.These blocks are helpful in building the applying the way we'd like. It describes the behaviour on the application.聽The behaviour for the application is established determined by different聽ways the blocks are connected.聽This so known as as block programming. So a good person who does not know programming that well will see the blocks and fasten blocks amongst each other to make the application run. In addition to the it,聽Appinventor聽provides some standard range of blocks the following: Definition blocks These blocks are employed to define some variable anytime to make a portion of the procedural calls, etc. Text blocks These blocks widely-used to perform different variety of operations regarding text like compare, split, come to be uppercase or lowercase, etc. List Blocks These blocks are widely-used to perform list operations like generating a list,mac makeup wholesale, getting a list item, inserting suitable list, deletion in a list, etc. Math Blocks These blocks allow us perform all operations to do with math. Logic Blocks These blocks utilized perform logical operations like and or not. Control Blocks These blocks are used to perform operations like聽if-else,nfl store, condition,聽foreach, range, etc. Color Blocks These blocks are employed to perform color operations like changing color, defining new color to some component, etc. Each component in the design view has some set. CaseStudy Developing a Simple Twitter Client Using Google AppInventor One can build many applications based on their requirements. Here we are preparing to set up a simple twitter client. Through this twitter application, each application is associated to one person only as being the credentials have probably always been mapped on the applications. To be sure, we now have two basic components for building any application in聽AppInventor. First of all, we're going go into the design view: Steps for designing design and style Look at Twitter Client We have a聽"Login" Button that can enable us to login straight into the application. You have to have label name "Label1" having message "Not Logged in?". This label helps you to identify the operator whether he's got successfully logged in or otherwise. On successful authentication, the content in label will changed to "Logged in". You have to have a聽TextBox聽called "tweetMsgBox". Here the individual will write his/her Tweets. A聽Button聽named "tweetButton" used every time a user is accomplished writing his/her tweet and wants to post it. The "tweetLogout"聽Button聽is familiar with logout in the application. Also we've non-visible component called "Twitter" which helps us to undertake all operations in connection with Twitter. Authentication Mechanism in Twitter The Twitter component utilized in the AppInventor doesn't have any block for accepting details so that it can authorize the client.. As Twitter uses OAuth mechanism for authentication, we have to authorize and provides use of our application so that it access the twitter functionalities.. For additional information on OAuth, refer to聽https://dev.twitter.com/docs/auth/. Basically a Twitter component is going to take a "Consumer Key" and "Consumer secret" for the authentication mechanism. After we get the consumer key and consumer secret, it is going to authenticate your customer. Steps for finding Consumer Key and Consumer Secret Go the site聽http://dev.twitter.com/. Login in your twitter credentials. If you are logged in, you will need fill the required details you then is going to be having your consumer key and consumer secret. So when you login together with your twitter client while using consumer key and consumer secret, it will ask the permission to authorize the coating. It will also call for the twitter account information. While you authorize, after backing up post your tweets. Now you can easlily look the Block Editor View: Steps for Designing the Block Editor View First off, we have to authorize the twitter client (i.e., really need to login). Such the LoginButton click, we need to call the block "Twitter.Authorize". This block uses the OAuth Authentication mechanism used the consumer key and consumer secret defined around the Twitter component to Design View to authenticate the consumer. Initially, we set the visibility of聽tweetMsgBox,聽tweetButton聽and聽tweetLogout聽Button as fasle. On successful login, we're going to 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. Once the user is completed with its tweeting, the nurse can logout of your system using logout button which calls theTwitter.DeAuthorize聽block and in addition sets the visibility of the聽tweetMsgBox,聽tweetButton聽andtweetLogout Button聽as聽false. After that it returns to the main login page again. Conclusion Through RAD tools like Google App Inventor, one could easily build an Android application with a fast way. Once the depend on for building a simple application will there be and whenever App Inventor has all components required for it, we are able to do it. Adjusted latest, GoogleApp Inventor has been produced open source by Google Labs which happens to be taken on by MIT now. This will function underneath the MIT Labs.

没有评论:

发表评论