16
+ Misc Advanced AppInventor Concepts

Misc Advanced AppInventor Concepts

Embed Size (px)

DESCRIPTION

Misc Advanced AppInventor Concepts. Using Multiple Screens in Apps. You can have more than one screen in your app and move back and forth Lets watch a very concise video to learn how to use this http://www.youtube.com/watch?v=9DaT_XTvpGY&feature= related Want to try it? - PowerPoint PPT Presentation

Citation preview

Page 1: Misc  Advanced  AppInventor  Concepts

+

Misc Advanced AppInventor Concepts

Page 2: Misc  Advanced  AppInventor  Concepts

+Using Multiple Screens in Apps

You can have more than one screen in your app and move back and forth

Lets watch a very concise video to learn how to use this

http://www.youtube.com/watch?v=9DaT_XTvpGY&feature=related

Want to try it?

Create an app for yourself as an instructor Main page –name, place for picture, title, etc Contact me – phone, mailing address, office number, email About me – brief bio statement You could add others like class schedule, interests etc.

Page 3: Misc  Advanced  AppInventor  Concepts

+Saving and Sharing

To share, backup or otherwise transfer source code you will download a .zip file

To share a runnable app you will download an .apk file

How do I do each of these???

Let’s investigate

Can I use QR codes to distribute? http://qrcode.kaywa.com/ Get a scanner in the Marketplace

Page 4: Misc  Advanced  AppInventor  Concepts

+Want to distribute your app?

Local distribution Download Setup QR code Email Put on website

Preparing to Publish to marketplaces Android Market / Google Play AndroidPit Amazon http://www.howtogeek.com/?post_type=post&p=106175 http://danatheteacher.hubpages.com/hub/Top-Android-Market

-Alternative-App-Stores

Page 6: Misc  Advanced  AppInventor  Concepts

+Building your own Web Databases and APIs

Hosting a web database

Creating AppInventor compliant APIs

Google App Engine https://developers.google.com/appengine/

http://appinventorapi.com/

Page 7: Misc  Advanced  AppInventor  Concepts

+Other Resources

Look at file on Wiki

Other examples on Wiki

Page 8: Misc  Advanced  AppInventor  Concepts

+Build your own app

By yourself or with a partner Define an idea for an app Set goals Identify the steps needed Identify the components needed to accomplish the steps Design the GUI Build the blocks Test it Define and try some extensions

Page 9: Misc  Advanced  AppInventor  Concepts

+Java and bridging

The is an official bridge to Java SDK and at least one “enhanced” third party one

The essential concept in both cases is Provide AppInventor widgets as Java classes to reduce our

coding workload Make it easier to transition from the AppInventor

environment to true and full-blown Java development

You will need to install and setup Eclipse, the Android SDK, Bridge SDK and some Android Version files in order to do any kind of development using Java See setup instructions

Page 11: Misc  Advanced  AppInventor  Concepts

+AIBridge – the 3rd party

Start with this one first

Project home Page http://code.google.com/p/apptomarket/

An Intro http://code.google.com/p/apptomarket/wiki/sdkBridgerIntro

SDK Docs http://www.3nportal.com/BridgeAPI/

An Example http://code.google.com/p/apptomarket/downloads/detail?na

me=PaintPot.zip

Page 13: Misc  Advanced  AppInventor  Concepts

+Some Examples

See the handout

Translations of some of the tutorial apps http://code.google.com/p/appinventor-java-translation/down

loads/list

Page 14: Misc  Advanced  AppInventor  Concepts

+ package com.Android.hellopurr;import com.google.devtools.simple.runtime.components.HandlesEventDispatching;

import com.google.devtools.simple.runtime.components.android.AccelerometerSensor;import com.google.devtools.simple.runtime.components.android.Button;import com.google.devtools.simple.runtime.components.android.Form;import com.google.devtools.simple.runtime.components.android.Sound;

import com.google.devtools.simple.runtime.events.EventDispatcher;

/** * HelloPurr example from David Wolber's book. * * @author Joshua Swank */public class HelloPurr extends Form implements HandlesEventDispatching{

public Button btnButton1;private Sound sndSound1;private AccelerometerSensor asnAccelerometerSensor1;

void $define(){

btnButton1 = new Button(this);btnButton1.Text("");btnButton1.Image("kitty.png");

sndSound1 = new Sound(this);sndSound1.Source("meow.mp3");

asnAccelerometerSensor1 = new AccelerometerSensor( this );

EventDispatcher.registerEventForDelegation( this, "HelloPurr", "Click" );EventDispatcher.registerEventForDelegation( this, "HelloPurr", "Shaking" );

}

Page 15: Misc  Advanced  AppInventor  Concepts

+

public void dispatchEvent( Object component, String id, String eventName, Object[] args ){

if( component.equals( btnButton1 ) && eventName.equals( "Click" ) )btnButton1_Click();

else if( component.equals( asnAccelerometerSensor1 ) && eventName.equals( "Shaking" ) )asnAccelerometerSensor1_Shaking();

}

private void btnButton1_Click(){

sndSound1.Play();sndSound1.Vibrate( 500 );

}

private void asnAccelerometerSensor1_Shaking(){

sndSound1.Play();}

}

Page 16: Misc  Advanced  AppInventor  Concepts

+Going RAW!

Doing it All in Java!

Tutorials here http://developer.android.com/training/index.html

A video series including setup http://www.youtube.com/watch?v=exFmZ8AkYfQ&feature=

relmfu