16.android hardware

9
Android Hardware Guido Ticona Hurtado [email protected]

Upload: guidotic

Post on 09-Apr-2017

127 views

Category:

Mobile


2 download

TRANSCRIPT

Page 1: 16.android   hardware

AndroidHardware

Guido Ticona [email protected]

Page 2: 16.android   hardware

Formatos Soportados◦ Audio: 3gp, mp4, m4a, aac, flac,mp3,ota,wav◦ Imagen: Jpg, gif, png, bmp, webp◦ Video: 3gp, mp4, webm

Protocolos◦ rtsp, sdp◦ Progressive streaming http/https◦ Live Streaming http/https

Multimedia

Page 3: 16.android   hardware

Sensores de Movimiento◦ Aceleración◦ Rotación◦ gravedad

Sensores de Ambiente◦ Temperatura◦ Humedad◦ Iluminación

Sensores de Posición◦ Proximidad

Sensores

Page 4: 16.android   hardware

Administrador de Sensores (SensorManager)

Sensor SensorEventListener

Sensores (cont.)

Page 5: 16.android   hardware

Inicialización◦ sm = (SensorManager)

getSystemService(Context.SENSOR_SERVICE); Listado

◦ List<Sensor> deviceSensors = sm.getSensorList(Sensor.TYPE_ALL);

Apertura◦ sm.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD

Monitoreo◦ sm.registerListener(this, mLight,

SensorManager.SENSOR_DELAY_NORMAL);

Sensores (cont.)

Page 6: 16.android   hardware

Permiso◦ Requiere permiso VIBRATE

Inicializacion◦ Vibrator v=

(Vibrator)getSystemService(VIBRATOR_SERVICE); Uso

◦ v.vibrate(100);◦ v.pause();

Vibración

Page 7: 16.android   hardware

Intent i = new Intent(Intent.ACTION_VIEW);i.setPackage("com.dynamixsoftware.printershare");i.setDataAndType(data_uri, data_type);startActivity(i);

Data_uri◦ file:///sdcard/algo.pdf◦ Content://texto para imprimir

Data_type◦ application/pdf◦ text/plain◦ image/jpeg◦ application/msword

Impresión PrinterShare

Page 8: 16.android   hardware

Intent i = new Intent("com.rcreations.send2printer.print"); i.setType( "text/plain" ); i.putExtra( Intent.EXTRA_TEXT, "esta es una prueba"); startActivity(i);

Pdf/Imagenes i.setDataAndType( uri, “tipo" );

Impresión Send 2 Printer

Page 9: 16.android   hardware

Intent i = new Intent(“org.androidprinting.intent.action.PRINT”);i.addCategory(Intent.CATEGORY_DEFAULT);

i.setDataAndType(uri,tipo); startActivityForResult(i),REQUEST_CODE_PRINT_FILE;

Data_uri◦ file:///sdcard/algo.pdf◦ Content://texto para imprimir

Data_type◦ application/pdf◦ text/plain◦ image/jpeg◦ application/msword

Impresión iPrint ePrint EasyPrint