At this time I'm intending to show you a Hello World widget...
Let's get started!
1. Open your Eclipse :)
2. File > New > Other (Or Widget Project, if it was presented for you), as shown in Fig 1.

3. Select "Widget Project" > Next... as shown in Figure 2.

4. Give a name to your project, as shown in Figure 3.
5. Note that you must fill Width and Height sizes according to the target device. I've configured with 240 x 320 (Corby screen size) in this example. If you keep default value you can get in trouble to emulate your application (that will be only available in part of the screen).

6. Select a device to emulate your application, as shown in Figure 4.
Note that this choice is based on the configuration of your project (previous screen)

7. Select Hello World Template, as shown in Figure 5 and "Next..."

8. Eclipse will ask you to change your perspective, as shown in Figure 6.
Note: A view is typically used to navigate a hierarchy of information, open an editor, or display properties for the active editor. A set of Views is a Perspective. Samsung has created a perspective for widgets development. :)

Ok, we got a widget project into the workspace, as shown in Figure7.
9. Rigth click on Project into workspace and "Package", as shown in Figure 7. This is need to generate .wgt package (that is used in emulation). Note that a .wgt file is created into "packages>Corby" folder.

Ok, interesting!!! How can I execute this example?
9. Rigth click on Project into workspace and "Package", as shown in Figure 7. This is need to generate .wgt package (that is used in emulation). Note that a .wgt file is created into "packages>Corby" folder.

10. Rigth click on Project into workspace and "Run As... > Widget" as shown in Figure 9.

11. You'll be asked to choose a device to emulate your App. In this example, we are considering just Corby, as shown in Figure 10. You can add others devices anytime you want, dont worry! :)

12. Congratulations! You got your first widget emulation :)

I suggest you to start reading:
Samsung Tools e SDKs
Samsung Mobile Widget SDK Guide
Available Widgets for Download (you can easy download, see and run all of the widgets)
Device Specs (find devices for the application that you want to develop - screen size, user interface, ...)
Thanks for your visit! :)
Next post: Better understanding our First Widget!
Feel free to ask/suggest/comment.
Twitter: @oliveiraeduardo
Nenhum comentário:
Postar um comentário