Taking Advantage of Webtop
-
Upload
motorola-mobility-motodev -
Category
Technology
-
view
1.397 -
download
0
description
Transcript of Taking Advantage of Webtop
MOTOROLA Stylized M Motorola Trademark Holdings, LLC. .. © 2011 Motorola Mobility, Inc. All rights reserved.
Peter van der LindenAndroid
Motorola Mobility
WebtopHTML5
2MOTODEV
© 2011 Motorola Mobility, Inc.
1
2
3 Webtop
4 HTML5
3MOTODEV
© 2011 Motorola Mobility, Inc.
• Motorola ATRIX 4G MB860
• “ ” 11mm
• 4.0" , qHD(540 x 960),240 dpi, 24
• 1GHz NVIDIA Tegra 2
• Android 2.2.1(Froyo)
• 1930 mAh
4MOTODEV
© 2011 Motorola Mobility, Inc.
RAM/ROM
• 1 GB RAM
• 2 GB
• 10.7 GB
• 32 GB SDHC
5MOTODEV
© 2011 Motorola Mobility, Inc.
• W-CDMA 850/1900/2100• GSM 850/900/1800/1900• HSDPA 14Mbps( 10)• Wi-Fi, Bluetooth…
6MOTODEV
© 2011 Motorola Mobility, Inc.
•o : 5 , , LED o : VGA(640x480)
•o 720p HD, 30fpso HDMI
7MOTODEV
© 2011 Motorola Mobility, Inc.
•• ( )•••
o
o API
8MOTODEV
© 2011 Motorola Mobility, Inc.
• Android WebKit
• Adobe® Flash®
• webtopo File Manager( )
• Entertainment Center( )
9MOTODEV
© 2011 Motorola Mobility, Inc.
:
• , 2.4 lbs• 11.6" • , • USB 2 , ATRIX••
o ATRIX
10MOTODEV
© 2011 Motorola Mobility, Inc.
: HD
• USB HDMI • HD HD TV•
o USB o USB
•
11MOTODEV
© 2011 Motorola Mobility, Inc.
ATRIX
• SDK o http://developer.motorola.com/docstools/tools/
• Webtopo http://developer.motorola.com/docstools/library/
•o http://developer.motorola.com/products/atrix-mb860/
MOTOROLA Stylized M Motorola Trademark Holdings, LLC. .. © 2011 Motorola Mobility, Inc. All rights reserved.
MOTOROLA Stylized M Motorola Trademark Holdings, LLC. . . © 2011 Motorola Mobility, Inc. All rights reserved.
13MOTODEV
© 2011 Motorola Mobility, Inc.
API
•
• Motorola API(FFC Motorola )
• 2.2(Froyo)
• 2.3(Gingerbread)o Gingerbread Google API
Froyo
14MOTODEV
© 2011 Motorola Mobility, Inc..
• com.motorola.hardware.frontcamera.FrontCamera lib
• : static Camera getFrontCamera();
• Android Camera .
• !
API
15MOTODEV
© 2011 Motorola Mobility, Inc.
API
import com.motorola.hardware.frontcamera.FrontCamera;import android.hardware.Camera;
Camera frontCam = FrontCamera.getFrontCamera();// frontCam// ...
frontCam.release(); //
16MOTODEV
© 2011 Motorola Mobility, Inc.
<uses-library android:name="com.motorola.hardware.frontcamera"/><uses-feature android:name="android.hardware.camera"/><uses-permission android:name="android.permission.CAMERA"/>
17MOTODEV
© 2011 Motorola Mobility, Inc.
•
• ATRIX SDK jar o ffc_api_stub.jar
• jar “Motorola Front-Facing Camera API(Motorola API)”
o http://developer.motorola.com/docstools/library/motorola-front-facing-camera-api/
MOTOROLA Stylized M Motorola Trademark Holdings, LLC. .. © 2011 Motorola Mobility, Inc. All rights reserved.
MOTOROLA Stylized M Motorola Trademark Holdings, LLC. . . © 2011 Motorola Mobility, Inc. All rights reserved.
19MOTODEV
© 2011 Motorola Mobility, Inc.
Motorola API
•
• (Reflection)API .
20MOTODEV
© 2011 Motorola Mobility, Inc.
(Reflection) –
<uses-library android:name="com.motorola.hardware.frontcamera”android:required="false" />
21MOTODEV
© 2011 Motorola Mobility, Inc.
(Reflection) –
private static class ConditionalFrontCamera {public static Camera getFrontCamera(){
try {Method fcMethod = Class.forName(
"com.motorola.hardware.frontcamera.FrontCamera").getDeclaredMethod("getFrontCamera",
(Class[])null);
if (fcMethod==null) return null;return (Camera) fcMethod.invoke(
(Object[])null, (Object[])null);
} catch (Exception ex){return null;
}}
}
22MOTODEV
© 2011 Motorola Mobility, Inc.
(Reflection) -
Camera frontCam = ConditionalFrontCamera.getFrontCamera();
if(frontCam != null) {//
} else {//
}
MOTOROLA Stylized M Motorola Trademark Holdings, LLC. .. © 2011 Motorola Mobility, Inc. All rights reserved.
Tegra 2
MOTOROLA Stylized M Motorola Trademark Holdings, LLC. . . © 2011 Motorola Mobility, Inc. All rights reserved.
24MOTODEV
© 2011 Motorola Mobility, Inc.
PC
CPU
GPU RAM
PCI USBSATA
25MOTODEV
© 2011 Motorola Mobility, Inc.
Tegra 2 –
• - -o , , CPU GPU
• ARM 7 CPUo 1 GHzo
–
–
o ...
MOTOROLA Stylized M Motorola Trademark Holdings, LLC. .. © 2011 Motorola Mobility, Inc. All rights reserved.
Webtop
MOTOROLA Stylized M Motorola Trademark Holdings, LLC. . . © 2011 Motorola Mobility, Inc. All rights reserved.
27MOTODEV
© 2011 Motorola Mobility, Inc..
Motorola
CPU
28MOTODEV
© 2011 Motorola Mobility, Inc.1.0
Webtop
HTML, jsAndroid
29MOTODEV
© 2011 Motorola Mobility, Inc.1.0© 2011 Motorola Mobility, Inc.
30MOTODEV
© 2011 Motorola Mobility, Inc..
Webtop
•
• Motorola ATRIX 4G Motorola /
• 11.5 Firefox 3.6.13
• !
MOTOROLA Stylized M Motorola Trademark Holdings, LLC. .. © 2011 Motorola Mobility, Inc. All rights reserved.
HTML5
MOTOROLA Stylized M Motorola Trademark Holdings, LLC. . . © 2011 Motorola Mobility, Inc. All rights reserved.
32MOTODEV
© 2011 Motorola Mobility, Inc.
HTML 5
• W3C HTML • , :
•••••
33MOTODEV
© 2011 Motorola Mobility, Inc.
HTML 5
•
section, article, aside, hgroup, header, footer, nav, figure, video, audio, canvas, datalist, embed, mark
34MOTODEV
© 2011 Motorola Mobility, Inc.
Firefox 3.6
• ( )
• , ()
• <audio> WAV OGG
• : http://developer.motorola.com/docstools/library/webtop-application-overview/
35MOTODEV
© 2011 Motorola Mobility, Inc.
Firefox 3.6
• Javascript <canvas> 2D
•
( / )
• Javascript
36MOTODEV
© 2011 Motorola Mobility, Inc.
Canvas( ) 2D • .
.<canvas id="myc" width="500" height="300"></canvas>
<script>
function supportsCanvas() {
return !!document.createElement('canvas').getContext;
}
var head = new Image(); head.src="head.jpg”;
var myc = document.getElementById("myc");
var cxt = myc.getContext("2d");
head.onload = function () {
cxt.drawImage(head, 0, 0);
}
37MOTODEV
© 2011 Motorola Mobility, Inc.
• . .
function supportsLocalStorage() {
return ('localStorage' in window)
&& window['localStorage']!==null;
}
try {
var msg = "localStorage is working OK <br>";
localStorage.setItem("key", msg );
} catch (e) {
document.write("Excpn in local storage”);
}
document.write( localStorage.getItem("key") );
38MOTODEV
© 2011 Motorola Mobility, Inc.
• . .
function supportsGeolocation() {
return !!navigator.geolocation;
}
function savePos(pos) {
var lat = pos.coords.latitude;
var lon = pos.coords.longitude;
}
try {
navigator.geolocation.getCurrentPosition(savePos);
} catch (e) {
http://www.mozilla.com/en-US/firefox/geolocation/ :
39MOTODEV
© 2011 Motorola Mobility, Inc.
40MOTODEV
© 2011 Motorola Mobility, Inc.
: developer.motorola.com•– http://community.developer.motorola.com/
•– MOTODEV Studio: ( ,
, ) IDE– App Validator: Android
• (Twitter)– Appsum11kr
•– http://developer.motorola.com/products/xoom/
41MOTODEV
© 2011 Motorola Mobility, Inc.
?
- #appsum11kr
community-developer.motorola.com
42MOTODEV
© 2011 Motorola Mobility, Inc.
43MOTODEV
© 2011 Motorola Mobility, Inc.
Apache 2 .
Copyright © 2010, Android Open Source Project. All rights reserved( ).
Apache , 2.0(" "); . :
http://www.apache.org/licenses/LICENSE-2.0.
“ ” . .
44MOTODEV
© 2011 Motorola Mobility, Inc.
BSD .Copyright © 2010-2011, Motorola, Inc. All rights reserved( ).
2 ., .
2 , / .
Motorola, Inc. .
" " () .
, , , , (, , , ) ,
( ), .
45MOTODEV
© 2011 Motorola Mobility, Inc.