27
MobAppDev Sketchy Impressions of Fall 2013 AnDevCon Vladimir Kulyukin www.vkedco.blogspot.com www.vkedco.blogspot.com

MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Embed Size (px)

Citation preview

Page 1: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

MobAppDev

Sketchy Impressions of Fall 2013 AnDevCon

Vladimir Kulyukin

www.vkedco.blogspot.comwww.vkedco.blogspot.com

Page 2: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Background

● Fall 2013 AnDevCon was held in San Francisco, CA, in 11/12/2013 - 11/15/2013

● There were many interesting & fascinating workshops, seminars, and discussions

● This presentation summarizes my rather sketchy impressions (it is impossible to attend all talks) of the conference and gives you some R&D pointers for the future

Page 3: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Outline

● Eclipse IDE vs. Android Studio● Augmented Reality (AR)● Android & Wearable/Mobile Computing● Android & Cloud Computing● Android & .NET

Page 4: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Eclipse IDE vs. Android Studio

Page 5: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

New Android IDE

● Eclipse has been a de-facto standard for Android development

● JetBrains has offered an alternative IntelliJ IDEA ● Google I/O 2013 has introduced a new Android

IDE called Android Studio ● Android Studio is based on the free community

edition of IntelliJ IDEA

Page 6: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Should I Switch?● If you have a big Android project or a tight delivery deadline, I

would stay with Eclipse IDE● Eclipse IDE has a large code, documentation, and tutorial base● Projects demonstrated/developed at AnDevCon with Android

Studio were pretty basic, which is to be expected for a new IDE● Android Studio is something to put on your watch list and play

with as time permits● Do not pay much attention to “it's a giant leap forward!”

mantras, just watch the support base

Page 7: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Augmented Reality

Page 8: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

What is AR?

Augmented reality (AR) is a live, direct or indirect, view of a physical, real-world environment whose elements are augmented (or supplemented) by computer-generated sensory input such as sound, video, graphics or GPS data. It is related to a more general concept called mediated reality, in which a view of reality is modified (possibly even diminished rather than augmented) by a computer.

source: http://en.wikipedia.org/wiki/Augmented_reality

Page 9: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

What Does AR Do?● AR aligns real objects with virtual objects● AR Examples:

Display free office information when an office building is recognized

Display bus route information when a bus stop sign and its number is recognized

Play an audio file about a building when a GPS fix places you next to that building

● AR applications must run in real time to be useful

Page 10: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

AR Application Domains

● Navigation● Education● Tourism● Medicine● Gaming

Page 11: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

AR with Rajawali

Go to this github url on how to download Rajawali

Page 12: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Problem

Build an application that rotates a sphere horizontally and/or vertically and mounts on that sphere different textures.

Page 13: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Coding Steps

● Set up an Android application project in Eclipse IDE

● Include the Rajawali jar library● Extend the main activity from RajawaliActivity● Extend a render class from

rajawali.render.RajawaliRenderer● Code up your logic in the renderer class● Add to the main activity class the render class as a

member

Page 14: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Main Activitypublic class RajawaliSphere_Activity extends RajawaliActivity {

private RajawaliSphere_Renderer mRenderer;

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

this.mRenderer = new RajawaliSphere_Renderer(this);

this.mRenderer.setSurfaceView(mSurfaceView);

super.setRenderer(mRenderer);

}

}

source code is in RajawaliSphere_Activity.java

Page 15: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Rendererenum ROTATION { VERTICAL, HORIZONTAL }

public class RajawaliSphere_Renderer extends rajawali.renderer.RajawaliRenderer

{

DirectionalLight mLight;

Object3D mSphere;

Context mContext = null;

Camera mCamera = null;

ROTATION mRot = ROTATION.VERTICAL;

int mRotSpeed = 1;

}

source code is in RajawaliSphere_Renderer.java

Page 16: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Rendererpublic void initScene() {

mLight = new DirectionalLight(1f, 0.2f, -1.0f);

mLight.setColor(1.0f, 1.0f, 1.0f);

mLight.setPower(2);

try {

Material material = new Material(); setRotHorizontal();

material.addTexture(new Texture("bhagavatgita", R.drawable.bhagavatgita_v1_large));

material.setColorInfluence(0);

mSphere = new Sphere(1, 20, 20);

mSphere.setMaterial(material);

getCurrentScene().addLight(mLight);

super.addChild(mSphere);

} catch (TextureException e) { e.printStackTrace(); }

getCurrentCamera().setZ(4.2f);

}

source code is in RajawaliSphere_Renderer.java

Page 17: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Rajawali Examples Demo

Page 18: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Android & Mobile/Wearable Computing

Page 19: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Mobile Sensors

● Accelerometer● Magnetometer ● Gyroscope● Pressure● Light● Gesture● GPS● Wi-Fi● Camera

Page 20: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Context

● The concept of context is becoming increasingly more sophisticated

● Context has been used to monitor activities: how many calories have been consumed or how many steps have been taken

● Context is and will increasingly be used for event detection, data analysis, and pattern detection

Page 21: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

COM.GOOGLE.ANDROID.GMS.LOCATION

● This package contains the Google Activity Recognition SDK

● It has classes such as ActivityRecognitionClient, ActivityRecognitionResult, DetectedActivity, etc.

● DetectedActivity can have values such as IN_VEHICLE, ON_FOOT, ON_BICYLE, etc

Page 22: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Android & Cloud Computing

Page 23: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Android OS as a Server OS

● Over 60% of the server market is Linux/Unix/FreeBSD

● Android OS is a flavor of Linux● Linux is used on servers● Hence, Android OS can be used on servers● It is far easier to find Android developers than

Linux developers

Page 24: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Android OS as on the Cloud

● There is a massive server migration to the cloud

● A lot of cloud services are supported by Linux

● Since Android OS is Linux, it can support cloud computing

Page 25: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

Android & .NET

Page 26: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

What is Mono?

● Open source implementation of .NET● Xamarin.Android is an Android IDE for .NET● The developer can use C# and Windows

Ecosystem● No cost of learning Eclipse and/or Java

Page 27: MobAppDev (Fall 2013): Sketchy Impressions of Fall 2013 AnDevCon

References

● J. Wilson. Understanding Android Studio and the Android Developer Toolset. AnDevCon. Nov. 2013, San Francisco, CA

● R. Sanderson. Sensors and Context-Awareness in a Mobile Device. AnDevCon. Nov. 2013, San Francisco, CA

● D. Ippel. Augmented Reality + 3D The Easy Way. AnDevCon. Nov. 2013, San Francisco, CA

● R. Munitz. Building Android for the Cloud: Android as a Server. AnDevCon. Nov. 2013, San Francisco, CA

● J. McClure. What is Xamarin.Android? AnDevCon, Nov. 2013, San Francisco, CA