1 mobile computing mobile first (formerly worklight) copyright 2015 by janson industries

62
1 Mobile Computing Mobile First (formerly Worklight) right 2015 by Janson Industries

Upload: bernadette-allen

Post on 19-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

1

Mobile Computing

Mobile First(formerly Worklight)

Copyright 2015 by Janson Industries

Copyright 2015 by Janson Industries2

Objectives▀ Explain how to download and

install

Eclipse and the Android plugin

MobileFirst Platform Studio

Copyright 2015 by Janson Industries3

Get Eclipse from: http://www.eclipse.org/

Click to start download process

Copyright 2015 by Janson Industries4

Scroll down a little and for FSCJ machines select 32 bit

Copyright 2015 by Janson Industries5

Scroll down and click

Copyright 2015 by Janson Industries6

Specify where to save then click Save

Copyright 2015 by Janson Industries7

Right click the file, select Extract All, then click Extract button

Copyright 2015 by Janson Industries8

Drill into folder, then into eclipse folder, double click eclipse.exe then click Run

button

Copyright 2015 by Janson Industries9

Specify a workspace

Copyright 2015 by Janson Industries10

Get standalone Android SDK ADT Bundle from:

http://developer.android.com/sdk/index.html

Click to download

Copyright 2015 by Janson Industries11

Scroll down, agree to Terms, select 32 bit

Save to MobileFirst folder

Copyright 2015 by Janson Industries12

Double click to start installing the sdk

You should have a file calledInstaller_rxx.x.x-windows.exe

Copyright 2015 by Janson Industries13

Click Next

Copyright 2015 by Janson Industries14

It should find the JDK, click Next

Copyright 2015 by Janson Industries15

Make your choice, click Next

Copyright 2015 by Janson Industries16

Specify where to install and make note of location – will have to specify later

Copyright 2015 by Janson Industries17

Specify Start menu folder name

Copyright 2015 by Janson Industries18

Next

Copyright 2015 by Janson Industries19

Finish

Copyright 2015 by Janson Industries20

Select some versions and Extras, click Install

Copyright 2015 by Janson Industries21

Accept license, click Install

Copyright 2015 by Janson Industries22

Installing ADT▀ When finished

Close the SDK manager

▀ Need to install the ADT (Android Development Tools) plug in

Close the Welcome pane

Click Help then Install New Software

Click Add

Copyright 2015 by Janson Industries23

Specify https://dl-ssl.google.com/android/eclipse/

Copyright 2015 by Janson Industries24

Select Developer Tools and click Next

Copyright 2015 by Janson Industries25

Click Next

Copyright 2015 by Janson Industries26

Accept license then click FinishRestart Eclipse

Copyright 2015 by Janson Industries27

Android Set Up▀ When prompted, restart, After Eclipse

restarted, click Window, then Android SDK Manager

If the Android SDK Manager / AVD Manager is not visible in the Window menu, click

►Window►Customize Perspective►Command Groups Availability►Select the Android SDK and AVD

Manager check boxes.

Copyright 2015 by Janson Industries28

Click OK

Copyright 2015 by Janson Industries29

If you get this, click Yes

Copyright 2015 by Janson Industries30

Close the Welcome window then click Help and Eclipse Marketplace

Copyright 2015 by Janson Industries31

Type MobileFirst then click Go

Copyright 2015 by Janson Industries32

Click Install for MobileFirst Studio

Copyright 2015 by Janson Industries33

Click Confirm

Copyright 2015 by Janson Industries34

Accept the license and click Finish then Restart eclipse

Copyright 2015 by Janson Industries35

Click MobileFirst menu drop down arrow and select MobileFirst Project

Copyright 2015 by Janson Industries36

Specify project name

Copyright 2015 by Janson Industries37

Specify app name, click Finish and click Yes to the switch to the Design

perspective prompt

Copyright 2015 by Janson Industries38

MobileFirst creates default Hello appUses JavaScript, html, xml

Copyright 2015 by Janson Industries39

We'll make text change, insert image & Save

(Have to make text change in source not design & import the image into image

folder)

Copyright 2015 by Janson Industries40

Generate native environments: click MF drop down arrow, then MobileFirst

Environment

Specify Proj & App name and

environment(s) (i.e. Android, iPad, etc.)

Copyright 2015 by Janson Industries41

A new folder will be added for each environment in the application folder in

Apps

Also, a native Android project generated

Copyright 2015 by Janson Industries42

How Does It Work▀ MF builds the app with javascript and

html A lot of other tools, phonegap for

example, do it this way also

▀ When a native env generated

MF creates needed native pieces

Keeps as much of MF resources as possible

► In android, html and js still used with a minimum of java code

Copyright 2015 by Janson Industries43

This is the apps java code

Copyright 2015 by Janson Industries44

How Does It Work In Android▀ MF builds the required Java activity

(HowdyMF)

▀ Uses an object called WL to get html page and superclass loads it

▀ Can now run the Android version of app in emulator or on an Android device

Copyright 2015 by Janson Industries45

Right click Android project, Run As, Android Application

Copyright 2015 by Janson Industries46

Voila

Copyright 2015 by Janson Industries47

To add GUI components, when creating the project/app, Configure JavaScript

Libraries

Copyright 2015 by Janson Industries48

There are 3 options for defining GUI. jQuery looked like the easiest (and is

very popular)

Copyright 2015 by Janson Industries49

Need to download jQuery from: http://jquerymobile.com/download/

Copyright 2015 by Janson Industries50

Download the zip file

Copyright 2015 by Janson Industries51

Then specify the zip file location…

… select all the resources and click Finish

Copyright 2015 by Janson Industries52

Click Finish again

Copyright 2015 by Janson Industries53

Now you can drag and drop HTML GUI components/tags

Copyright 2015 by Janson Industries54

GUI▀ To get the components to work

have to:

Add html/javascript(s) to the web page

Tie to the component(s)

Copyright 2015 by Janson Industries55

Generated page pretty simple

Copyright 2015 by Janson Industries56

Changed text and added a link to a dialog box

Copyright 2015 by Janson Industries57

Generate the Android version

Copyright 2015 by Janson Industries58

Run the generated Android project

Copyright 2015 by Janson Industries59

Click the link

Copyright 2015 by Janson Industries60

Could use some better formatting

Copyright 2015 by Janson Industries61

Advs and Disadvs▀ Advs

Faster app development for multiple platforms

Single set of skills (js, html, css) rather then many skill sets (java/xml, objective-c, c#) one for each platform

Copyright 2015 by Janson Industries62

Advs and Disadvs▀ Disadvs

Apps not as efficient as ones written in native languages

Can't take advantage of unique aspects of a particular platform