lab-6340: advanced java me programming - streaming video ... · 2007 javaonesm conference |...

17
2007 JavaOne SM Conference | LAB-6340 | LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your Device Lukas Hasik, Fabiola Galleros Rios Software Engineer, Mobility Pack QE Sun Microsystems Inc. http://www.sun.com

Upload: others

Post on 02-Aug-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: LAB-6340: Advanced Java ME Programming - Streaming Video ... · 2007 JavaOneSM Conference | LAB-6340 | LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your

2007 JavaOneSM Conference | LAB-6340 |

LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your DeviceLukas Hasik, Fabiola Galleros RiosSoftware Engineer, Mobility Pack QESun Microsystems Inc.http://www.sun.com

Page 2: LAB-6340: Advanced Java ME Programming - Streaming Video ... · 2007 JavaOneSM Conference | LAB-6340 | LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your

2007 JavaOneSM Conference | Session 6340 | 2

Goal of Your Talk

Gain the experience with the successful tools, technologies and the best practices to seamlessly build wireless application consuming web service using the Java ME and Java EE technologies.

What Your Audience Will Gain

Page 3: LAB-6340: Advanced Java ME Programming - Streaming Video ... · 2007 JavaOneSM Conference | LAB-6340 | LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your

2007 JavaOneSM Conference | LAB-6340 |

How Instructor-Led Hands-on Lab Works

Instructors will guide you through whenever appropriate

You will do the lab by reading the lab document that is displayed on your screen after log-in

The hard-copy of the lab document is also provided

Feel free to get help from on-site proctors

Page 4: LAB-6340: Advanced Java ME Programming - Streaming Video ... · 2007 JavaOneSM Conference | LAB-6340 | LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your

2007 JavaOneSM Conference | Session 6340 | 4

Quick Walk-through

● If you have not logged in, log in with● Username: 6340● password: javaone07

● Online lab document gets displayed● All necessary software (JavaTM SE, NetBeansTM

IDE 5.5, NetBeans Mobility Pack 5.5, Sun Java System Application Server) and lab files are already installed on your lab machine

Page 5: LAB-6340: Advanced Java ME Programming - Streaming Video ... · 2007 JavaOneSM Conference | LAB-6340 | LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your

2007 JavaOneSM Conference | Session 6340 | 5

Quick Walk-through

● Read introduction of each exercise● Proceed with Steps to follow of each exercise● Instructor will do quick demo on how to do the

first exercise

Page 6: LAB-6340: Advanced Java ME Programming - Streaming Video ... · 2007 JavaOneSM Conference | LAB-6340 | LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your

2007 JavaOneSM Conference | Session 6340 | 6

Lab Format

● Instructor led lab● This lab is for 120 mins● 3 exercises

● + optional exercise for experienced users● You can follow the instructor or do the exercises

by yourself.● Exercises have to be done in order 1, 2, 3

Page 7: LAB-6340: Advanced Java ME Programming - Streaming Video ... · 2007 JavaOneSM Conference | LAB-6340 | LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your

2007 JavaOneSM Conference | Session 6340 | 7

4 Exercises

1. Play the video on device – create a midlet playing video

2. Connect to a web service, stream a video from the server

3. Create Webservice client without JSR1724. Modify the clients (optional)

Page 8: LAB-6340: Advanced Java ME Programming - Streaming Video ... · 2007 JavaOneSM Conference | LAB-6340 | LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your

2007 JavaOneSM Conference | Session 6340 | 8

Exercise 1: Play the video on device

● Create a Mobile Project.● Create a MIDP Canvas to play a video.● Add Custom Component to the palette.● Create a new Visual Visual MIDlet.● Create UI and add player logic to the application● Build and run the project

Page 9: LAB-6340: Advanced Java ME Programming - Streaming Video ... · 2007 JavaOneSM Conference | LAB-6340 | LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your

2007 JavaOneSM Conference | Session 6340 | 9

Exercise 2: Connect to a web service, stream a video from a server

● Deploy webservice to the application server● Create new application PlayRecordsApp● Generate new J2ME Web Service Client● Add VideoCanvas to the Sample MIDlet● Add player logic to the videoCanvas● Run the project

Page 10: LAB-6340: Advanced Java ME Programming - Streaming Video ... · 2007 JavaOneSM Conference | LAB-6340 | LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your

2007 JavaOneSM Conference | Session 6340 | 10

Exercise 3: Create Webservice client without JSR172

● Simulate an Emulator Platform Without JSR172● Create new Web Project and new web service

client● Create Mobile Client to Web Application● Filtering Sources● Reuse the visual midlet for both solutions● Modify the sample midlet from JSR172

Page 11: LAB-6340: Advanced Java ME Programming - Streaming Video ... · 2007 JavaOneSM Conference | LAB-6340 | LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your

2007 JavaOneSM Conference | Session 6340 | 11

Exercise 4: Modify the clients (optional)

● Add new form for the addRecord method of the webservice

● Modify the VideoCanvasProject to real library● Add an image to all WaitScreens● Setup obfuscator to decrease the size of your

application● Setup API permissions● Deploy project● Setup proxy server for WTK

Page 12: LAB-6340: Advanced Java ME Programming - Streaming Video ... · 2007 JavaOneSM Conference | LAB-6340 | LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your

2007 JavaOneSM Conference | Session 6340 | 12

DEMOExercise 1, Exercise 2

Page 13: LAB-6340: Advanced Java ME Programming - Streaming Video ... · 2007 JavaOneSM Conference | LAB-6340 | LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your

2007 JavaOneSM Conference | Session 6340 | 13

Summary

● You know how to play a video in MIDlet● You are able to use JSR 172 – Web Services API● You can use the Mobile Client to Web Application

when your device doesn't support JSR 172● Mobility Pack is the best

Page 14: LAB-6340: Advanced Java ME Programming - Streaming Video ... · 2007 JavaOneSM Conference | LAB-6340 | LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your

2007 JavaOneSM Conference | Session 6340 | 14

For More Information

List● http://mobility.netbeans.org

Page 15: LAB-6340: Advanced Java ME Programming - Streaming Video ... · 2007 JavaOneSM Conference | LAB-6340 | LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your

2007 JavaOneSM Conference | Session 6340 | 15

Q&A

Page 16: LAB-6340: Advanced Java ME Programming - Streaming Video ... · 2007 JavaOneSM Conference | LAB-6340 | LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your

2007 JavaOneSM Conference | Session 6340 | 16

Finishing Up

● Fill up the survey form● Log out

Page 17: LAB-6340: Advanced Java ME Programming - Streaming Video ... · 2007 JavaOneSM Conference | LAB-6340 | LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your

2007 JavaOneSM Conference | LAB-6340 |

YOUR LOGOHERE

LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your Device

LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your Device

LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your Device

LAB-6340: Advanced Java ME Programming - Streaming Video From Server to Your DeviceLukas Hasik, Fabiola Galleros RiosSoftware Engineer, Mobility Pack QESun Microsystems Inc.http://www.sun.com